teleren/devto huggingface dataset:
Los Keywords del Spanglish en los Corporativos
Tags: management, spanglish, social, friendship
Published: 2019-09-06 03:41:23

####Keywords básicas para entender el spanglish de las conversaciones diarias que se dan durante nuestras reuniones de trabajo.

En los ambientes de trabajo dentro de los corporativos, nos encontramos con personas de nacionalidades y culturas distintas a las nuestras. Sin duda es algo bueno para la empresa y para los colaboradores, pues ofrece la oportunidad de crecer tanto personal como profesionalmente, ya que extiende tus habilidades.

Durante las reuniones que se tienen con los equipos de trabajo, se dan conversaciones multinacionales y por ende, multilenguaje. Una combinación sería Español — Inglés, conocida coloquialmente como Espanglish o Spanglish.

Para hacernos la vida más fácil, listo algunas palabras clave (keywords del spanglish) que son básicas manejar durante nuestras reuniones:

1. **On-site.** Usada para especificar que “algo” será presencial, se hará en la oficina. Ej. La capacitación será on-site.
2. **Delivery.** Se usa para especificar las “entregas” que se harán. Ej. ¿Cuándo es el delivery del sitio web?
3. **Happy Path.** Se utiliza para hacer referencia a los casos de uso de un sistema. Indica cómo se debería de usar correctamente. Ej. Con el Happy Path funciona, pero debemos considerar otros escenarios.
4. **Rocket Science.** Se usa para insinuar que no estás construyendo o desarrollando algo infinitamente complejo. Ej. El desarrollo estuvo listo antes de lo previsto, no tiene nada de Rocket Science lo que se hizo.
5. **Low-Profile.** Esta se usa para decir que literalmente “algo” o “alguien” se mantiene en un perfil bajo. Ej. John está low-profile para no llamar la atención.
6. **Always On.** Usada para asegurar que un sistema esta funcionando todo el tiempo. Ej. El servidor web esta configurado para estar always on.
7. **Fun Fact.** Esta se usa para indicar alguna otra funcionalidad curiosa y de mucho valor sobre un “algo”. Ej. Un Fun Fact de Netflix, es que puedes elegir imágenes para tu perfil.
8. **Highlights.** Es usada para indicar los puntos más sobresalientes e importantes de un “algo” en especial. Ej. ¿Cuáles son los highlights de la reunión?.
9. **In the meantime.** Utilizada para decir qué ocurrirá mientras “algo” se desarrolla o se concluye. Ej. In the meantime vamos a tomar una certificación en Amazon.
10. **End-to-end.** Se usa para declarar todas las implicaciones y etapas de desarrollo de un sistema, producto o servicio. Ej. Microsoft otorgará una solución End-to-end para nuestro problema con los clientes.

¿Y tú qué keywords del spanglish usas y qué otras agregarías?

###### _Foto de cover por [Helena Lopes](https://unsplash.com/@wildlittlethingsphoto) de [Unsplash](https://unsplash.com/photos/1m2LQEonm2A)_
Name your Constraints
Tags: sql, sqlserver, database
Published: 2019-09-06 03:34:40

This is a short and sweet article discussing the importance of naming database constraints. It's written from the perspective of someone mostly familiar with SQL Server databases.

## What is a constraint?

Put briefly, a constraint is a database rule of some form. The various types of constraints supported by SQL Server are:

- Not Null
- Unique
- Check
- Primary Key
- Foreign Key
- Default
- Index

When these constraints are added, they define some behavior internally in the database - typically enforcing rules such as referential integrity, uniqueness, or content validation. Constraints can also have impacts on indexes in the case of key constraints and index constraints.

## Constraint Names

Constraints must have a name for database reference purposes. However, the basic SQL Syntax does not require constraint names, so in cases where a constraint is added without a name, SQL Server will automatically generate a name for you.

For example:

