teleren/devto huggingface dataset:
Caminando con un SRE
Tags: devops, sre, aws, googlecloud
Published: 2020-06-11 22:22:49

Todos y todas regularmente pasamos días en nuestros trabajos donde todo fluye con tranquilidad, armonía, paz, todo lo que hacemos es perfecto, no hay errores ni trabas. Pero como dejar por fuera esos días que deseamos no tener el role que tenemos, cuando hay issues en produción difíciles de reproducir, ataques a nuestros sistemas, la implementación de algún servicio no es tan "facil" como lo dice en la documentación, en fin, esos días en la que envejecemos más rápido de lo habitual.

Pero no todo es tan malo, el ser humano fue creado para "evolucionar" en medio de los problemas, retos... Por lo tanto, ante esos días de infierno, cuando al fin logramos encontrar la solución a los problemas, aprendimos algo. Ese algo que le puede facilitar la vida a otros, ese algo que me permitió dar un nuevo paso en mi carrera profesional. Ese algo que vale la pena compartir con otros.
 
Esa es la motivación de esta serie, compartir tips, buenas prácticas, la ideología principal detrás de esto, es que en lugar de publicar un montón de conceptos teóricos todos los días, puedo compartir un problema que enfrentamos en la vida cotidiana y cómo podemos resolverlo.

La mayoría de temas, tips, consejos ó como usted quiera llamarlo que estaré publicando estarán relacionados con herramientas que todos los SRE usamos regularmente:

* AWS
* GCP
* Python
* Jenkins
* GIT
* Kubernetes
* Docker
* Shell Script
* Linux
* Terraform
* ...

Estaré publicando el progreso a través de:

- Twitter: [@gelopfalcon] (https://twitter.com/gelopfalcon)
- Youtube [falconcoach] (https://www.youtube.com/channel/UCypyV-geyQF6gfBJlhb1DVA?view_as=subscriber)
- Facebook [falconcoach] (https://www.facebook.com/falconcoach87)

La verdad espero que se unan junto conmigo en este viaje...Aprendamos juntos. Gracias por leer y compartir.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/mh5eg793bjev25zvfw0o.gif)

"Como no somos los únicos, decidimos ser los mejores"
Day 152 : Fix Up
Tags: hiphop, code, coding, lifelongdev
Published: 2020-06-11 22:21:20

_liner notes_:
- Professional : Pretty chill day. Had our team meeting and it was our monthly demo where people get to show what they have been working on. I work with some really smart people! Started working on an open-wc application. The scaffold generate is pretty robust and gives a lot of options to create a single web component or application. Going to recreate a web component I made before using it. While going through some code examples, I noticed one didn't work. The API it was calling was to an old URL. I found the new one and it work. I told the folks in the open-wc channel and they had the fix up quickly. I contributed! haha.

- Personal : Didn't do too much last night. Mostly figured out how I want the task list to be implemented and figured out how I want things to work.

![view of the Golden Gate Bridge in CA, USA from the shore](https://dev-to-uploads.s3.amazonaws.com/i/z0h897uso9azren2i7eo.png)

Can't believe it's Thursday already! Going to go through some tracks for the radio show and get to bed early. The hackathon I recorded the workshop for is tomorrow and I want to check out all the other workshops happening ALL DAY! haha

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube oqKfx_qEf3s %}
Ninja Code: How to write clean code ;)
Tags: codequality, javascript, dx
Published: 2020-06-11 22:14:31

Hello, I found this lovely article about clean code; or perhaps the opposite thereof:

https://javascript.info/ninja-code

Sometimes I feel like there are certain gems online that don't get shared enough, I will start to share them on here

[Github link for posterity](https://github.com/javascript-tutorial/en.javascript.info)
Computational Thinking - Riddle 1
Tags: python, computationalthinking, riddle
Published: 2020-06-11 22:05:03

What two whole, positive numbers that have a one-digit answer when multiplied and a two-digit answer when added?
<small>riddle source: http://riddles.com/</small>



## How to?
We need to declare 2 variable `sum` and `mult`:
- `sum` is to check the **sum** of the 2 digits.
- `mult` is to check the **multiplication** of the 1 digit.


And both should be assigned as 0.

```python
sum = 0
mult = 0
```

Now we need 2 for loops to iterate through the needed numbers
The numbers should be between 1 and 9, beacuse their multiplication should be only 1 digit.
1-Any number multiplied by 0 will result 0


2-Any number less than 10 multiplied by 10 or a number greater than 10 will result to number of 2 digits


```python
for x in range(1, 10):
    for y in range(1, 10):
        sum = x + y
        mult = x * y
        if(sum >= 10):
            if(mult < 10):
                print(str(x) + " and " + str(y))
        break
```

And finally we need to break the iteration at the end of the second loop to avoid iterating through the same numbers twice.



## Answer
```terminal

 > 9 and 1

```
Removing FOUC in a Gatsby App 
Tags: gatsby
Published: 2020-06-11 21:54:02

---
title: Removing FOUC in a Gatsby App 
published: true
description: "Fixing that pesky flash of unstyled content"
tags: gatsby
//cover_image: https://direct_url_to_image.jpg
---

As I've been working more with Gatsby and styled-components, I've run across an issue with flashes of unstyled content showing on page load and refresh in an application deployed to Netlify. Squashing this issue required a bit of exploration.


Here are the two steps that eventually fixed my problem:

1. Install the `gatsby-plugin-styled-components` `styled-components` `babel-plugin-styled-components` plugins and update the `gatsby-config.js` file (example below). I had only imported `styled-components` library, not knowing the other packages were needed.

    This corrected the majority of issues I was having on page refresh. However, the unstyled font flicker was a little tricker to fix. After some experimentation I finally discovered that the `gatsby-plugin-typograpy` package did the trick.


2. Install the `gatsby-plugin-typography`, `react-typography` and `typography` packages and update the `gatsby-config.js` (also below) in order to fix font issues.

    This involves creating a `src/utils` folder, with a `typography.js` file. In order to use Google fonts, the typography file required some configurations.

    Here's mine:


```
// typography.js

import Typography from "typography"

const typography = new Typography({
  baseFontSize: "18px",
  baseLineHeight: 1.666,
  googleFonts: [
    { name: "Bai Jamjuree", styles: [700] },
    { name: "Muli", styles: [400, 700, 800] },
  ],
  headerFontFamily: ["Muli", "sans-serif"],
  bodyFontFamily: ["Muli", "serif"],
})

export default typography

```

Despite not setting the `Bai Jamjuree` font to either `headerFontFamily` or `bodyFontFamily`, I was able to use it elsewhere in my application.

Here's my `gatsby-config.js` file:


```
// gatsby-config.js

  plugins: [
    {
      resolve: `gatsby-plugin-styled-components`,
      options: {
        // Add any options here
      },
    },
    {
      resolve: `gatsby-plugin-typography`,
      options: {
        pathToConfigModule: `src/utils/typography`,
      },
    }
  ]
```

Hope this helps!
How to accelerate your Computational Thinking
Tags: python, computationalthinking, riddle
Published: 2020-06-11 21:50:17

Computational thinking is the practice of systematically solving a problem and of constructing and presenting a solution in such a manner that a machine can execute it. Yet to think like a computer scientist, does not require an IT background.
Accelaratig your computational thinking just needs some (and sometimes a lot) of practice.
In this coming weeks I will be posting riddles, most of it mathematical riddles, and how to solve them by writing a few lines of code.
SQL Basics - Manage Your Data
Tags: sql, beginners, database, codenewbie
Published: 2020-06-11 21:39:44

It's good to brush up on different languages and technologies as you start your coding journey. There are SO many overlapping aspects to programming that can help you build better projects, maybe even a bit faster than your last.

When I built my first Rails app I knew that I was writing SQL statements to create my tables and check my schema, but I never gave SQL it's own space in my brain. 

Here's a quick overview of some basic SQL commands to manipulate your database.

In this example, we're creating a small table called "Dogs".

1) Create the table called dogs with column titles: id, first_name, breed. We are making the id an integer and setting it as the Primary Key for each row in this table. We are saying that the first_name of each dog must be unique text and the breed cannot be empty.

CREATE TABLE dogs (id INTEGER PRIMARY KEY, first_name TEXT UNIQUE, breed TEXT NOT NULL);

2) Insert 3 rows into the dogs table to give us some data to work with.

