teleren/devto huggingface dataset:
Automating Salesforce deployments with PowerShell
Tags: salesforce, powershell, automation
Published: 2018-08-15 22:45:22

---
title: Automating Salesforce deployments with PowerShell
published: true
description: 
tags: Salesforce, Powershell, automation
canonical_url: https://manzanos-tech-blog.ghost.io/automating-salesforce-deployments-with-powershell/
---

Recently I've been learning a little bit of [PowerShell](https://docs.microsoft.com/en-us/powershell/), initially for the sake of automating some tedious tasks I had to do at work like calling a REST endpoint 10-20 times to populate some DB for testing or simply pipelining some CLI commands.

The thing is, as I got more comfortable with PS, I started to realize the huge amount of things that can be done with scripts which make our day to day easier. The biggest one that came to my mind was Salesforce deployments.

Usually, once we've finished developing a certain feature in Salesforce, we run all tests, pull all our changes from the environment where we were developing (*In Salesforce, you develop remotely, not locally*), deploy to a staging environment and run again the tests there.

The issue is that that process involves a lot of manual steps. So I decided to try and automate it. For it, I looked into the [SFDX CLI](https://developer.salesforce.com/tools/sfdxcli) and tried to reuse most of its features: an authentication command, the actual command which calls the deployment endpoint, etc.

Eventually, after a few hours, the result was this:

{% gist https://gist.github.com/Manzanit0/3908ad6ba3136fcde328a4eccdd5613f.js %}

It's a little nifty script which prompts a tab in your default browser so you log into the destination org and pipelines the deployment and the running of tests with real-time status in the console. That I did simply by polling the API.

There are, of course, many things to be improved in the script but, as a starter, it's already saving me a lot of time! :)
Function Currying, What's the use?
Tags: discuss, currying
Published: 2018-08-15 21:53:10

---
title: Function Currying, What's the use?
published: true
tags: discuss, currying
---

I've been working as a dev for a little over a year now, 
gathering experience using functional programming in JavaScript and busting out all those neat FP tricks you learn about early on, but having no clue how or where to use them.
Exploring function Currying at the moment, having read examples online but still figuring out how I can apply it in daily use.
Any discussion on function Currying uses will be fab!
Aled
Auth0 Architecture: Running In Multiple Cloud Providers And Regions
Tags: architecture, scalability, cloud, saas
Published: 2018-08-15 20:35:52

---
title: Auth0 Architecture: Running In Multiple Cloud Providers And Regions
published: true
description: Learn more about how Auth0 architects its services to ensure scalability and high availability to handle more than 1.5 billion logins per month.
tags: #architecture #scalability #cloud #saas 
canonical_url: https://auth0.com/blog/auth0-architecture-running-in-multiple-cloud-providers-and-regions/
---

Auth0 provides authentication, authorization, and single sign-on services for apps of any type (mobile, web, native) on any stack. Authentication is critical for the vast majority of apps. We designed Auth0 from the beginning so that it could run anywhere: on our cloud, on your cloud, or even on your own private infrastructure.

In this post, we'll talk more about our public SaaS deployments and provide a brief introduction to the infrastructure behind Auth0 and the strategies we use to keep it up and running with high availability.

[Read on 🏛](https://auth0.com/blog/auth0-architecture-running-in-multiple-cloud-providers-and-regions/?utm_source=dev&utm_medium=sc&utm_campaign=auth0_architecture)

![Auth0 Architecture: Running In Multiple Cloud Providers And Regions](https://thepracticaldev.s3.amazonaws.com/i/tdohldz7lox3k7980k7h.png)
A quick explanation about fast piping (-> and |.) in ReasonML
Tags: reason
Published: 2018-08-15 17:20:42

---
title: A quick explanation about fast piping (-> and |.) in ReasonML
published: true
description: Fast piping is neat! Let's de-mystify it a little bit.
tags: ReasonML
---

# Introduction

There's a neat operator in ReasonML that's called a "fast pipe" it looks like this: `->` or like this `|.`. And it allows for a nice visual flow when calling functions that take a type as their first argument (it we were using an object-oriented language, these functions might be defined as methods on an object).

# Why two syntaxes?

The new release of ReasonML `3.3.x` deprecated the use of `|.` as the fast pipe operator, preferring instead the skinny arrow syntax: `->`. We'll probably see both of them in documentation and examples for a while.

# What does it actually do?

The fast pipe takes everything on the left side of the operator, and applies the result of that expression as the _first argument_ of the function on the right side of the operator.

This sort of simulates what it feels like to call a method on an object in an object-oriented language.

For example, if we had a class `Person` in Python, with a method `greet`, that took a message as a string, we could call it like this:

`personA.greet("hello")`.

In Reason, the practice is to create a `person` type, but keep any functions that work on the `person` type as stand-alone functions that take the `person` type as the first argument. Something like this:

```
type person;
let greet = (person, string) => string;
```

See above that `greet` takes a person, and a string, and returns another string that, presumably, greets that person.

To call this in Reason _without_ fast piping, we'd do this:

```
let greeting = greet(personA, "hello");
```

But if we want to feel more like `greet` is a method instead of a standalone function, we can use the fast-pipe operator:

```
let greeting = personA->greet("hello");
/* or */
let greeting = personA|.greet("hello");
```

See how the thing on the left (personA) gets applied as the first argument of the function on the right?

This might seem marginally useful. But we really start to see the beauty once we start chaining function calls:

```
maybeSomething->Belt.Option.map(a => a)->Belt.Option.getExn
```

We end up with a calling structure that looks a bit like the 'ol JQuery method chaining pattern! This ends up being extra super convenient when working a lot with code that wraps Javascript libraries, since so many JS libraries use object methods heavily.

# In Summary

"Fast piping" is a way to conveniently call functions that take an object (or type) as their first parameter. The preferred syntax is `->`, but is also exists as `|.`. Fast piping is very useful for the APIs found in the 'Belt' standard module, and can be super duper useful when wrapping object-oriented Javascript APIs.
Setting Up Your Own Git Server
Tags: git, server, linux
Published: 2018-08-15 18:10:17

---
title: Setting Up Your Own Git Server 
published: true
description: Setting Up Your Own Git Server 
tags: git, server, linux
cover_image: http://erhankilic.org/wp-content/uploads/2015/11/git.jpg
---

This post was first published on [Setting Up Your Own Git Server ](http://erhankilic.org/post/setting-up-your-own-git-server/)

Setting up your own git server is very useful. You can set up your own git server on Vps, Vds, Dedicated servers or even on your local machine. I assume you have installed git on your Linux server.

First we need to create a git directory under the root directory. In the following code I will create a example named git server. So you can set up as many git servers as you like.

```bash
mkdir /git/example.git
```

Then in the terminal, go to the directory **/git/example.git** and write the following code.

```bash
git init --bare
```

That’s all!! We created our git server. If you want to clone you should write the following code;

```bash
git clone username@serveripaddress:/git/example.git
```

It will ask your server’s password.

If you have a local project on your computer and you want to include it in your git server, type the following code in the terminal under your project directory;

```bash
git remote add myserver username@serveripaddress:/git/example.git
git push myserver -u master
```

You can change **“myserver”** with a name whatever you want. **“origin”** is commonly used name.

When you send your commits with the push command, your server will ask for the user password.

If you want your server to take your commits and create your project in another directory when you send your commits, you must create a **post-recived** named file under the **/git/example.git/hooks** directory with **777** permission. why would you want such a thing? In your project, we assume that you have commands that do build operations like gulp. After sending your commits, you can want that your gulp processes run automatically and the your project will be ready. You can even have development and production branches run automatically in separate folders.

Edit the inside of **post-recived** file as follows.

```bash
#!/bin/bash
GIT_WORK_TREE=/home/project-directory/ git checkout -f master
```

You can set the directory location as you like.

If you are using something like composer, bower, you can arrange them to work as follows.

```bash
#!/bin/bash
GIT_WORK_TREE=/home/project-directory/ git checkout -f master
cd /home/project-directory/
php composer.phar update
cd /home/project-directory/
bower install
```
Competition with Coworkers
Tags: discuss
Published: 2018-08-15 17:55:43

---
title: Competition with Coworkers
published: true
description: How often do you feel you're competing with your coworkers?  What can you do, or what can an employer do, to make things more cooperative and supportive?
tags: discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/lcm8rkprs0z6wrft98ju.png
---

Last night's [\#DevDiscuss](https://twitter.com/search?f=tweets&q=%23DevDiscuss%20since%3A2018-08-14%20until%3A2018-08-16&src=typd) Twitter discussion on healthy company culture reminded me of one thing that has been unhealthy at some places I've worked:  the feeling that you're competing with your coworkers.

Some things that have added to this feeling in the past:

* Numerical levels added to job titles (e.g. Senior Software Engineer, Level III).
* Being a lead developer and individual contributor on the same project
* Being judged on number of tickets closed (as opposed to depth, difficulty, or importance of the tickets).
* Having to interview people for positions higher than one's numerical level
* Having people you see as more junior promoted to the same level

On the one hand, it's important to recognize experience and accomplishment.  On the other, it's probably hard to do in a way that everybody will feel is fair.

How often do you feel you're competing with your coworkers?  What contributes to this feeling?  What can you do, or what can an employer do, to make things more cooperative and supportive?
Logic of the JWT(JSON Web Tokens)
Tags: webdev, php, java, beginners
Published: 2018-08-15 17:52:01

---
title: Logic of the JWT(JSON Web Tokens)
published: true
description: We will what is the JWT and logic of the JWT.
tags: #webdev #php #java #beginners
---

In this post, we will learn what is the JWT and logic of the JWT. The IETF is designed as a standard token format. Such as validation, user identification, data integrity and information security each other multiple points.

JWT consists of 3 separate JSON pieces encoded in Base64 format. The pieces are separated by a dot (.) symbol and represent the JWT as a whole. As i said, there are 3 fields. They are **JOSE Header, Payload and Signature**.


### JOSE Header ###

JWT header information is written in JSON format and standard fields are found. You can see an example in the following.

```javascript
{
    "alg": "HS256",
    "typ": "JWT"
}
```

**Alg** means, "Specifies the cryptotic algorithm to be used to protect data integrity." and **typ** means, "Defined a JWT object".

When the JOSE header is enclosed in the token, it is encoded in Base64 format. For example, the Base64 counterpart of the above JSON heading is `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9`. The URL-friendliness of JWT is due to its use of Base64 notation.

### Payload ###

A JWT token should be unique between a token producer and a consumer. This uniqueness defines the payload or other claim information. The payload can include fields such as user ID, timeout, and user authority.

```javascript
{
  "id": "12345",
  "name": "Mert Simsek",
  "scopes": [
      "email",
      "page"
   ]
}
```

For instance, it needs to be a field like **id** to represent belonging. There are standarts for it but it is not mandatory.

### Signature ###

The last piece of the JWT, which consists of three parts, is the JWT signature. The signature part guarantees data integrity between the token manufacturer and the consumer. When creating the signature, the algorithm defined in the JOSE heading is used.

As long as, we try to create a JWT with PHP, it will be as below.

```php
$header = base64_encode("HEADER");

$payload = base64_encode("PAYLOAD");

$mixed = $header + "." + $payload;

$secretKey = "My_Secret_Key";

$signature = base64_encode(hash_hmac('sha256', $mixed, $secretKey);

$jwtToken = $mixed + "." + $signature;
```
As a result of the above operations, our JWT token output will be. You can check the generated JWT information at https://jwt.io/.

That's it, in this article, so much for now. We have learned logic of JWT.
Front-end, Back-end, Fullstack?
Tags: beginners, frontend, backend
Published: 2018-08-15 17:22:52

---
title: Front-end, Back-end, Fullstack?
published: true
description: 
tags: #beginners #frontend #backend
---
Hi there!

I have been developing front end for about a year now, I have done somethings in a backend with Node.js but never experiment more than that. After 8 months of working with Less and Bootstrap, I realized that I don't really know how to use CSS, and I really love Javascript logic more than I like HTML and CSS, lately, I been reading a lot about python and I played with it a little bit, and it seems waaaaay more fun, should I change to develop back-end? Try to be full stack?

The big question is, how do you know which is your alignment in web development, what do you like more?
Shuriken, the slack bot that gives out ninja stars (AKA Shurikens!)
Tags: slack, bot, opensource, showdev
Published: 2018-08-15 16:35:58

---
title: Shuriken, the slack bot that gives out ninja stars (AKA Shurikens!)
published: true
description: I built a slack bot, and I'm excited to share it
tags: slack, bot, opensource, showdev
---

You've probably used [plusPlus](https://plusplus.chat) on slack. And you've probably loved it like I did! It's extremely simple and it helped our team become more interactive and promoted healthy competition. It was extremely easy to use, if someone helped you or you liked something they shared you typed `@thatCoolSlacker ++` and they got a point, and if you didn't you typed `@thatNotSoCoolSlacker --` and they lost a point. You could also do it for things: `@Beer ++` or `@Work --`.

Over the past few months plusPlus became unresponsive at times. It worked some of the time and didn't most of the time. I reached out to the plusPlus team asking what's going on, I got a response that they are working on it and hopefully it should be fixed some time soon. So I thought, why not actually build a clone and learn about slack bots in the process!

[**And so I did!**](https://github.com/ahmed-musallam/shuriken)
**introducing [**Shuriken**](https://github.com/ahmed-musallam/shuriken) the bot that gives you ninja stars!**

 Now, this is very much an early stage side project of mine and currently supports one bot instance per workspace. And you have to host it yourself. But I learned a lot and wanted to share it with the community.

Go check it out! read the docs and contribute if you want! maybe at some point I will find the time to make this a real product!

Also, I need recommendations on responses the bot should send when it sees a `++` or `--`.

Here are sample screenshots of Shuriken responses:

When you invite Shuriken into a channel:

![](https://thepracticaldev.s3.amazonaws.com/i/i6y41s0zm11w3xdhubk4.png)

When you plus or minus someone:

![](https://thepracticaldev.s3.amazonaws.com/i/ra0jz23at5n02dw6trt8.png)

When you ask Shuriken to show ranking:

![](https://thepracticaldev.s3.amazonaws.com/i/fe3nv5j4q8cpiy1jtsme.png)

Let me know what you think, and feel free to star the repo (if you like it. of course) :)
How Do You Really Get Hired?
Tags: career, beginners, discuss
Published: 2018-08-15 13:09:28

---
title: How Do You Really Get Hired?
published: true
description: 
tags: #careers #beginners #discussion
---

According to an article on http://www.mrinetwork.com, "Through 2026, 253,400 software developer positions will open." With more and more Bootcamp graduates flooding the field, how do we actually get our foot in the door? 

There are a plethora of articles on the demand for Developers and Engineers in addition to the tons of online coding schools popping up everywhere but positions are rarely targeted to us. 

There is a lack of Junior Dev positions and if there are any internships available, there are always targeted to recent Computer Science grads from four-year universities. You go to tech conferences, with career fairs and employers won't even budge at you without a CS degree. 

Is there really a lane for Bootcamp graduates, if so how can we turn that one lane highway into a two-lane highway to help others get their foot in the door. 

Thoughts?
Diagnosing Init Script Issues
Tags: automation, linux, troubleshooting
Published: 2018-08-15 14:49:05

---
title: Diagnosing Init Script Issues
published: true
tags: automation,Linux,troubleshooting
canonical_url: https://thjones2.blogspot.com/2018/08/diagnosing-init-script-issues.html
---

Recently, I've been wrestling with some COTS software that one of my customers wanted me to automate the deployment of. Automating its deployment has been... Patience-trying.  
  
The first time I ran the installer as a boot-time "run once" script, it bombed. Over several troubleshooting iterations, I found that _one_ of the five sub-components was at fault. When I deployed the five sub-components individually (and to different hosts), all but that one sub-component failed. Worse, if I ran the automated installer from an interactive user's shell, the installation would succeed. Every. Damned. Time.  
  
So, I figured, "hmm... need to see if I can adequately simulate how to run this thing from an interactive user's shell yet _fool_ the installer into thinking it had a similar environment to what the host's init process provides." So, I commenced to Google'ing.

[![Commence to Googlin'](https://i.ytimg.com/vi/kroEiX5tkE0/0.jpg)](https://www.youtube.com/embed/kroEiX5tkE0)

Eventually, I found reference to `setsid`. Basically, this utility allows you to spawn a subshell that's detached from a TTY ...just like an init-spawned process. So, I started out with:  
  

```
     setsid bash -c '/path/to/installer -- \
       -c /path/to/answer.json' < /dev/null 2>&1 \
       | tee /root/log.noshell
```
  
Unfortunately, while the above creates a TTY-less subshell for the script to run in, it still wasn't quite fully simulating an init-like context. The damned installer was still completing successfully. Not what I wanted since, when run from an init-spawned context, it was failing in a very specific way. So, back to the almighty Googs.  
  
Eventually, it occurred to me, "init-spawned processes have very different environments set than interactive user shells do. And, as a shell forked off from my login shell, that `setsid` process would inherit all my interactive shell's environment settings. Once I came to that realization, the Googs quickly pointed me to `env -i`. Upon integrating this nugget:  
  

```
     setsid bash -c 'env -i /path/to/installer -- \
       -c /path/to/answer.json' < /dev/null 2>&1 \
       | tee /root/log.noshell
```
  
My installer started failing the same when launched from an interactive shell as from an init-spawned context. I had something with which I could tell the vendor, "your unattended installer is broken: here's how to simulate/reproduce the problem. **FIX IT**." I dunno about you, but, to me, an "unattended installer" that I have to kick off by hand from an interactive shell really isn't all that useful.
Ajax Live Search With PHP And MySQL
Tags: php, ajax, html, mysql
Published: 2018-08-15 14:27:14

---
title: Ajax Live Search With PHP And MySQL
published: true
description: Ajax Live Search With PHP And MySQL
tags: #php #ajax #html #mysql
---

Today, In this tutorial we are going to discuss <a href="https://www.skptricks.com/2018/04/ajax-live-search-with-php-and-mysql.html">how to create php ajax live search box using MySQL database</a>. Now a days every website has integrated this kind of search feature. This search box populate the results in real time from MySQL database based on entered text in search box.

<a href="https://www.skptricks.com/2018/04/ajax-live-search-with-php-and-mysql.html">Ajax Live Search With PHP And MySQL</a>

<img src="https://3.bp.blogspot.com/-_16DE66GSSo/WsBqEkd0gmI/AAAAAAAABbI/As4GFNrh_VEZQScTJa-K81c9g29UUzxGgCLcBGAs/s400/output_n66BWO.gif" />

We have implemented this ajax live search box demo using php pdo connection. When user enter any text in search box and click on search button, Then it will send the request to "controller.php" page, with the help of ajax call and display the realtime search result in "search.php" page. Check out our blog archive on the topic if you’re looking to learn about Ajax Search Box in PHP, MySQL and JQuery.

Learn how To Integrate Live Search In PHP And MySQL With JQuery : 
Lets see the complete example to create live ajax search box.

{% youtube nCricjq5BCI %}

<a href="https://www.skptricks.com/2018/04/ajax-live-search-with-php-and-mysql.html">Download Code</a>
Dev.To Discord Channel?
Tags: discuss
Published: 2018-08-15 13:38:09

---
title: Dev.To Discord Channel?
published: true
description: possibility of a discord channel?
tags: discuss 
---

So not sure if this has ever been brought up before or not. But thought it might be of some interest. Has there been any thought of setting up a official dev.to discord channel. I feel like it would be a nice way to meet others in the community out side the site. And essentially have a new place to hang out and talk as well as ask questions ect. What do you guys think?