```sql
CREATE TABLE Resumes
(
  ID INT NOT NULL,
  Name NVARCHAR(50) NULL,
  UNIQUE (ID)
)
```

In this case, the `UNIQUE` constraint will be added with a randomized name that is something like the following: `UQ__Constrai__1234AB67C890D123`

* Note that in this example, you would more likely use a primary key, but for purposes of illustration we're using a unique constraint *

## Naming a Constraint

The problem with a constraint that has a randomized name is that it becomes difficult to drop the constraint as part of a change script down the line if the production and quality assurance databases have different constraint names to represent the same type of a constraint.

Because of that, it's important to name a constraint whenever you create it. Check the syntax for each type of constraint you're working with, but our earlier example would become:

```sql
CREATE TABLE Resumes
(
  ID INT NOT NULL,
  Name NVARCHAR(50) NULL,
  CONSTRAINT UC_ResumeID UNIQUE (ID)
)
 
```

From there, you could then drop `UC_ResumeID` by name easily, regardless of which environment the script was run on.

Once again, this is a bit of a straw man example as you'd typically use a primary key, but this should illustrate the core problems that can arise without explicitly named constraints.
บันทึกการ verify mailgun domain ด้วย domain.google
Tags: mailgun, domaingoogle, thai
Published: 2019-09-06 03:18:22

---
title: บันทึกการ verify mailgun domain ด้วย domain.google
published: true
description: บันทึกประจำวัน การใช้ domain.google กับ mailgun น่ะ
tags: mailgun, domain.google, thai
---

## ที่มาที่ไป
* ทำ campaign website ให้ลูกค้า
* ทั้งเราและลูกค้าไม่มี server
* mailgun ส่งแบบ pay as you go - ใช้เท่าไหร่จ่ายเท่านั้น
* เราซื้อ domain.google ไว้ตัวนึง

## ทำไมเลือก mailgun
ข้อดี
* ใน environment dev เราสามารถส่งได้ฟรี ไม่ต้องมี billing แต่จำกัดการส่งเฉพาะ email ที่ทำ verify ใน mailgun accoun ของเราเท่านั้น
* สามารถสร้างได้หลาย domain เอาไปใช้ได้กับลูกค้าหลายๆเจ้า
* ใช้ API key เดียวกันหมดทุก domain 

ข้อเสีย
* ตอนขึ้น production จริงๆ ต้องทำ verify domain จริง
* ไม่มี limit usage ของแต่ละ domain

อื่นๆ
* ไม่มีเวลาดูเจ้าอื่น รู้จักและใช้ mailgun มาก่อนหน้านี้

## ทำอย่างไร
1. เพิ่ม domain ใหม่ใน mailgun 
2. เอา DNS record ของ mailgun ไปใส่ใน domain
3. เข้า domain.google ตรงบนสุดกด "My Domains"
4. เราจะเห็นรายการ domain กดเลือก "Manage"
5. ด้านซ้ายมือ เลือก "DNS"
6. เพิ่ม subdomain ใน Synthetic records โดยเลือก เป็น dynamic DNS
7. เพิ่ม Custom resource records
8. type = TXT, target = subdomain, text = "ตาม mailgun"
9. type = TXT, target = pic._domainkey.subdomain, text = "ตาม mailgun"
10. type = MX, target = subdomain, text = "mxa.eu.mailgun.org" + "mxb.eu.mailgun.org"
11. type = CNAME, target = email.subdomain, text = "eu.mailgun.org"

ขั้นตอนต่อไปคือการรอ ... ประมาณ 45 นาที
ถ้า DNS ยังทำงานไม่เสร็จหรือค่าที่เรากรอกไปมีปัญหา ใช้งานไม่ได้ mailgun จะให้ไปที่หน้า verify domain ตลอด และยังใช้ domain นี้ส่งเมล์ไม่ได้
ถ้า DNS ทำงานเสร็จเรียบร้อย จะเห็นหน้า dashboard แสดงจำนวนของ email ที่ส่ง และสามารถใช้ domain นี้ในการส่วเมล์ได้เลย
Python Training Kit
Tags: python, programming, training
Published: 2019-09-06 02:48:44

