teleren/devto huggingface dataset:
Configure Path variable in Powershell
Tags: powershell, windows, java
Published: 2019-12-04 14:35:48

Scenario: for whatever reason you have to develop on a Windows machine and you're not an administrator. Your company enforces the same old Java version on all machines, but you want to try out a more recent one.
After you download a JDK binary distribution in a folder of your choice, it's really easy to set up your IDE to work with that, but what if you want to run Java from Powershell?
Typically your machine will be set up with a system Path variable which points to the old Java version, and that cannot be changed. You try to change the Path in your user variables adding the location to your brand newly downloaded JDK. Hooray right?

Well... no 😥

It turns out that user Paths are postponed to system Paths, and when looking for an executable Windows picks the first match.

Luckily for us, it turns out there's a workaround for that! Similarly to bash with its `.bashrc` file, Powershell supports init scripts.
To create an init script, run this command from Powershell:

```powershell
New-Item $profile -Type File -Force
```

Go to your Documents folder, you'll find a new `WindowsPowerShell` subfolder which contains a Powershell script named `Microsoft.PowerShell_profile.ps1`. Edit that file and add a line like this:

```powershell
 $Env:Path="C:\Users\my-user-name\apps\my-jdk-folder\bin;"+$Env:Path
```

Save and open a new Powershell instance: the script will run automatically when a new shell instance is created. Now you can see the new Path variable with the following command:

```powershell
echo $env:Path
```
What do you really want from your employer? 
Tags: career
Published: 2019-12-04 14:34:02


I am working with companies that are in need of software developers and the market is so tight at the moment, yet we do see candidates change from one company to another, but also great loyalty (which of course is great).

I have the privilege of in-depth dialogues with start-ups and early growth companies and we discuss what is important for them to offer software developers in order to attract new candidates but also to keep them loyal over time. 

What are the five most important things an employer can offer a software developer in order to attract and keep the employee? 

I would really appreciate a feedback from this great forum. 

 #recruitment #norway #career
How To Redirecting All Traffic To Netlify
Tags: html, javascript, netlify, hosting
Published: 2019-12-04 14:09:39

## **Redirecting In Netlify**
When we deploy a site in Netlify everything works pretty fin but when it comes to routing there are some errors like when we navigate to **Blog** page in a site it takes us to `yoursite.com/blog` that's fin. But! When we refresh that same page then we see this screen.

