teleren/devto huggingface dataset:
Self-Learning 
Published: 2019-10-03 13:59:09

I wish I could just download everything I ever wanted to know, like how to code, directly into my brain. But I’m not Neo and this is not the Matrix and that’s of course not possible, yet. I like to think that most things are possible given enough time and knowledge, but until direct knowledge download is available there is self-learning. 

Self learning is the act of teaching oneself, with or without help from others, what you want to learn, how you want to learn it, and when you want to learn it. This way you can set your own goals, prioritize those goals, find and decide on what materials and resources you want to use to help you reach those goals, and decide on the time frame and rhythm of achieving those learning goals. And it’s never been easier to do so! With access to the internet you can teach yourself almost anything now. Want to learn how to walk the dog with your yo-yo, play the ukulele, or how to code? You can just jump online and google it! Of course there are other ways and resources to aid you in teaching yourself and that’s the beauty of being an autodidact, you get to decide what works best for you! 

Currently I’m teaching myself how to code. The first step I took on this journey was clarifying why I wanted to learn to code. Doing this has helped me decide what to focus on because there is an overwhelming amount of information out there on how to code! Like so much that it almost kept me from moving forward. But clarifying why I want to learn to code and what I want to do with it once I learn it helps me narrow down what information is useful and what is not. It’s a fluid process and looks like however I need it to look like in order to achieve my desired learning outcomes. 

There are also many learning methods to teach yourself something. Tim Ferriss has a method for learning anything fast. Jonathan Levi has a method for becoming a superlearner. These are only two examples of methods for learning and teaching yourself anything but there are so many more. And this is great because again it points back to the freedom and flexibility that self-learning offers when figuring out and deciding for yourself what works and what doesn’t. For a good read about teaching oneself to code try Clive Thompson’s “Ten Lessons I Learned While Teaching Myself to Code” https://tim.blog/2019/03/21/learn-to-code/.
"Ich bin eine Kartoffel" and your German skills during Hacktoberfest
Tags: hacktoberfest, contributorswanted
Published: 2019-10-03 13:52:20