The Python Training Kit is now available.  This is ideal for students and teachers of the Python Programming Language.  There is a free download that you can obtain from our website:

 https://www.siraoops.com/uploads/1/2/4/5/124593394/pythontraining.msi  

There is complete information about the program on our website.  Also there is full documentation within the program.

Download and Check it out today!

John
RealTime Perform and busking in Europe
Tags: discuss, startup, busking, help
Published: 2019-09-06 02:25:08


I'm a Software Developer, and my friend, who is a Performer, has been started working on a startup last year ([RealTime Perform](http://realtimeperform.com/)). This startup is about providing services to the buskers (street performers).

There is no law against busking in Iran, but the Islamic rulers in Iran disagree with it like many other things. 

In the recent past months, aggression is increased. They capture buskers, or if they were lucky, just their instruments.

Long story short, our startup is in an early stage, but for the reasons, I said and more, we decide to move to another country, perhaps a Europe one. We are currently negotiating with some accelerators in Europe, and we have been welcomed.

But we need to refine our business model and product before we take any further action and find out more about infrastructure and busking in Europe.

The problem is that we do not have many resources; traveling to Europe is not an easy task for Iranian citizens. Visa issuance can take months.

Unfortunately, most buskers aren't the ones who can access them online easily.
Fortunately, through Instagram and Facebook, we able to connect some of the buskers in Europe and get some information about them and their concerns.

But my ultimate goal in opening this discussion was to ask if you can help us with find and get access to communities of these people. Or even help us to access more information.

We appreciate all your help.

{% youtube XPDsTDHe6IM %}
Validating schema with Yup!
Tags: javascript
Published: 2019-09-06 01:28:15