![Errror](https://res.cloudinary.com/phonerefer/image/upload/v1575466406/vjb3zsaguktyk36rnkwh.png "Error")

### To solve this problem
Thankfully,Netlify provides us a way to do this via a `_redirects` file. You need to make sure that this file sits at the root of your build directory.

### So what to do?
Just create a new file with the name of `_redirects` and put this file in the root folder of your site. Then after add below code in that file. That's it
```
/* /index.html 200
```
> Above line states that we want all paths redirected to `/index.html` with response of 200.

<hr>

## Even you can redirects and rewrites
Add one or more redirects tables to your Netlify configuration file. This method allows for more structured configuration and additional capabilities, as described in the Netlify configuration file syntax section below.
```
home                     /
/blog/my-post.php        /blog/my-post
/news                    /blog
/cuties                  https://www.yoursite.com
```
You can customize and alter the redirect behavior by adding options to the end of each line. Visit the redirect options and rewrites and proxies docs for more details.

### Syntax
`from`: The path you want to redirect.
`to`: The URL or path you want to redirect to.
`status`: The HTTP status code you want to use in that redirect; 301 by default.
Day 17 of⚡️ #30DaysOfWebPerf ⚡️: Coverage tool
Tags: webperf, performance, webdev, devtools
Published: 2019-12-04 14:02:02

{% twitter 1202226025687633925 %}
{% twitter 1202226026878840832 %}

---

This article was originally published on [sia.codes](https://sia.codes/). Head over there if you like this post and want to read others like it, or sign up for my [newsletter](https://buttondown.email/sia.codes) to be notified of new posts!
What new skills have you learned in 2019?
Tags: discuss
Published: 2019-12-04 13:38:49

This year, I have learned so much as a web developer that I cannot completely make the list.
Last year, I knew mostly Node.Js (and I had barely started to scratch the surface) so I knew barely anything in front-end. This year, after having learned of GIS development (ArcGiS API, Leaflet), I learned ReactJS, Webpack, SCSS, many design patterns and best practices, ...
I feel like a new person, and I am excited by the idea of everything I could learn in 2020.

And you ? What skills have you learned this year ?
I [THING ABOUT YOU OR THING YOU ARE], Ask Me Anything!
Tags: ama
Published: 2019-12-04 13:35:16

I have started to learn Algorithm through
https://www.coursera.org/learn/algorithms-part1/home/welcome

Initial Week 1 and Week 2 contents, I am finding very tough to understand especially the Order of growth concept.

But, I want to become pro at Algorithms and DataStructures
Jekyll is slow... Liquid is awesome
Tags: jekyll, liquid, ssg
Published: 2019-12-04 13:30:36

---
title: Jekyll is slow... Liquid is awesome
published: true
description: Template syntax to use?
tags: jekyll, liquid, ssg
---

I am learning Hugo... I love the way it is fast but its templating syntax is just horrible... Jekyll is slow compared to Hugo but Jekyll template syntax Liquid makes it fun to develop static sites using Jekyll... your thougths?
Angular 9|8 Responsive Carousel Examples
Tags: angular, angular98, responsivecarousel, angularresponsivecarousel
Published: 2020-02-01 19:06:33

---
title: Angular 9|8 Responsive Carousel Examples
published: true
date: 2019-12-04 13:22:42 UTC
tags: Angular , Angular 9|8, Responsive Carousel, Angular Responsive Carousel
canonical_url: https://www.positronx.io/angular-responsive-carousel-examples/
---

The post [Angular 8/9 Responsive Carousel Examples](https://www.positronx.io/angular-responsive-carousel-examples/) appeared first on [positronX.io](https://www.positronx.io).

**A comprehensive step by step tutorial on building responsive Carousel in Angular 9 application with NgBootstrap package.**

Carousels are used on the front of the web or mobile applications, Carousels are cool and helpful in displaying image galleries, sell products, show related content, showing repetitive content, attract the attention of new visitors

[Click here to read more](https://www.positronx.io/angular-responsive-carousel-examples/)
TVH IT joined Dynamics Power
Tags: salesforce, dynamics365, microsoft
Published: 2019-12-04 13:08:06

Saturday 16th of November TVH IT joined Dynamics Power! In Brussels, where Microsoft and KPMG customers and partners gathered to join the community conference for Dynamics 365 and the Power Platform.

The day kicked off with a keynote by James Phillips, Corporate Vice President at Microsoft. The keynote highlighted some recent additions to the Power Platform. Microsoft Flow was rebranded to Power Automate and gave birth to a new trendy baby: UI Flow. This is an RPA — Robotic Process Automation — feature which allows for automating repetitive manual tasks through a task recorder. Another interesting one is Power Virtual Agents, virtual agents based on AI to assist employees and customers. Integrating Virtual Agents to the platform is responding to the growing need for self-service. Although most of it was still in preview, we could see some nice use cases demonstrated.

The rest of the day consisted of over thirty deep dive sessions spread over six tracks covering Customer Engagement, PSA, Field Services, Talent, Finance & Operations, Business Central, Adobe Marketing and of course the Power Platform.
We were inspired by the lessons learned of an international roll-out, a hot topic for our IT organization since we are taking the next steps in rolling out our Q.one system. Q.One is based on the vision of ‘think global — act local’, a demand-driven way of allowing all TVH Equipment/mateco branches worldwide to work in the same way on the same system and serve our customers in a future-proof way. The conclusions confirmed that — besides the technical expertise and know-how — the change management capabilities of an organization are crucial to be successful. And that’s where we can learn from these Japanese principles supporting effective change:

Hoshin: Hoshin is a method for policy development aiming at ensuring that the strategic goals of a company drive progress and action every level within the company.

Nemawashi refers to the informal process of quietly laying the foundations for change

Genchi Genbutsu is an advise to go see the locations and their conditions, the source, to understand and solve problems faster and more effectively.
#7DaysJS: myElement + n
Tags: javascript, challenge, beginners
Published: 2019-12-04 12:47:28

---
title: #7DaysJS: myElement + n
published: true
date: 2019-12-04 12:25:00 UTC
tags: javascript, challenge, beginners
canonical_url: https://lautarolobo.xyz/blog/7-days-of-js-myelement-plus-n/
description: How we can sum an element to all the elements inside an array, one by one?
cover_image: https://lautarolobo.xyz/images/7daysJS-7f7d8328.webp
---

Welcome to day 6 of 7 Days of JavaScript!

Let’s see, I got a nice one for today.

Given an array and a number `n`, return the array with each element summed to `n`.

Here’s an example:

```java
sumToArray(5,[1,2,3,4])
...
[6,7,8,9]
```

If you want, you can also return the output as a string - If that makes it easier for you, it’s OK.

You can check out the solution algorithm [here](https://lautarolobo.xyz/blog/solution-to-day-6-of-7-days-of-js/ "Solution to Day 6 of #7DaysofJS").
El Carrillon: playing MIDI songs on an 18-bell tower with a Raspberry Pi and Smalltalk
Tags: iot, raspberrypi, coding, smalltalk
Published: 2019-12-04 12:05:42

---
title: El Carrillon: playing MIDI songs on an 18-bell tower with a Raspberry Pi and Smalltalk
published: true
date: 2019-12-04 11:49:56 UTC
tags: IoT,RaspberryPi,Coding,Smalltalk
canonical_url: https://marianopeck.blog/2019/12/04/el-carrillon-playing-midi-songs-on-an-18-bell-tower-with-a-raspberry-pi-and-smalltalk/
cover_image: https://marianopeck.blog/wp-content/uploads/2019/12/20190815_215432_devto.jpg
---

Some time ago [I blogged about a fantastic project Gerardo Richarte and I were doing with an 18-bell tower located in Argentina](https://dev.to/martinezpeck/developing-testing-and-mocking-the-largest-midi-instrument-of-the-world-with-a-raspberry-pi-and-a-diy-leds-piano-7el).

Back then, I showed some details of the architecture, code, and how I mocked-up “El Carrillon” with a homemade LED piano so I could test it at home.

In this post, you will see it running live and read some great news about the project!

### Playing live at “La Fiesta Nacional de la Flor”

“El Carrillon” had to play not only during my LED piano testing, but also on the real hardware with real bells during a huge event last November called: [“La Fiesta Nacional de la Flor”](http://www.fiestadelaflor.org.ar/web/).

We first started testing at home with the real hardware, but without the bells to confirm the GPIOs were responding correctly:

{% twitter 1162360670362460162 %}

Once that was working, the next obvious step was to move to production and test with physical bells!! The mechanical/hardware part of some bells needed repair, so it took some time until we were able to test in-person. Once we did, everything worked as expected and without much trouble.

Deploying was really easy thanks to the “image” concept of Smalltalk and [a few bash scripts that we had prepared](https://github.com/gerasdf/carrillon/tree/master/scripts).

The good news is that it worked and was a huge success, see below:

{% twitter 1186979011681030144 %}

### Won 3rd place at the Innovation Technology Awards at ESUG 2019

We presented this project at the [Innovation Technology Awards at ESUG 2019](https://esug.github.io/2019-Conference/awardsSubmissions.html) held in Koln, Germany. Below is the teaser video we submitted before the competition:

{% youtube mP-7XB4fnao %}

Our efforts were worthwhile as we won 3rd place! Thanks to all that voted for us!

{% twitter 1167051883896352770 %}


## Conclusion

I personally believe this was a great example of using IoT and Smalltalk. We used [VAST (VA Smalltalk)](https://www.instantiations.com/products/vasmalltalk/) for managing the GPIOs, running the web application, and all within a Raspberry Pi Zero.

VAST has great development and debugging tools, minimal Smalltalk images, good GPIO libraries, and excellent ARM support.

Let’s do more IoT projects with Smalltalk!!!

PS: The official Raspberry Pi twitter account did like our project! :)

{% twitter 1199306239420837888 %}
What are your blogging stats?
Tags: discuss, blogging, motivation
Published: 2019-12-04 11:48:58

---
title: What are your blogging stats?
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ykb43cb8ih3svzsp4bfh.jpg
published: true
description: What are your numbers? Followers, Views, Reactions?
tags: #discuss, #blogging, #motivation
---


I am getting close to **one year of blogging** and I have mixed feelings about it.  
Is it worth the time? Is it going well or is it a failure? 

I had some _exciting_ times when some posts received **10K+** views, but sometimes it was a bit _frustrating_ seeing that a post that took me 3-4 hours to write then was read by less than 100 views. 

So now I am really curious about your stats.  

>How many followers do you have?
How long do you take to write a post in avarage?
How many views and reactions do you have in total?
What was the post that was best acclaimed?
Which one was the the post that you think deserved more views?


Photo by [Carlos Muza](https://unsplash.com/@kmuza?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on Unsplash
Debouncing in Javascript
Tags: javascript, beginners, webdev, tutorial
Published: 2019-12-04 11:22:35

Debouncing is a very good to have feature, when user is expected to do a particular action very very quickly, such as typing a product name for searching in an e-commerce site.

Imagine on each key press the client code makes and API call for fetching the suggestions to be shown in the search result, these are so many api calls, to avoid this situation of making so many api call we can implement debouncing.

### Debounce Algo:

1. Call a function on user action after a delay time
2. Clear the previous delay time on the next action if the action is performed before that delay time
3. Make use of `setTimeout`

### Simple Code:

```html
  <input id="debounce-input" />
```
```js

// debounce logic
var timer = null;
const debounce = (actionHandler, delay) => {
  if (timer) {
    // clearing timer
    clearInterval(timer);
  }
  timer = setTimeout(actionHandler, delay);
};

// some costly function
const fetchDataFromAPI = () => {

  //here you can put your fetch logic

  console.log("fetchData");
};

// event binding to input
const elem = document.getElementById("debounce-input");
elem.addEventListener("input", e => {
  debounce(fetchDataFromAPI, 1000);
});
```

This is very simple implementation of Debounce just to give the idea that it can be achieved very easily.

*One can use closures to move global variables inside the function*

**We should avoid including big libraries just for using small functionality like this**
How To Test Custom Effect Hook - Custom Hooks ReactJS Mini Course Part 5
Tags: react
Published: 2019-12-04 10:50:40

---
title: How To Test Custom Effect Hook - Custom Hooks ReactJS Mini Course Part 5
published: true
description: Welcome to ReactJS Custom Hooks Mini Course. In this course we'll learn how to create custom hooks in React, how to test them using React Testing Library and how to publish them as a standalone npm package.
tags: react
series: Custom Hooks ReactJS Mini Course
---

{% youtube 9zztz_Eh2sA %}

Welcome to ReactJS Custom Hooks Mini Course. In this course we'll learn how to create custom hooks in React, how to test them using React Testing Library and how to publish them as a standalone npm package.

Course playlist: http://bit.ly/35FHALa
Subscribe to the channel: http://bit.ly/2QZ2UY3
FlutterVN newsletter #6
Tags: fluttervnnewsletter, flutter, androiddev, iosdev
Published: 2019-12-04 10:45:49

Flutter Interact event next week; automate CI/CD in Github, Gitlab, CodeMagic; 10 helpful tools for Flutter; and more…

For more details, read this articles on Medium: https://medium.com/fluttervn/fluttervn-newsletter-6-e1ed268745c8?sk=02771713716273655bcbe0e15fbd3615
Localbitcoins Clone Script | To Start Website Like Localbitcoins
Tags: localbitcoinsclonescript, localbitcoinswebsiteclone, localbitcoinsclone, localbitcoincloneapp
Published: 2019-12-04 10:30:53

Local Bitcoin Clone Script | LocalBitcoins Website Clone Script | BlockchainAppsDeveloper

Blockchainappsdeveloper is a leading Cryptocurrency Exchange Platform Development Company, offering a highly secure trading platform to the users for cryptocurrency exchange. We also provide Cryptocurrency Exchange Clone Scripts like LocalBitcoins Clone Script to start Cryptocurrency exchange websites like LocalBitcoins.

Startups who wish to buy as same as like Localbitcoins clone business framework can buy our Localbitcoins Clone Script which is one among few clone scripts where the users can post their advertisements.

Localbitcoins is a popular Peer to Peer Cryptocurrency exchange platform. Your users can buy and sell any cryptocurrency and pay the concerned party with fiat or any other cryptocurrency needed. In this platform, your customers can buy and sell Local Bitcoin and other cryptocurrencies in a simple way. Here, the users can trade in fiat to crypto or cryptocurrency to cryptocurrency.

You can get our Local bitcoin clone script, where we set up you the trading platform to buy and sell cryptocurrencies via P2P trade on a secured blockchain. As known, it is a popular Bitcoins marketplace that allows users to post advertisements and request to buy or sell bitcoins.

WHY SHOULD YOU GET OUR LOCALBITCOINS CLONE SCRIPT?

- In recent time, Bitcoins and cryptocurrencies are becoming a buzz word and is drawing attention in many Startups and Corporates by modifying the business model according to the technology.

- So coming here, Localbitcoins is revolutionizing the way people trading cryptocurrencies locally (Peer to Peer) thereby, removing the barrier in the buy/sell process. The platform has a great feedback system and dispute resolution making the users gain trust to trade on the platform.

- We provide over-the-counter(OTC) trading of any fiat currency for cryptocurrencies. Users post advertisements on the platform, they also choose the exchange rates and payment methods for buying or selling cryptocurrencies.

 Get Free demo for LocalBitcoins Clone Script - https://www.blockchainappsdeveloper.com/localbitcoins-clone-script
Psst, you can empower the designers on your team
Tags: design, showdev, beginners, productivity
Published: 2019-12-04 10:16:41


Tips from a frontend developer to another.

This zine is based on the article [How Frontend Developers Can Empower Designer’s Work](https://www.smashingmagazine.com/2019/10/frontend-developers-empower-designers-work/) that I wrote for Smashing Magazine a few months ago. At the bottom, you can check the written version but for now check out the illustrative version! Feel free to [download the printable version](https://github.com/sandrina-p/sketching/tree/master/zine_empower_designers).



![Cover](https://thepracticaldev.s3.amazonaws.com/i/c2tpj39n78w4tppsxbgk.png)
![Page 1-2](https://thepracticaldev.s3.amazonaws.com/i/2sxjw4rx06pvgzybhsmi.png)
![Page 2-3](https://thepracticaldev.s3.amazonaws.com/i/ynejdv648858ge3hv8tu.png)
![Page 3-4](https://thepracticaldev.s3.amazonaws.com/i/k6oh0iz2o99hrt3z8zp9.png)
![Back](https://thepracticaldev.s3.amazonaws.com/i/8agtkz9k2gwm49rohxc9.png)

And now the written version:


## Look beyond your code editor
Remember these design principles when implementing user interfaces:
- Hierarchy
- Alignment
- Spacing
- Contract

## Teach them code, not how to code.
Show to designers the joy of tweaking visuall stuff in the browser.

### Dev Tools
Refine layouts, fonts, spacings and animations.

### Code Playgrounds
Explore and tweak on [Codepen](codepen.io/) or [Glitch](glitch.com/)


## Include each other in the process
Ask designers to include you in their design process and include them in the development process as well.

You'll discover they do much more than _"make things pretty"_.

They'll better understand the web constraints and why a feature takes time to implement.

## Have doubts about the design specs? Ask First!
Do not let assumptions turn into bad decisions. You’ll be risking the trust the designers put on you.

Whenever in doubt, reach out and clarify the specs. This will show designers that **you care as much as they do.**

## Don’t make workarounds by yourself
When a designer asks you to implement a tricky design, don’t say _“It’s impossible”_ nor try to implement a cheap version of it.

Explain to them, in simple terms, the constraints and be open to collaborating on a new solution.

## Go off-the-record once in a while
We all have tasks to deliver and roadmaps to finish. However, some of the best work happens off-the-record.

Go sneak into their workspace and explore new things. You never know what can come from there!

## Let designers be picky
What it truly means to be picky:

- Choose with care
- Ensure cohesion
- Create the best

**be picky together <3**

---

Thank you for reading!
Automate Nginx conf file validation using Docker
Tags: docker, nginx, devops
Published: 2019-12-04 18:31:23


---
title: Automate Nginx conf file validation using Docker
published: true
date: 2019-12-04 10:00:00 UTC
tags: [docker,nginx,devops]
cover_image: https://thepracticaldev.s3.amazonaws.com/i/q38p0fxxoic3o9vtl2p4.png
canonical_url: https://devkamboj.in/nginx-configuration-file-validation-using-docker
---

Nginx is an open-source web server, HTTP cache, reverse proxy server, and load balancer and is used by over 50% of the world’s busiest websites. And Docker with Nginx is a perfect combination to automate your app deployment.

Automated testing is an integral part of CI/CD pipelines. It would be nice to have one more check for the Nginx config file.

Automating Nginx configuration file validation using docker.

```bash
docker run -v $pwd/config:/data/ --name check-nginx-conf -t -a stdout nginx:latest nginx -t -c /data/nginx.conf
```

# What’s happing here:

- **-v $pwd/config:/data/** : bind your **$pwd/config** to **/data** inside the container. Make sure you have nginx.conf inside config folder and other directories that your config file is using ext SSL folder.
- **—name check-nginx-conf** : Name of the container.
- **-t -a stdout** : Attach to standard stream stdout to get the logs.
- **nginx:latest** : Nginx Image version.
- **nginx -t -c** : **-t** to validate the config file and **-c** to use an alternative configuration file instead of a default file.

Your should see this output if your config is valid[![nginx-conf-valid-output](https://devkamboj.in/static/ab2c6b9b4471c5888a7a2018b560e004/913fc/nginx-conf-valid.png "nginx-conf-valid-output")](/static/ab2c6b9b4471c5888a7a2018b560e004/bf492/nginx-conf-valid.png)

Further, you could use grep command to check if **test is successful**

```bash
docker run -v $pwd/config:/data/ --name check-nginx-conf -t -a stdout nginx:latest nginx -t -c /data/nginx.conf | grep "test is successful" | wc -l
```

grep **“test is successful”** will return the line which contains **test is successful** and **wc -l** to count the number of lines.

if the syntax is valid, you will get 1 otherwise 0