![Ich bin eine Kartoffel](https://raw.githubusercontent.com/viniciuskneves/ichbineinekartoffel.de/master/ichbineinekartoffel.png)

I've been living in Germany since February. Coming from Brazil I can tell you that my German skills are no the best. I can also tell you that German is not easy to learn coming from Brazil (it might be easier for you depending on which languages you already know).

Nevertheless even before I came to Germany I knew one word: Kartoffel. Apparently it is the one of the most well known German words worldwide and it is heavily used among foreigners.

After some months here I realized that Kartoffel is a powerful word and also a German cliché. You can hear from almost all new students the following sentence: Ich bin eine Kartoffel. The translations is straightforward: I'm a potato.

"Ich bin eine Kartoffel" + [purple](http://theoldpurple.com) + some inspiration from [Sara Vieira](https://twitter.com/NikkitaFTW) and her talk "Build dumb shit" I decided to build [ichbineinekartoffel.de](https://ichbineinekartoffel.de).

I think the website talks by itself but you can contribute to make it even better and spread the word Kartoffel to the rest of the world. I've opened some issues where you can play a bit and help me to improve this masterpiece.

{% github viniciuskneves/ichbineinekartoffel.de no-readme %}

![So you speak German? Tell me which phrases do you know besides "Guten tag" and "Ich bin eine Kartoffel"?](https://raw.githubusercontent.com/viniciuskneves/ichbineinekartoffel.de/master/soyouspeakgerman.png)
Daily Challenge #82 - English Beggars
Tags: challenge
Published: 2019-10-03 13:23:25

---
title: Daily Challenge #82 - English Beggars
published: true
series: Daily Challenge
description: Return an array with the sum of what each beggar brings home, assuming they all take regular turns, from the first to the last
tags: challenge
---

Given an array of values and a number of beggars, you are supposed to return an array with the sum of what each beggar brings home, assuming they all take regular turns, from the first to the last.

For example: `[1,2,3,4,5]` for `2` beggars will return a result of `[9,6]`, as the first one takes `[1,3,5]`, the second collects `[2,4]`.

The same array with `3` beggars would have in turn have produced a better outcome for the second beggar: `[5,7,3]`, as they will respectively take `[1,4]`, `[2,5]` and `[3]`.

Also note that not all beggars have to take the same amount of "offers", meaning that the length of the array is not necessarily a multiple of n; length can be even shorter, in which case the last beggars will, of course, take nothing `(0)`.

***
_This challenge comes from GiacomoSorbi on [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Systems and Processes that Aren’t in Code are Terrifying
Tags: devops, go, programming, tutorial
Published: 2019-10-03 12:52:38

---
title: Systems and Processes that Aren’t in Code are Terrifying
published: true
date: 2019-10-03 12:47:18 UTC
tags: devops,go,Programming,Tutorial
canonical_url: https://qvault.io/2019/10/03/systems-and-processes-that-arent-in-code-are-terrifying/
---

![](https://qvault.io/wp-content/uploads/2019/10/photo-1509248961158-e54f6934749c-1024x710.jpg)

The dreaded:

```
15 6 2 1 * /home/lane/backup.sh
```

You may recognize this as a unix cronjob, a job that is scheduled to run on a server periodically.

You may be thinking,

> “Why is that scary? We use cronjobs all the time!”

If the code that manages the crontab is source controlled and exists within the organization’s central repositories, then I actually have very little to complain about. My beef is when an engineer hops into the server and starts up a cron job without that configuration existing anywhere in code.

You may say,

> Well, the cron schedule may not exist in code, but the script/program it runs does!

**I don’t care.**

![](https://qvault.io/wp-content/uploads/2019/10/26ipc1.jpg)

I want to be able to look at the code base and know if the program is long-running, should be run manually, or if it runs on a specific schedule. If it is going to be run using crontab that’s fine, just make sure that the CI/CD config file (or something similar that is source controlled) specifies how that is triggered.

Or even better, program in Go so that spinning up side processes within your app is simpler than using the crontab ![😉](https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f609.png)

## Other Angst-y Things

Crontabs are just a common example of hard to discover processes. Others may include:

- Database processes that were added manually, instead of by the app that owns the DB
- .bash\_profile or .bashrc files that kick off server startup jobs
- Third party apps that were installed on the server to take care of special tasks (I don’t know, defragging the disk maybe). Those processes should be documented in code, probably config files that your organization typically uses to start its apps.

## Thanks

Internal documentation sucks, so document your processes in code instead. A config file that specifies how a process is started is much better than a PDF, because the config file can’t become outdated (if it does, things break).

Good luck out there.

By Lane Wagner [@wagslane](https://twitter.com/wagslane)

Download Qvault: [https://qvault.io](https://qvault.io/)

Star our Github: [https://github.com/q-vault/qvault](https://github.com/q-vault/qvault)

The post [Systems and Processes that Aren’t in Code are Terrifying](https://qvault.io/2019/10/03/systems-and-processes-that-arent-in-code-are-terrifying/) appeared first on [Qvault](https://qvault.io).
Github, no more the house of open source
Tags: microsucksimongitlab, gitlab
Published: 2019-10-03 13:01:12

---
title: Github, no more the house of open source
published: true
description: Microsoft the leader of close source
tags: #microsucks_im_on_gitlab #gitlab
---
I will just put it here

#### Gitlab is overtaking github:
https://towardsdatascience.com/gitlab-is-overtaking-github-a0bbb0a8d926 

#### Microsoft is Not an Open Source Authority But an Opponent of Open Source:
http://techrights.org/2019/09/23/microsoft-as-king-of-open-source/
How Does Test Pyramid change for Microservices?
Tags: microservices, serverless, testing, discuss
Published: 2019-10-03 12:58:36

Two years ago we started shifting to microservices. The whole project happened without anything in place. Microservices were created ad-hoc. When someone wanted to create something new or migrate a part of the monolithic API, we'd create a microservice each time. Everything went smooth until we started testing our microservices. 

**We didn't know where to start!** 

Mike Cohen's testing pyramid has been the golden standard when it comes to structuring and scripting our testing. The number of unit tests should be kept maximum. The integration tests should be less than unit while UI tests should be kept minimum as possible. This suited quite well for our monolithic codebases. 

**But what about microservices?**

As we move towards independently deployable microservices, the testing becomes coarse-grained. The more coarse-grained a test is, the more brittle and time-consuming it becomes to write, execute and maintain it. At the same time, since microservices are independent, we need new test boundaries at various levels: unit, integration, component.  

![microservices testing](https://www.simform.com/wp-content/uploads/2019/09/imgpsh_mobile_save2.png)

The concept helps us in understanding the relative number of tests that must be written at each granularity. As we move towards the top layers of the pyramid, the scope of the tests increases and the number of tests that must be written decreases.

While we were trying to fix this for us, we documented our struggle in the form of a blog: [Microservices Testing Strategies, Types & Tools: A Complete Guide](https://www.simform.com/microservice-testing-strategies/). This blog isn't about arguing for one form of testing over another but rather to showcase the lessons our team has learned. 

If you think there is any way we can improve, feel free to comment your suggestions. or get in touch [@HirenDhaduk_](https://twitter.com/HirenDhaduk_) on Twitter.
Make your applications running on subdomains expose to web
Tags: tech, productivity
Published: 2019-10-03 12:56:06

Ngrok is widely used application to expose local servers running on any port to internet out there., but fails when you are working on multi-tenant application which requires subdomain as, it doesn’t support subdomains. In such case you can use serveo as an alternative. Best of it is, your site doesn’t even have to be on localhost means it can run on lvh.me too.

Run below command


ssh -R yoursubdomain.serveo.net:80:yoursubdomain.lvh.me:3000 serveo.net


And your multi tenant application running on yoursubdomain.lvh.me will be forwarded to public exposed path of serveo.net.

For more detail check out https://aarvy.me/blog/2019/09/20/expose-local-apps-having-subdomains-to-web/
Vs code cheat sheet 
Tags: beginnerstoprojourney
Published: 2019-10-03 12:50:08

**Why Vs code?**
Virtual studio code is a source-code editor developed by microsoft for windows, linux and macOs. It is a good editor for debugging and for embedded git and github. It includes syntax highlighting, code snippets, extensions .
 
**Themes**
There are many cool themes available in vs code which gives it an edge over other source-code editors.
You can change the theme as per your convinence.I would prefer you the dark themes as they look cool over the other themes.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/fb3oavcma7c3bp04t0aw.gif)

If you are a beginner at coding and want to become a pro then you should know vs code cheat code to enhance your coding skills. As cheat code helps you to do coding fastly. I want you to have these cheat codes at your workspace & get used to these cheat codes. Cheat sheets for:-
●[**Windows**](https://www.google.com/url?sa=t&source=web&rct=j&url=https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf&ved=2ahUKEwikp_b2ioDlAhXZfCsKHT8iCYgQFjAAegQIAxAB&usg=AOvVaw3IhUv6JwiLHEL2SrhdVrIp)
●[**MacOs**](https://www.google.com/url?sa=t&source=web&rct=j&url=https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf&ved=2ahUKEwjpkZyQjoDlAhVSXn0KHTksBEUQFjAAegQIBBAB&usg=AOvVaw2iWp15mgLBfM5XD5_ldg4W)
●[**Linux**](https://www.google.com/url?sa=t&source=web&rct=j&url=https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf&ved=2ahUKEwiTgKDCjoDlAhUGv48KHZXdBZYQFjAAegQICBAC&usg=AOvVaw37Ef1FLUrnuviGNk5Fez6I)

**Multi line cursor using cheat code**:-
To insert multiple cursor press-
Alt+Click
To insert multiple cursor above/below press-
Ctrl+Alt+↑ / ↓

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/oh5rcs431v671n621tzn.gif)


Share your views on this blog. Happy coding❤❤
n350071 shell note (bash)
Tags: shell
Published: 2019-10-03 12:20:45

---
title: n350071 shell note (bash)
tags: shell
series: note
published: true
---

https://dev.to/n350071/bashprofile-4ebd

## 👍 brew
- [brew bundle(ja)](https://shiopon.hatenablog.jp/entry/2019/01/02/025701)
- [Brew Formula](https://formulae.brew.sh/formula/)

```sh
brew install peco #Simplistic interactive filtering tool
brew cask install atom
brew cask install visual-studio-code
brew cask install amethyst
brew install htop
brew install jq # => use like this : curl localhost:8080/api/json | jq .
brew cask install eqmac # イコライザー
brew cask install postman
brew install tree
brew install blueutil
```

### brew software
{% link n350071/my-peco-note-aha %}


---

## Find the application process id

```
$ ps aux | grep rails
USER       PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
n350071    2071   0.0  1.9  5419064 323140   ??  S     2Sep19  13:18.55 /Users/n350071/.rbenv/versions/2.4.6/bin/ruby script/rails s
```

Then, the rails pid is `2071`.

## About Exit code

| Exit code | meaning |
| --- | --- |
| 0 |        Success |
| 1 |       General errors, Miscellaneous errors, such as "divide by zero" and other impermissible operations |
| 2 |       Misuse of shell builtins (according to Bash documentation)        Example: empty_function() {} |

## Workaround for white space
```
find -print0 | xargs -0
```

## xargs with arguments
```sh
echo 1 2 3 4 | xargs -I{} echo {}
```

## find all components
```
mdfind -name "kindle"
```
My Javascript note ( include JQuery )
Tags: javascript
Published: 2019-10-03 12:16:19

---
title: My Javascript note ( include JQuery )
description: This is my main jquery note.
tags: js
series: note
published: true
cover_image: 
canonical_url:
---

## Selector
### Find by multi classes
```html
<element class="a b">
```

```js
$('.a.b')
$('.b.a')
```

### Find the last element
```html
<div id='hello'>
  <p class='world'>a</p/>
  <p class='world'>b</p/>
  <p class='world'>c</p/>
</div>
```

```js
$(#hello).find('.world:last')
// => c
```

## form
### metaprogramming like form submit
Good for grecapcha call-back v2 workaround.  

```js
onSubmit = function(){
  const formName = $('.agreement').find('input').attr('name').split('[')[0]
  $(`form[id*=${formName}]`)submit();
}
```


### stop event bubbling
```js
event.preventDefault();
```

## Manipulation
#### add/append a element
It appends hidden input that gives a param 'force_invalid'.

```js
<form class="my-form">
</form>
```

```js
function invalid_submit(document) {
  $(document).append("<input name='force_invalid' value='1' type='hidden'></input>" );
  $(document).closest('form').submit();
}
```

#### set a value
```js
$('input[name="some_request[policy_agreement]"]').val("0");
```

#### if checkbox is checked, open a panel
```js
$.each($(".checkbox"), function(){
    // scope of 'this' is the checkbox
    if($(this).is(":checked")){
        $(this).closest("div").slideToggle("fast");
    }
});
```

{% link n350071/dynamically-change-the-iframe-height-from-inside-24en %}

## Tips
### expression substitution inside a string literal. (式展開)
`${}` inside the backquote (&#96;) substitute the expression.


```js
const formName = 'my-form'
$(`form[id*=${formName}]`)submit();

$('form[id*=`formName`]').submit(); // ❌doesn't work
$('form[id*=formName]').submit();   // ❌doesn't work
```

### Uncaught Syntaxerror: Unexpected token u
It's same as `console.log(JSON.parse(undefined));`.
JSON.parse is actually undefined.
DNS provider for Asia countries
Tags: dns, providers, websites
Published: 2019-10-03 12:12:54

Good afternoon, 

Next month I’m moving to Asia to live there and work on my new online business (for 4 months). I’ll be visiting countries that have strong restrictions so DNS provider is a must. 
Could anybody advise me please which free DNS provider I could use? Netflix is not needed for me. I just need a simple DNS provider to bypass websites that will be needed for work and entertainment. 
Any reviews about [Trust DNS](https://surfshark.com/trust-dns)? I see it’s a new and free product. From my experience, new products are being great at the very beginning. 
In addition, reviews about other options are more than welcomed. Thank you in advance.
How To Know What Users Are Doing On Your Website With Hotjar
Tags: ux, javascript, webdesign, programming
Published: 2020-02-12 21:34:49

---
title: How To Know What Users Are Doing On Your Website With Hotjar
published: true
date: 2019-10-03 12:11:47 UTC
tags: ux,javascript,web-design,programming
canonical_url: 
---

[![](https://cdn-images-1.medium.com/max/2600/0*8GC9B3O1u63kUPAF)](https://medium.com/swlh/how-to-know-what-users-are-doing-on-your-website-with-hotjar-7238924deed3?source=rss-3a534b5053e6------2)

Understand your users to improve your website conversions

[Continue reading on The Startup »](https://medium.com/swlh/how-to-know-what-users-are-doing-on-your-website-with-hotjar-7238924deed3?source=rss-3a534b5053e6------2)
Refactor do end block to {} for reduce scrolling in Rails
Tags: rails
Published: 2019-10-03 12:10:46

---
title: Refactor do end block to {} for reduce scrolling in Rails
tags: rails
published: true
---

## 🤔 Situation
When you use [aasm](https://github.com/aasm/aasm) gem in your project, and it's grown. You might want to refactor it. There is a tip, I will write it later.


```ruby
# 32 lines
include AASM
aasm column: :status do
  state :a , initial: true
  state :b
  state :c
  state :d
  state :e
  state :f
  state :g
  state :h

  event :b do
    transitions from: :a,  to: :b
  end
  event :c do
    transitions from: :b,  to: :c
  end
  event :d do
    transitions from: :b,  to: :d
  end
  event :e do
    transitions from: :d,  to: :e
  end
  event :f do
    transitions from: :e,  to: :f
  end
  event :g do
    transitions from: :e,  to: :g
  end
end
```

## 🦄 Before the refactoring, Understanding
The curry braces is stronger(prior) than the do-end block.
Then, if you want the arguments stronger than `{}`, you need `()` for the arguments.

So, following it equal.

```ruby
event :happen do
  transitions from: :sleep, to: :wakeup
end

event(:happen){transitions from: :sleep, to: :wakeup }
```

## 👍 Reduce the lines
It is better foresight.

```ruby
# 18 lies
include AASM
aasm column: :status do
  state :a , initial: true
  state :b
  state :c
  state :d
  state :e
  state :f
  state :g
  state :h

  event(:b)   {transitions from: :a,  to: :b  }
  event(:c)   {transitions from: :b,  to: :c  }
  event(:d)   {transitions from: :b,  to: :d  }
  event(:e)   {transitions from: :d,  to: :e  }
  event(:f)   {transitions from: :e,  to: :f  }
  event(:g)   {transitions from: :e,  to: :g  }
end
```


---

## 🔗 Parent Note
{% link n350071/my-rails-note-47cj %}
PowerApps BuildTools for Azure DevOps
Tags: powerapps, devops, deployment, azure
Published: 2019-10-03 12:10:17

For quite a long time I have been trying to automate the deployment of PowerApps solution/app. [PowerApps build tools](https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/build-tools-overview) is still in __**Preview**__ but this collection of Azure DevOps build tasks will help you eliminate all the manual intervention that is currently needed to manage the lifecycle of your application.

Normally, you would manually export your zip file from your development environment and import it into your production environment. You can now automate these tasks using Azure DevOps. To make use of these buildtools tasks you must install the [extension](https://marketplace.visualstudio.com/items?itemName=microsoft-IsvExpTools.PowerApps-BuildTools) from the Visual Studio market place into your Azure DevOps instance

This is an example of a very simple Build pipeline that publishes your zip file as artefact for deployment

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/z41juybamk0qiu368mwf.png)

Then, you can use these two PowerApps DevOps tasks in a Release pipeline to deploy to an environment

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/gsq1nwq84rjtdeqbybz7.png)

Cool huh?!

But that's not it. You can also automate the export of the zip file with this task

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/dxza99xcjzwlmkohgbtn.png)

And you can take it even further, we know zip files are hard to track changes, so you can source control the contents of the zip files by using the unpack task

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/dyzd5ifus9jb24ibmmjm.png)


This set of DevOps tasks will definitely help you manage the lifecycle of your PowerApps going forward, there are also tasks to automate common environment management functions that you can use.

If like me, you also like to get ahead of the game, go start automating your apps now :-)
Йоу, сокет!
Tags: javascript, программирование, кодинг
Published: 2019-10-03 14:53:33

---
title: Йоу, сокет!
published: true
date: 2019-10-03 12:07:00 UTC
tags: JavaScript,Программирование,Кодинг
canonical_url: https://www.npmjs.com/package/socketiyo
---

Жил-был socket.io - js-библиотека, которую очень любили за возможность легко создавать чатики при веб-страницах. Потом пришел html5 и наш герой был вытеснен штатным WebSocket'ом. Но память о павшем жива: [npm-пакет socketyo](https://www.npmjs.com/package/socketiyosocketiyo) написан хоть и с применением WebSocket, но поддерживает автоконнект, события и прочие ништяки в лучших традициях socket.io.
Hacktoberfest C#
Tags: help, hacktoberfest, git, csharp
Published: 2019-10-03 12:06:46

---
title: Hacktoberfest C#
published: true
description: 
tags: #help #Hacktoberfest #git #Csharp
---

I would like to get involved with Hacktoberfest, can some one point me in the right direction of some Open Source C# projects?