Do you think validate types in JavaScript is boring?
Have you heard about [Yup](https://github.com/jquense/yup)? It's an amazing JavaScript lib to validate **schemas**!

Let's imagine:

We have a `list products` endpoint, which takes the `page number` and `limit` as arguments from `querystring`
```javascript
//productApi.js
const { Router } = require('express');
const productController = require('./controller');

const router = new Router();

module.exports = app => app.use('/products', router);

router.get('/', (req, res, next) => {
  const { page, limit } = req.query;
  
  if (isNaN(page) || isNaN(limit)) return res.status(400).end();
  
  productController.list({ page: Number(page), limit: Number(limit) })
    .then(products => res.json(products))
    .catch(error => res.status(400).json({ error }));
}
```

The problem is: `page` and `limit` can be `undefined` and... `anything else`... it's javascript baby.

A very efficient way is to create a middleware to validate your params using [Yup](https://github.com/jquense/yup).

```javascript
//validate.js
const yup = require('yup');

module.exports = ({ shape, path = 'query' }) => async (req, res, next) => {
  const schema = yup.object().shape(shape);

  try {
    const validData = await schema.validate(req[path]);
    req.validData = validData;
    return next();
  } catch (error) {
    return res.status(400).json({ error });
  }
};
```

After then, use on route
```javascript
//productApi.js
const { Router } = require('express');
const yup = require('yup');
const validate = require('./validate');
const productController = require('./controller');

const router = new Router();

module.exports = app => app.use('/products', router);

router.get(
  '/',
  validate({
    shape: {
      page: yup.number().default(0),
      limit: yup.number().default(15),
    }
  }),
  (req, res, next) => {
    productController
      .list(req.validData)
      .then(products => res.json(products))
      .catch(error => res.status(400).json({ error }));
  },
);
```

Of course you can create complex schemas with [Yup](https://github.com/jquense/yup). It works as you need.


I hope it helps someone!
How To Autocomplete SSH Hosts
Tags: ssh
Published: 2019-09-06 01:09:11

---
title: How To Autocomplete SSH Hosts
published: true
description: Easy script to enable SSH hosts autocompletion
tags: ssh
---

So you know about SSH config file, there are several awesome articles on the subject:

[This awesome article](https://linuxize.com/post/using-the-ssh-config-file/#ssh-config-file-structure-and-patterns)

and this one that covers some tips and tricks

{% link https://dev.to/cpu/ssh-config-tips-and-tricks-54hk %}

Now, with all of that, you still have to remember the full host entry to connect and it will not be autocompleted for you.

let's say I have the following in my config file:

```

Host unicorn-one
  HostName 1.2.3.4
  User amusallam
  IdentityFile ~/.ssh/id_rsa

Host unicorn-two
  HostName 2.2.3.4
  User amusallam
  IdentityFile ~/.ssh/id_rsa

Host unicorn-three
  HostName 3.2.3.4
  User amusallam
  IdentityFile ~/.ssh/id_rsa
```

and now I type `ssh unicorn` into terminal and hit <kbd>⇥ Tab</kbd>, it will not auto complete...

![sad gif](https://media.giphy.com/media/ZEgBHVeRlmTqjCPlqx/giphy.gif)

But fear not! for I have what your heart desires!

## Autocomplete Script

> I've only tried this on MacOs.

courtesy of this stackexchange answer:

{% stackexchange 181603 unix %}

add the following file: `/etc/bash_completion.d/ssh` whose contents:

```sh
_ssh() 
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    opts=$(grep '^Host' ~/.ssh/config ~/.ssh/config.d/* 2>/dev/null | grep -v '[?*]' | cut -d ' ' -f 2-)

    COMPREPLY=( $(compgen -W "$opts" -- ${cur}) )
    return 0
}
complete -F _ssh ssh
```

Then load that file: in your `~/.bash_profile`, add:

```sh
## load ssh autocompletion
. /etc/bash_completion.d/ssh

```

and reload by running `source ~/.bash_profile` or just terminate your terminal and reopen it.

and voila!

(The flashes you see below are me hitting <kbd>⇥ Tab</kbd>)

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

easy peasy!

## Extra helpful alias

if you want to see a list of all your hosts, you can add this alias to your `.bash_profile`:

```sh
# list all "Host" and "HostName" lines, then remove the strings: "Host " and "HostName "
alias sshhosts="grep -w -i -E 'Host|HostName' ~/.ssh/config | sed 's/Host //' | sed 's/HostName //'"

```

reload by running `source ~/.bash_profile` or just terminate your terminal and reopen it.

then you can run it:

```
sshhosts
```

from unicorn example above, this prints:

```
unicorn-one
  1.2.3.4
unicorn-two
  2.2.3.4
unicorn-three
  3.2.3.4
```
[PT-BR] Piscina 42 - Contagem Regressiva
Tags: piscine, c, community, diary
Published: 2019-09-06 01:03:37

Hello World!
Me indicaram essa plataforma para blogging e cá estou, fazendo minha primeira postagem.
Estou inscrita na Piscina de Outubro de 2019 da 42 São Paulo e a ansiedade é notória. Nesse momento os grupos dos piscineiros (ou nadadores) fervilham por causa do deferimento ou não das bolsas de auxílio. Estamos organizando a feitura de camisetas personalizadas, pensando a encomenda de marmitex, vendo moradia para quem é de fora, e pensando até o café nosso de cada dia. Alguns estudando C, alguns estudando lógica, muitos desesperados para entender o VIM e o Emacs, e alguns apenas descansando e falando de amenidades nos grupos. A cada dia que passa, vemos novos amigos entrando na piscina e alguns desistindo nesse momento. Dias 17 e 19 serão os dias de marcar presença para, então, começarmos essa aventura às 08:42 do dia 30 de setembro.
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/wpdejkzgejv0wf1yrqui.jpg)
Devlog #2: Firebase/Google Login
Tags: ionic, angular, mobile, devlog
Published: 2019-09-06 00:06:30

I didn't have as much time as I'd like today, but I was able to complete what I set out to do, so I guess that's worth something.

Today, I set up a Firebase service for my application, and integrated Google login for native devices. The main time consumer today was deploying to my Android. I was able to emulate on iOS on my Macbook just fine, but Cordova kept on giving me trouble when I tried to run the app on Android. After multiple refreshes of my PATH variables, ensuring I had the right active JDK, and multiple restarts, I found a niche solution on Github.

Apparently, when declaring the path for the Android SDK root directory, it prefers an explicit declaration. So, rather than "$HOME/Library/Android/sdk" it wanted "/Users/myaccount/Library/Android/sdk". I'm not sure whether this is a bug that only affects a few or a necessity when using the SDK; either way, it fixed the issue.

![~/.bash_profile](https://thepracticaldev.s3.amazonaws.com/i/8qoyuurnthkmhrirwkst.png)

Anyways, that's all for today. Tomorrow I'll mostly be using pen and paper(*gasp*) to draft up some basic UI/UX/Navigation structure, and getting in touch with some friends who would be potential users and getting into the specifics of what they need out of the app.
The Soft Skills of Interviewing CHEAT SHEET EDITION
Tags: career, beginners, interview
Published: 2019-09-06 00:03:21

Based on a suggestion from Andrew Harpin, here's a cheat sheet version of The Soft Skills of Interviewing! 🎉 
{% devcomment e2ci %}


If you haven't read The Soft Skills of Interviewing, go check it out!
{% link kaylasween/the-soft-skills-of-interviewing-2m1p %}


# Do your research
* Check out company's social media
* Look at Glassdoor reviews, but look for trends not individual opinions
* Think of questions to ask during the interview based on your research

# Relax, Be Kind, Be yourself
* Meditate before going to an interview
* Don't pretend to be someone you're not
* Show your nerves a bit; you're a person, not an act<sup>2</sup> 
* Interviews are a good place to find out if the company will be a good fit for you!
* Be excited and interested!<sup>1</sup>

# Interview your Interviewer
* Choose questions to ask your interviewer that will help you determine if the company, manager, and group will be a good fit for you. Here are some examples: 
    * What do you expect me to accomplish in the first 90 days?
    * What does a typical day in this position look like?
    * Do you have any reservations about hiring me for this position at this point? If so, what are they?
    * What could I learn now that would best prepare me to get started right away if I were hired?<sup>2</sup>
    * What do you like most and you dislike most about what you do?<sup>1</sup>

# ALWAYS send a thank-you note!
* Send a thank-you email within 24 hours of your interview
* Reference something you talked about in your interview to make it more personal<sup>3</sup>

##### I hope this helps! If anyone has any additional suggestions, leave them in the comments! I'll check back periodically and add them to this cheat sheet.

<sup>1</sup>{% devcomment e15g %}
<sup>2</sup>{% devcomment e18n %}
<sup>3</sup>{% devcomment e6i8 %}
Slim Docker images for your Go application
Tags: go, docker, cloud
Published: 2019-09-06 09:28:34

---
title: Slim Docker images for your Go application
published: true
tags: go, docker, cloud
canonical_url: https://andri.dk/blog/2019/09/slim-docker-images-for-golang
---

How to build a slim Docker container for your Go application using multi-stage images.

I'm using Go 1.13 and the community module proxy to build the binary and Alpine as a base image. It adds a user and group instead of running as root.

### Dockerfile

Be sure to replace "cmd/server/server.go" with your main file.

```
FROM golang:1.13 as builder

WORKDIR /app
COPY . /app
RUN CGO_ENABLED=0 GOOS=linux GOPROXY=https://proxy.golang.org go build -o app cmd/server/server.go

FROM alpine:latest
# mailcap adds mime detection and ca-certificates help with TLS (basic stuff)
RUN apk --no-cache add ca-certificates mailcap && addgroup -S app && adduser -S app -G app
USER app
WORKDIR /app
COPY --from=builder /app/app .
ENTRYPOINT ["./app"]
```

I hope this is helpful. I mostly blogged this to document it for myself.
Mindset
Tags: beginners, career, codenewbie, motivation
Published: 2019-09-06 00:00:00

---
title: "Mindset"
date: "2019-09-06"
cover_image: "https://thepracticaldev.s3.amazonaws.com/i/23lpeg9ll43jvo6gm350.jpg"
published: true
tags: "beginner, career, code newbie, motivation"
---

On of the key factors that decide if a student will be able to 'learn' a language, i.e. communicate with natives in the given language fluently, is their willingness to change their mind. And I don't mean change a decision. 
I mean, change the way they think. Change the way they approach situations and interactions.
Every language has a different way to see the world. To experience live. It's a different culture and making that culture your own, really adapt to it, is a very deep and personal journey. 

This observation was not made be me, originally. I heard it articulated by [Gabriel Wyner](https://www.goodreads.com/book/show/19661852-fluent-forever) and my own experience of teaching hundreds of students from all different kinds of backgrounds agrees with it.

After teaching German as a foreign language for 7 years fulltime, I transitioned into software development and, after a self-teaching period of ~8 month, have been employed as a front-end developer for the last 14 month.

Looking back, I notice how my mindset changed in the transitioning time. I changed the way I thought about things and I adopted to the culture of software development. 

Not only that, I took the necessary step of making it my own. Now I can say, I am a software developer. 

That is not to say, that I stopped learning. Far from it. The more I learn, the more I realize how little I know. But I am able to articulate my own ideas. Express my thoughts in code. 

That is what will make you fluent in anything. Absorb it and then, make it your own.
Create an Avatar Component in Gatsby with TypeScript Part 1
Tags: typescript, react, gatsby, graphql
Published: 2020-01-07 05:27:30

---
title: Create an Avatar Component in Gatsby with TypeScript Part 1
published: true
date: 2019-09-06 00:00:00 UTC
tags: typescript, react, gatsby, graphql
canonical_url: https://joelmturner.com/blog/avatar-component-gatsby-1
description: Part 1 of building an avatar component in GatsbyJs
cover_image: https://res.cloudinary.com/joelmturner/image/upload/v1578376114/Posts/gatsby-avatar-01.png
series: Create an Avatar Component in Gatsby with TypeScript
---

In this series, we're going to take a look at creating a simple avatar component that is typed with TypeScript and has some special goodies in Gatsby land.

> I usually write TypeScript from the start but I wanted to show each piece individually in case others aren't familiar with TypeScript yet. 

Let's start by identifying what our needs are for our avatar component. 

- [ ] Should show an image
- [ ] Should be round
- [ ] Should accept an image URL
- [ ] Should display an image based on name (for small sets)

Cool, now we can start building our avatar. Start with an img element using a placeholder image as src. Add a little bit of styling to make it round and give it a size. 

```jsx
function Avatar(props){

    const {url, altText, title} = props;

    const styles = {
        width: '75px',
        height: '75px',
        borderRadius: '50%'
    }

    return (
        <img
            style={styles}
            src={url}
            alt={altText}
            title={title} />
    );
}

export default Avatar;
```

Then we can pass it the image URL and alt text. We can see that the component is working in its basic implementation now.


```jsx
<Avatar
    url="https://res.cloudinary.com/joelmturner/monster-01.png"
    alText='Monster P. Whittington portrait'
    title='Monster P. Whittington' />
```
</Grid>

- [x] Should show an image
- [x] Should be round
- [x] Should accept an image URL
- [ ] Should display an image based on name (for small sets)

Looks good. We've met our first three criteria for this component. In part 2 we'll make it more powerful with Gatsby Image.