INSERT INTO dogs (id, first_name, breed) VALUES (1, 'Shylah', 'Cockapoo'), (2, 'Mitsi', 'Chow'), (3, 'Shadow', 'Husky');

3) Any time you want to see the current data in the dogs table, use the "Select All" command.

SELECT * FROM dogs;

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gp88l0jedxire81lij85.png)

4) Add a column called age to the end of the dogs table that takes an integer for the value.

ALTER TABLE dogs ADD age INTEGER;
SELECT * FROM dogs;

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/7kudqame1sym9ujxg22u.png)

5) Add a column called last_name to the end of the dogs table that takes a text value. If no text is entered, 'NOT APPLICABLE' is the default value.

ALTER TABLE dogs ADD last_name TEXT DEFAULT 'NOT APPLICABLE';
SELECT * FROM dogs;

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/jjzfuam4ntc2h12pz2qt.png)

6) Let's add an age value to the second dog, Mitsi.

UPDATE dogs SET age = 5 WHERE id = 2;
SELECT * FROM dogs;

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gjzzbbngsi0447jbeytz.png)

7) Add another column called trained that will take a boolean value. SQL accepts 1 for TRUE, 0 for FALSE, and NULL for an empty value.

ALTER TABLE dogs ADD trained BIT;
SELECT * FROM dogs;

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/vnnynubt0uympb89keem.png)

8) Let's say that the first dog, Shylah, was trained.

UPDATE dogs SET trained = 1 WHERE id = 1;
SELECT * FROM dogs;

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/d66lpnm06fzsaaiynyv5.png)

9) Let's delete the record of the dog that doesn't have any value in the age column, which would be the dog Shadow.

DELETE FROM dogs WHERE age IS NULL;
SELECT * FROM dogs;

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dsthmvsd7hl6agb91svb.png)

This was a quick overview of some of the most-used SQL statements. Understanding these statements helps you to understand your data, update the values and debug your programs.

To learn more, take the free 7-hour "Learn SQL" course on www.codecademy.com
New layout is ready.
Tags: ios, android
Published: 2020-06-11 21:26:15

Sync with crypto experts and earn.
Download for free:

Android: https://play.google.com/store/apps/details?id=com.monnos.android

iOS: https://apps.apple.com/br/app/monnos-crypto-social-trading/id1476884342

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/vohz3ajalcbp6a2klj3t.jpg)
Senstate - Updates, C#-Client and a future look
Tags: javascript, angular, csharp, senstate
Published: 2020-06-11 21:25:06

