teleren/devto huggingface dataset:
Code Review #0: Sleet
Tags: review, codereview, ruby, rspec
Published: 2019-06-22 22:02:17

I recently was inspired by @brob with his design reviews and wanted to start doing some video code reviews! So here is the first one in that series.

This is me reviewing one of my own project `Sleet`. I'll let video me explain the project, but this is one that I hadn't worked on super recently and I thought I should take another look at it!

Let me know what you think of this video and about this format! And if you are interested in having me review your project please get in touch!

This video was also published to Vimeo in HD here

{% vimeo https://vimeo.com/343866396 %}

Here is my post announcing this new code review idea!

{% link https://dev.to/coreyja/do-you-want-a-code-review-i-want-to-help-40k3 %}
Toggle proxies in macOS Terminal
Tags: bash, macos, scripting, automation
Published: 2019-06-22 23:35:07

---
title: Toggle proxies in macOS Terminal
published: true
description: Making toggling proxies easier in bash!
tags: bash, macos, scripting, automation
---

One of the biggest annoyance in macOS's UI is the relative unease of switching between normal internet and a proxied connection. You have to:

```
1. Go to "System Preferences"
2. Go to "Networking"
3. Click your connection (Probably Ethernet or Wi-Fi)
4. Click "Advanced"
5. Click "Proxies"
6. Click "Web Proxy" and enter your info if its the first time setting up and check the box
7. Click "Secure Web Proxy" and enter your info if its the first time setting up and check the box
8. Click "OK"
9. Click "Apply"
```

Nine-friggin-steps just to toggle your proxy?!?! I won't accept this as a part of my workflow, and neither should you.

Thankfully, a dude named sryze wrote a quick bash script to handle toggling for us:

[https://gist.github.com/sryze/1f77d803023b9586e6c565b634e10787](https://gist.github.com/sryze/1f77d803023b9586e6c565b634e10787)

I've forked their gist and updated it to be more generalized:

[https://gist.github.com/mikedesu/6b0040bd419c900d11c07f11edb2ce1e](https://gist.github.com/mikedesu/6b0040bd419c900d11c07f11edb2ce1e)

For me, toggling on or off is now a one-line command:

```
$ ./proxy.sh Wi-Fi 8080 on
$ ./proxy.sh Wi-Fi 8080 off
```

Frequently, I'll just have to press "up up enter" in the terminal, which is something my right-hand can do all by itself! :D 

Feels good to take this massive annoying process and reduce it to a few button presses.

Now I can get back to hunting for bugs with ease!
[Today I learned] Typescript Index Signatures
Tags: typescript, webdev, todayilearned
Published: 2019-06-23 05:34:13

Days ago I read a post that contained the phrase "Today I learned" in its tittle. So I want to propose this topic as an initiative, the topic **Today I Learned** or **TIL** to motivate us all to share those **one or two** lines of code that **did the trick**, that **command** that is what you were looking for and can be useful for others devs.

**Edit:** It already exists as "todayilearned", cool!


## Index Signatures
I was writing some code that interacts with **GitHub Gists API**. Particularly this endpoint [https://developer.github.com/v3/gists/#get-a-single-gist](https://developer.github.com/v3/gists/#get-a-single-gist) to get a simple gist.
Notice that the field `files` is an **Object** instead of an **Array**. So, how do you safely define types for this find response? We don't know how many properties and which names have each of them.

A small google query directed me to this docs [TypeScript Index Signature](https://basarat.gitbooks.io/typescript/docs/types/index-signatures.html).

So the types for this Gists Response should be as follow

```js
interface GistFile {
    filename: string;
    type: string;
    language: string;
    raw_url: string;
    size: number;
    truncated: boolean;
    content: string;
  };

interface GistsFiles {
    [key: string]: GistFile
}

interface GistsResponse {
...
files: GistsFiles
... 
}
```
Now we can access to the response like this 
```js
console.log(gistFile.files.somefile.filename);
console.log(gistFile.files['somefile'].filename);
```
And there we go. 
Hope you find this useful.
Automate your Repetitive Business Process with RPA Services
Tags: rpa, rpaservices, technology
Published: 2019-06-24 12:21:51

---
title: Automate your Repetitive Business Process with RPA Services
published: True
description: Are you still unaware of the technology that is about to change the future of your business? Here's a detailed introduction to Robotic Process Automation, its tools and the advantages that you will reap from RPA implementation.
tags: RPA, RPAServices, Technology
---

The world is rapidly moving towards #RPA to increase efficiency. RPA bots can complete routine tasks nearly 50% faster and with 75% more accuracy. 

{% youtube yVdEtO439_4 %}

Contact us if you want [RPA services](https://www.botreetechnologies.com/robotic-process-automation) for your organization.
Angular 9|8 Drag and Drop Tutorial with Example
Tags: angular, angular98, angularmaterial, angular8draganddrop
Published: 2020-01-30 11:27:12

---
title: Angular 9|8 Drag and Drop Tutorial with Example
published: true
tags: Angular, Angular 9|8, Angular Material,angular 8 drag and drop
canonical_url: https://www.positronx.io/angular-8-drag-and-drop-tutorial-with-example/
---

**Angular 8 Drag and Drop tutorial with example** , is going to be discussed in this blog. I’ll teach you how to achieve Angular drag and drop functionality using Angular Material 8 in no time. Creating drag and drop with Angular 8 is as easy as stealing candy from a baby. 

It is clear from this that, we have to install and configure the basic Angular 8 app along with **Angular Material 8 UI library**.

Angular Material is a well-known UI library, and it offers a wide array of pre-developed UI components. Using these components, you can create flexible, robust, and cross-browser compatible user-interfaces in minutes. If we talk about UI and UX design consistency in Angular Material, so it’s top notch.

[Click here to read more](https://www.positronx.io/angular-8-drag-and-drop-tutorial-with-example/)
How to Get Feedback from Users
Tags: webdev, productivity, showdev, electronjs
Published: 2019-07-23 20:52:00

---
title: How to Get Feedback from Users
published: true
description: Users feedback is really important, and this is how I plan to collect their feedback
tags: webdev, productivity, showdev, electronjs
cover_image: https://thepracticaldev.s3.amazonaws.com/i/i02x3w1gveps9e3hrv5m.png
---




### There are a lot of features I want to implement. But which one is most important? Which one will users appreciate the most?


##### Better to ask the way than go astray

It's a bad thing to guess what people want the most. If you are certain about something then do it. But if you are not sure, and there are a bunch of equally important features than it's better to ask, right? 

That's why I'm creating **Feedback** page on [The Track]. Registered users could post suggestions, and everyone with account could vote. Most popular suggestions will be implemented first. 

Oh, and everyone can see progress.


With **Feedback** page we will avoid developing *cool* features that people don't need. Also, we'll get feedback directly from those that are affected the most. 


I'm curious what do you think about it? 

What should we call this page? Feedback, Features, or something else?

What do you think about asking users for opinion and suggestion?

> ### What's wrong with the approach? 
> ### What's good with this approach?



Once again, it's better to be harsh than to say nothing. I'm really looking forward to your feedback!






[The Track]:https://thetrack.app/
TELLIT
Tags: japanese, linux, security
Published: 2019-07-23 19:08:52

---
title: TELLIT
published: true
description: 報道ためのLinuxのコマンドラインインターフェイスのツール。
tags: japanese, linux, security, free software
---

行動主義の権利のプロジェクトを開発いる。

TELLITは報道ためのLinuxのコマンドラインインターフェイスのツール。暗号メール報道を共有。IPFSのコンテントをアップ。デッドマンペダルなど。

![](https://gitlab.com/terceranexus6/tellit/raw/master/multimedia/Gifi.gif)

それはどのように機能しますか？

KEY PAIRを ジェネレートためにOPENSSLを使ってください
`tellit-c --pripu -o trial`
ファイルをエンクリプトためにPUBを使ってください
`tellit-c -e publickey_name -i file -o output_file`
ファイル をデクリプトためにPRIVを使ってください
`tellit-c -d privatekey_name -i file -o output_file`
“TellMe” デーモン の関数 (イントルーダーの デテクター )
`tellit-c --tm`
ディレクトリのバックアップの暗号化
`tellit-c --bu directory -p passphrase`

もっと関数を開発つもりです!
[フリーソフトウェア ですよ](https://gitlab.com/terceranexus6/tellit)！助けてください
Primero la versión de Python
Tags: beginners, python
Published: 2019-07-31 18:00:10

Estoy por iniciar en python y con lo primero que me topo es la parte de escoger la versión.
Para un proyecto previo ya tenía instalada la versión 2.7.x en mi máquina, la cual ya tiene un tiempo de vida muy corto. Según la pagina oficial, dejará de ser soportada el 1ro de Enero del 2020, por lo que le sus días estan contados.

Literal, hay una pagina que cuenta sus días finales.


https://pythonclock.org/

Ya que instale la versión actual, procedo con la documentación al respecto.

Como saber la versión?
Al correr python desde su carpeta de instalación, es lo primero que nos muestra.

https://thepracticaldev.s3.amazonaws.com/i/kcqf7wixi3lsf90rxibp.PNG
Why Developer Become Frustrated
Published: 2019-07-24 13:08:20

In order to talk about why the developer becomes frustrated and companies can,t find talent, let’s start with their work. What makes their software project successful or imperfect (failure would be a wrong word I guess because there is always a scope of improving thing at any stage in development field)



Greatest “Cause of Frustration”

Fixing poor code issues:-

The thing that makes the most developer annoying is fixing the code. weather they write it themselves in the early stages or by some other colleague. The pain of fixing broken code gets double with the poor comments and refactoring codes and make it fresh and tidy. This could be a frustrating issue for anyone.

Finding bugs:-

This problem is related to the previous one. When it comes to finding bugs in the source code it’s more tricky than solving it. First, it takes a lot of time to locate it. And then it takes a lot of effort, energy to fix it.

Distressing Technical infrastructure:-

Unwisely and unhelpful technical infrastructure is also a pain point. What the developer can do only is to convert the broken, judged and outdated and not well-documented code in an inadequate form. Code comments that are either too general or sometimes too specific will also be going to be criticized by others.

Unclear Requirements:-

Developers are very particular about the task they do. They don’t like uncertainty in your requirements. And somewhat that is right after all requirement is the base on which developer going to create your project. They need to write code according to your requirements.

Those questioned with vogue and unrealistic project requirements as a source of stress, Particularly where those requirements are changing up to the last minute.

Maintaining past code:-

For developers maintaining and updating the code, they are working on for the years is tough. Developers need tp updated with the future scope all the work they did in the past. The challenge becomes more critical when they have to work on someone else codes who for now departed the company.

Read more about this article:- https://codersera.com/blog/why-developer-become-frustrated-and-companies-cant-find-talent/
Setting Up Sass in Gatsby Project - 4 Easy Steps 
Tags: beginners, gatsby, css, sass
Published: 2019-07-29 15:59:37

---
title: Setting Up Sass in Gatsby Project - 4 Easy Steps 
published: true
description: how-to guide for importing Sass into Gatsby projects
tags: #beginners #gatsby #css #sass
---

Working on a Gatsby project and want to up your game by utilizing Sass? You've come to the right place, my friend. Below is a guide to get you started with Sass right away! No time like the present - right? 

### 1. Install Plugins & Packages
Up first - install the node-sass package and the Gatsby plugin for Sass through your terminal. Navigate into your Gatsby project and run the following command: `npm install --save node-sass gatsby-plugin-sass`.

![npm install node sass and sass plugin](https://thepracticaldev.s3.amazonaws.com/i/8uyp23yjehe1cu4xq02r.png)

### 2. Update Plugins in your Configuration File
Now that you've imported the Sass plugin to your project - be sure to add this into your `gatsby-config.js` file. You'll see that the react package is already living inside the plugins array, simply add `gatsby-plugin-sass` to the array and save the file. 

![adding sass to config file](https://thepracticaldev.s3.amazonaws.com/i/6ch41itb8grbzyq3dnjl.png)

### 3. Rename `layout.css`
Gatsby gives you a default file titled `layout.css` but now that we are taking advantage of `Sass` we'll need to revise the file extension. Simply rename the file to include `.scss` at the end.

![rename css file to scss](https://thepracticaldev.s3.amazonaws.com/i/8e4gdrrnv6xobiqtpj0g.png)

### 4. Adjust Import Statement in `layout.js`
This step is easy - both easy to miss and to complete! Don't forget to adjust the file name of `layout.scss` in your `layout.js` file. Whatever you decided you wanted your file to be named in step 4, make sure it matches in `layout.js`. 

![adjust import file name to scss in layout.js](https://thepracticaldev.s3.amazonaws.com/i/9172n5xn8hidlskpi05z.png)

And the rest is history! You're ready to start using Sass in your Gatsby project. Run `gatsby develop` as you work through your styling to see your changes instantly on localhost. Resources provided below for additional insight:

[Sass Guide](https://sass-lang.com/guide)
[Gatsby Plugins](https://www.gatsbyjs.org/plugins/)
I’ve Made A Huge Mistake
Tags: javascript, codenewbie, productivity, discuss
Published: 2019-07-25 00:45:24

##Being Overzealous##

I think I bit off more than I can chew this week.
I don’t mean that I can’t do the stuff I wanted to, but I grossly overestimated how comfortable I am with JavaScript - even the basic stuff like creating a to-do list.

Last night I sat down and instead of doing what I had planned to do, which was finishing the design of <a href="https://do-more.netlify.com/">doMore</a>, I decided to mess with the JS. This is how it went:

<b>I panicked.</b>

I’m not sure why I did, but I did. I’ve been so excited to finally work with JS on my own,  away from Treehouse courses, and I froze. So I went back to my original plan of finalizing the design and even that took longer than anticipated. I kind of felt like a failure. 

Now I know that is absurd and I’ve only been doing this for a few months and I just dove into JS, however, I still felt like a failure. Then I reminded myself that it’s okay to fail. It’s okay to feel uncomfortable - and boy, did I feel uncomfortable working on JS.

##Feeling Uncomfortable##
![](https://thepracticaldev.s3.amazonaws.com/i/5hleppkphbdep9w1rmkv.jpg)

It sucks - there’s no denying that. It felt even worse because I pride myself on being pretty good with CSS and even that felt like it took longer than it should have last night. 

Perhaps it was an off night, or the fact that I couldn’t really focus, or maybe I just don’t know this stuff like I thought I did. But it’s okay. Everyone has bad days. Everyone has times where everything feels more difficult than it should. Haven’t you had a day where just getting out of bed feels like a huge challenge?

><em>“Move out of your comfort zone. You can only grow if you are willing to feel awkward and uncomfortable when you try something new.” - Brian Tracy</em>

I’m going to live by these words moving forward as I want to grow into the best developer I can. I have the motivation and (I think) the work ethic to do so. I may have to adjust my goals for next week to allow myself more time for the ones I set out for this week, and that’s okay - I’m adjusting my deadline.

What do you usually do when you feel like you’ve failed? What are your recommendations to overcome it? 

I know this blog is a bit different than my previous ones, but  everyone goes through these moments. I'm no different.
Comment per Algorithm Code Structure
Tags: codequality, beginners
Published: 2019-07-25 04:19:01

When writing or building functions

First I write the name and variables of the function.

```php
public function email_login($email, $password) {

}
```

Then I start describing the algorithm of the function line by line every step.

```php
public function email_login($email, $password) {
    // check if email is existing
    // if existing verify password
    // if correct password return user information
    // if not show response invalid_password
    // if email is not existing show response email_not_found
}
```

Then I write the algorithm one by one checking if it is working in the program until the last step. And that's it I've completed building the full function.

```php
public function email_login($email, $password) {
    // check if email is existing
    $this->db->where('email', $email);
    $query = $this->db->get('users');
    $user = $query->row_array();

    // if existing verify password
    if ($user != null) {
        // if correct password return user information
        if ($user["password"] == $password) {
            return $user;
        // if not show response invalid_password
        } else {
            return "invalid_password";
        }
    // if not show response email_not_found
    } else {
        return "email_not_found";
    }
}
```
How do I prepare for a new dev joining my engineering team?
Tags: hiring, documentation, teams, software
Published: 2019-07-25 16:48:53

---
title: How do I prepare for a new dev joining my engineering team?
published: true
description: An idea on how to help them get up and running quickly
tags: hiring, documentation, teams, software
---

Do you have a new developer joining your team soon? Are you planning to have them start working on one of your older apps/projects? How might you help them feel good about being able to a) get up-and-running and b) quickly contribute something to your project?

Here's one idea that you might consider doing before their first day. 


🎧 Put your headphones on

👨🏻‍🎤 Listen to some Bowie

🔥 rm -rf /path/to/your/local/app 

⬇️ Freshly clone your app

👩🏼‍💻 Follow your setup docs, step-by-step

🧟‍♂️ Get frustrated that they aren't up-to-date

🏃🏻‍♂️ Get app running, again

🕸 (while tidying your docs)

⤴️ Push your documentation changes up

🥾 Go outside for a nice hike/walk

🙃 Smile at the world
Data Science Youtube channel to subscribe 
Tags: sql, data, datascience, machinelearning
Published: 2019-07-25 19:27:54

#Hello, elders of the community, kindly SUBSCRIBE to my YouTube channel and anticipate my first video 😎

I will be shooting content related to Data Science, Machine Learning and Artificial Intelligence 

Click here to subscribe

https://www.youtube.com/channel/UCfin6Ag1GxmFj9eu-wiOP8w
🎩 JavaScript Enhanced SCSS mixins! 🎩 - Making CSS scopes with CSS variables.
Tags: css, sass, javascript, codepen
Published: 2019-07-26 11:04:13

*reposted due to improved code*

This is a very small implementation of css scopes, the approach is unique because it compiles the scope through a mixin in scss, this is shared with JavaScript by a teeny tiny IFFE function. The scss does most of the heavy lifting.

### How to use?
1 include the 15 lines mixin in your codebase
2 include the 43 lines of JavaScript
3 Do this:

``` scss
.some-stuff {
  @include scoped {
    background: red;
  };
}
```

So there is something really nice about seemingly styling with scss and JavaScript filling in the gaps.

### How does it work?
The mixin captures the selector that it is used within, then it generates a GUID per compile and per instance of the mixin call. 
The probability of a clash in this GUID is something like *1 in 32429858953958*, I will take those odds, frankly you're more likely to win the lottery. 
The mixin then uses `@at-root :root` to escape from its block and assign a generated css variable to the `:root` mainly because we will know where the unique variables live, the variable name contains a guid class and the captured elements class.

Now enter JavaScript, the variable we just set is now available to JavaScript, I wanted a plugin-and-play feeling so the function is an IFFE. 
There is a catch, because at the time of writing, there is no way to get a list of variables on an element directly so with no idea of the keys we have to resort to functionally scraping the vars from any stylesheets that have the same origin as this webpage. This amounted to 1 stylesheet in most cases, and its pretty fast in truth. Now we have a lovely array of css variables `['--guid-12345', '--guid-98765']`. If `getPropertyValue` within a loop, we can now get the guid class to assign and the captured target element. The only thing left to do is assign the class as well, something like `--guid-12345: .scope-12345,.target-selector`. 

-Gotcha, livereload doesn't work very well due to not re-compiling the scss and therefore a mismatched guid, but if your happy to just refresh the page like we did in the good old days then you will find everything is going to work in prod-

{% codepen https://codepen.io/acronamy/pen/oKzzax %}

### What else can we do with this technique?
{% link https://dev.to/adam_cyclones/javascript-enhanced-scss-mixins-series-intelligent-accessibility-with-css-variables-374c %}
New Life, new Horizons, New Job
Published: 2019-10-04 14:00:11

I've been working at [SERPRO](http://www.serpro.gov.br) for 10 years. Ten years is a lot of time in the IT field. Fortunately, I learned a **lot** about development, working with people, working with bureaucracy, and many, many other professional lessons. Work wasn't bad, actually. It was frustrating sometimes, but the salary was nice, coworkers were great people and I had some freedom to study and opt for new technologies, at least given the limits of a large public company. Oh, and I had job stability, which is the dream of the vast majority of the Brazilian. The political landscape in Brazil is ridiculously unstable, and so is the economy. 

I felt that something was missing, though. You know that gut feeling that you should be doing something else? So, I decided to assess my skills in the market, see how I would do out of Serpro. I was quite surprised to see I was quite qualified, actually! I never wanted to be the kind of guy that lives in the public sector, afraid of losing my job and not being able to relocate without a major hit on my salary. 

As everyone in the world probably knows, the Brazilian government is not something we are proud of. They are also not exactly fond of owning a public IT company, so they want to privatize it. It's a good thing that I already got a good job proposal before I could quit Serpro.

So, goodbye Serpro, and welcome, BairesDev! I'm quite happy with my new job, and I hope I can bring my skills to the table. This feels almost like a new life to me. After all, it's been 10 years in the public field, and I fortunately didn't lose my mojo.