[![Example Senstate Gif](https://thepracticaldev.s3.amazonaws.com/i/zmtm5zab2vlu51qnnnda.gif) <br/> Demo](https://senstate-dashboard-master.netlify.app/#/)


Finally after some months I worked a bit on Senstate again. I had some features already "done", but only some days ago I merged the PR. :smile:

# :confetti_ball: Senstate v0.3 :tada:

New features:
- Group Watchers

  ![group_feature](https://user-images.githubusercontent.com/842273/84432637-610d7880-ac2d-11ea-8cd1-cefa4177b9c8.PNG)

- List Watchers (instead of a masonry-grid, still need some more stying, ideas? thoughts?)
- You can add "difference"-View to see the change of the previous value

  ![example of the difference feature](https://user-images.githubusercontent.com/842273/84432324-f65c3d00-ac2c-11ea-9dc6-f84a4328e5d3.png)

- Errors can be searched on multiple sites, opens a new tab:
  - DuckDuckGo
  - Github
  - Google
  - StackOverflow
  
Also see [CHANGELOG.md](https://github.com/senstate/platform/blob/master/CHANGELOG.md)

# :construction: Whats next?

## In-Web-App-Overlay
Began working on an overlay to use inside your Web-App.

This will be done with Angular Elements (which can be used even without Angular).

Only the "target" connection will be changed (instead of the Hub-Connection), everything else will stay the same.

Repo / wip-changes will be pushed soon

## Now finally working on the C# client:

My goal is to create a library that could be used with, initial tests worked with:
- .Net Standard (I hope this would be all possible targets?)
- Unity
- Blazor Server / WebAssembly

The Library(ies) will be splitted into:
- The main logic, watchers/logger
- separated WebSockets implementation
- separated Json implementation

So that way every possible Target / Platform can have their own Json/WebSocket implementation.

[Repo](https://github.com/senstate/csharp-client) 

I'll post an article on how to use it, once the first version  is published

## Misc

- Try if react-native "just" works ?
- Save Dashboard settings to localStorage
- Extend the Dashboard (all the time, suggestions welcomed)
- Add instructions to the Dashboard itself (if no app is connected) - maybe just show the markdown-file of the client-library? - ideas?
- Creating an example repo for all possible libraries / targets
- Bug fixes

# Feedback

If there are any ideas / feature requests / issues / use-cases, please tell me :)
Laravel task scheduling without cron jobs for local development
Tags: laravel, productivity, windows, localdev
Published: 2020-06-11 21:23:46

---
title: Laravel task scheduling without cron jobs for local development
published: true
description: How to avoid using cron jobs or Windows Task Scheduler to run scheduled tasks in the background for local development
tags: laravel,productivity,windows,localdev
---

*Since publishing this article, it seems Laravel now has an official way of running the scheduler locally, which is described here: 
https://laravel.com/docs/8.x/scheduling#running-the-scheduler-locally*

It's very easy to create scheduled tasks in Laravel. They're also pretty easy to run in Linux or MacOS with cron jobs. However, I've been doing a lot of development on Windows lately, and Windows does *not* have UNIX-style cron jobs. And, there is no mention in Laravel's docs on how to do this properly in Windows. I found [this helpful article](https://quantizd.com/how-to-use-laravel-task-scheduler-on-windows-10/) going over how to do this in Windows using the Task Scheduler, but this felt way too cumbersome. Crawling around arcane Windows settings is not my idea of a good time, and just feels wrong since this is a project-level, not system-level, concern.

So, I found a simple workaround that helps me not only avoid dealing with the Windows Task Scheduler, but also the crontab in macOS and Linux as well! If I were to switch dev computers tomorrow, or bring other people into my project, I have completely cross-platform method of handling scheduled jobs without digging into the guts of my operating system; a NodeJS library.

## Using `node-schedule`

So, I'm not sure if this makes me a bad Laravel dev since I'm not building this tool as an Artisan command (or even in PHP), but it's the most effective and reliable solution available right now without doing a bunch of extra work. Since most Laravel devs are using some sort of front-end tooling (such as [Laravel Mix](https://laravel.com/docs/7.x/mix) or Webpack), we already have Node (and maybe Yarn) installed on our dev machines, making this less of a burden.

### Add `node-schedule` to your project

Make sure you're `cd`'d into your Laravel project root and run either the NPM or Yarn command below, depending on what you've got going.
```
# NPM
npm install node-schedule --save-dev

# Yarn
yarn add --dev node-schedule
```

### Create JavaScript file for schedule code

Still in your root directory, create a file called `dev-scheduler.js`, then put the following in that file.

```js
const schedule = require('node-schedule')
const { exec } = require('child_process')

new schedule.scheduleJob('* * * * *', function() {
    exec('php artisan schedule:run', function(error, stdout, stderr) {
        if (error) console.log(error)
        if (stderr) console.log(stderr)
        console.log(stdout)
    })
})
```
### Run the schuduler

Run the new file with Node.
```bash
node dev-scheduler.js
```

And…that's it. Keep in mind this is **not** for production. Use cron jobs for that.

Enjoy this time-saver!
I am formally a Typescript programmer!
Tags: typescript
Published: 2020-06-11 21:12:07

---
title: I am formally a Typescript programmer! 
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

I just migrated my current React project, which is not yet that big, just over a hundred files, and it was actually very easy because I used create-react-app and it offers great support for the language.

It took me like 5 days to rewrite my components and data layer. There were some challenges, specially a couple of React contexts, but here I am!

It feels like my browser got more intelligent. It's way easier to make a big refactoring, which usually happens a lot in the early stages of a project.

If you struggle with complex projects in ES6, I commend you to try Typescript (or you could actually also try Flow). Static types can give you a lot of confidence and make your work more easy.

But please, be sure to understand how the type system works in Typescript. It's very nice and flexible but different if you come from other languages with static typing. For instance, I work with C# on the backend and it's just not the same thing: Typescript mounts a static type system over a dynamic language. It's very nice, and more flexible, but different.

What languages are you currently enjoying? I would like to know!
How to quickly upgrade MariaDB on Ubuntu
Tags: ubuntu, mariadb
Published: 2020-06-11 21:11:54

I've recently upgraded Ubuntu from 18.04 LTS to 20.04 LTS on my laptop.  One of the great things about doing so, is the ease of updating MariaDB (because I prefer it to MySQL).

As 18.04 was shipped with MariaDB 10.1, and my main development is in PHP using Symfony, I need MySQL 5.7 or MariaDB 10.2 or higher to get the user security working (roles are stored as JSON by default - that's not a data type on earlier versions of the database). Happily, MariaDB provide documentation on how to [upgrade from 10.1 to 10.2](https://mariadb.com/kb/en/upgrading-from-mariadb-101-to-mariadb-102/).

After upgrading Ubuntu, it's even easier than that:
`apt install mariadb-server`

That saved a lot of removing, ppa updates, updating and installing.
My Machine Learning Journey
Tags: python, machinelearning, datascience, jupyter
Published: 2020-06-11 21:08:49

I have been a python developer for about 2 years now I've dabbled from the basics to writing functions, working with frameworks like Django and flask also building APIs with the Django rest framework and I finally decided to go into machine learning/Data science yeah machine learning or data science people believe that the two fields are different they are not actually they are interwoven machine learning has some data science in it likewise data science has some machine learning in it just that data science deals with more data than machine learning models.

How did I begin the journey

Just like anyone else I did a lot of research, read tons of  articles, watched a lot of videos I would suggest that start your journey by going through google's [machine learning crash course](https://developers.google.com/machine-learning/crash-course) then you can also check [Udemy](https://www.udemy.com) for some high rated machine learning courses Before I got into machine learning I thought it was a very complex field of computing it is actually hard but in the real sense like when you get into it you'll find out it's not that complex



## Thanks for reading...
MNS Token is ready!
Tags: blockchain, crypto, java, computerscience
Published: 2020-06-11 21:06:11

The Monnos Token (MNS) is based on ERC-20, the popular blockchain for smart contracts of Ethereum. The uses of MNS tokens, which can be bought, sold, or traded and be used to get an exclusive discount on Monnos platform. 

See our Token on ETHscan: https://etherscan.io/token/0x53884b61963351C283118a8E1Fc05BA464a11959?a=0xb82519d7dc4bcd710cfc76e0b332d602fdc8d82d#tokenInfo


Know more: https://monnos.com/mns-ecosystem/
Monnos Account - Evolution Based on Feedback

Tags: crypto, blockchain, ios, android
Published: 2020-06-11 21:04:16

This screen shows that from the beginning, we listened to feedback and changed the product fast! Always seeking to meet the needs and desires of the members of our community. Be part of our global community and stay close: https://monnos.com/community

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4muqt8t1mm5bjorwrfvh.jpg)

Download for free:

Android: https://play.google.com/store/apps/details?id=com.monnos.android

iOS: https://apps.apple.com/br/app/monnos-crypto-social-trading/id1476884342