teleren/devto huggingface dataset:
Customize Your VS Code Icon
Tags: editor, vscode, code, programming
Published: 2017-10-27 14:15:53

---
title: Customize Your VS Code Icon
published: true
description: 
tags: Editor, vscode, Code, Programming
---

(Or any application icon, for that matter.)

The orange Visual Studio Code icon seemed to rub a lot of people the wrong way. So much so, Microsoft is [changing it](https://code.visualstudio.com/blogs/2017/10/24/theicon) in the next release.

Some folks were so displeased with the "pumpkin spice" icon, they started replacing it with something else.

I came up with a couple of my own variations, reminiscent of our old MS Office friend, Clippy.

![](https://thepracticaldev.s3.amazonaws.com/i/43qq4terwnwcr8s4gbay.jpg)

You can download the files for Windows or Mac at: https://github.com/reverentgeek/vs-code-icons

Let me know if you have any suggestions or requests for your own custom icons!

## How to change an application icon on macOS

* Download or clone the [GitHub repository](https://github.com/reverentgeek/vs-code-icons)
* Open the desired .iconset folder
* Double-click on the largest .png file to open in Preview
* Press CMD+C to copy the image to your clipboard

![](https://thepracticaldev.s3.amazonaws.com/i/5lqz9iyq512ogjc60dmu.jpg)

* Open your Applications folder
* Right-click on the Visual Studio Code application
* Click "Get Info"

![](https://thepracticaldev.s3.amazonaws.com/i/tdly96yyf1srkxou81d7.jpg)

* Click on the application icon in the top-left corner
* Press CMD+V to paste the custom image

![](https://thepracticaldev.s3.amazonaws.com/i/ezr7mz1mm375l7nd5bjx.jpg)

You are now operating in beast mode.

## How to change an application icon on Windows

While it is technically possible to change an application's icon in Windows by carefully modifying the `.exe` file (not for the faint of heart!), the only practical thing you can do is change the shortcut. 

* Download or clone the [GitHub repository](https://github.com/reverentgeek/vs-code-icons)
* Launch the VS Code application
* Right-click the running application and pin the application to your taskbar (if you haven't already)
* Close the application
* Shift+Right+Click the pinned application on the taskbar
* Click "Properties"

![](https://thepracticaldev.s3.amazonaws.com/i/mjce4hpsuauki2s8ye5c.jpg)

* Click the "Change Icon" button

![](https://thepracticaldev.s3.amazonaws.com/i/o75ad7ez4afijn1uwej2.jpg)

* Click the "Browse..." button

![](https://thepracticaldev.s3.amazonaws.com/i/e7v0o49u2tn1d6o1sy6q.jpg)

* Locate the desired `.ico` file and click "Open"

![](https://thepracticaldev.s3.amazonaws.com/i/7z8v4imcdvkg9dkfrimt.jpg)

At least your pinned application looks awesome!
Today I Learned: About Docker Volume
Tags: docker, volume, todayilearned
Published: 2017-10-27 11:51:03

---
title: "Today I Learned: About Docker Volume"
published: true
description: A short introduction.    
tags: docker, volume, todayilearned
---

![Docker Volume](https://thepracticaldev.s3.amazonaws.com/i/85wf0mwwix360i3xjckw.png "Docker Volume")



In my experiements on running Jenkins on Docker, I wondered how the volumne worked when I provided `-v` to the run command. 

I found a great article which succintly explains a lot about the Docker Volume - which will be handy for any docker beginer. 

Original article is [here][DockerVol]

My summary goes below: 

- Docker Volume is the way to _persist data between container restarts_ and _share it between containers_. 
- A volume is stored on the host file system. Usually within obscure directories inside `/var/lib/docker`. However, a specific directory on host system can also be mounted as volume in a container. 
- Volumes can be managed using `docker volume` and its sub commands. 
- Docker won't delete volume unless specifically instructed to do so. This can result in stale data on the host system. So tidying up once in a while might come handy. 
- **Important Caveat** - Don't try to modify the content of the volume in the Dockerfile (via RUN) as each build step creates a *new* volume and your changes will be discarded. If you want to change the volume content, do so using the *ENTRYPOINT* command in the Dockerfile. Have a look at this [link][SOL]. 
- If you are looking for a thorough overview of different approaches to manage application data, including the use of **Volume, Bind mounts, tmpfs mounts**, read this [longer article][Voluminous]



*Image Credit: https://docs.docker.com/engine/admin/volumes/images/types-of-mounts-volume.png*

[DockerVol]:http://container-solutions.com/understanding-volumes-docker/
[SOL]: https://stackoverflow.com/a/34843099/7007521
[Voluminous]: https://docs.docker.com/engine/admin/volumes/
Php ZipMaster - Zip files and folders with php
Tags: php, zip
Published: 2017-10-27 07:31:27

---
title: Php ZipMaster - Zip files and folders with php
published: true
description: You can create zip with folders or files. We don't have to think about the folders anymore.
tags: php, zip
---

Hello to everyone. This is my first article. If there are any mistakes, please do not look up.

Compressing files in PHP and creating a zip file is easy, but the situation changes when you include folders into the job. You may want to automatically back up the files on your server like me and you may want to have a solution for it. I have a vps with a lot of sites and I want these sites to be automatically backed up. My solution is to write a script in PHP creates a cronjob.

It is simple to use and you can use it as you like. Please do not hesitate if you want to improve.

Sample use;

*<?php*

*include 'ZipMaster.php';*

*$zip = new ZipMaster\ZipMaster('backup/test.zip', 'test_folder');*
*$zip->archive();*

You can reach the project [here](https://github.com/erhankilic/ZipMaster).
JavaScript advanced feature with resource links(mostly useful for UI Interview)
Tags: advancedjs
Published: 2017-10-27 09:44:14

---
title: JavaScript advanced feature with resource links(mostly useful for UI Interview)
published: true
description: Summarizing advanced JS features
tags: #advancedJS
---

Hello Everyone!

Here I am summarizing advanced/interesting(mostly asked during interview) features with easy to understand online resources.

#1. Closure:

A closure is the combination of a function and the lexical environment within which that function was declared.
a. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures
b. https://javascript.info/closure



#2. Promise:

A Promise is a proxy for a value not necessarily known when the promise is created. It allows you to associate handlers with an asynchronous action's eventual success value or failure reason. This lets asynchronous methods return values like synchronous methods: instead of immediately returning the final value, the asynchronous method returns a promise to supply the value at some point in the future.

a. https://developers.google.com/web/fundamentals/primers/promises
b. https://davidwalsh.name/promises
How to power up skills if it feels like "OUT OF MARKET"?
Tags: discuss, devanxiety, irrelevancy
Published: 2017-10-27 08:25:47

---
title: How to power up skills if it feels like "OUT OF MARKET"?
published: true
description: I wonder if I can do something better with this question. How can I answer it? I'm struggle. I feel like i'm out of market, because my current skills are irrelevant. How do I gain motivation?
tags: #discuss, #devanxiety, #irrelevancy
---

I wonder if I can do something better with this question. How can I answer it? I'm struggle. I feel like i'm out of market, because my current skills are irrelevant. How do I gain motivation?
How to isolate complex queries in an object oriented fashion
Tags: ruby, activerecord, rails
Published: 2017-10-27 07:28:29

---
title: How to isolate complex queries in an object oriented fashion
published: true
description: Building complex queries in ruby can make your code quite difficult to read, manage and reuse. In this blog post I'll present a simple method to decorate active record objects to make your queries fun again!
tags: ruby, activerecord, rails
---

Building complex queries in ruby can make your code quite difficult to read, manage and reuse. In this blog post I'll present a simple method to decorate active record objects to make your queries fun again!

Continue reading here: [http://www.alfredo.motta.name/how-to-isolate-complex-queries-in-an-object-oriented-fashion/](http://www.alfredo.motta.name/how-to-isolate-complex-queries-in-an-object-oriented-fashion/)

Looking forward to hearing your comments!
Product Hunt - we are hiring our first junior engineer role - and it's remote!  
Tags: hiring
Published: 2017-10-26 18:11:55

---
title: Product Hunt - we are hiring our first junior engineer role - and it's remote!  
published: true
tags: hiring, 
automatically_renew: true
---
## About Us

ðŸ˜»âœŒï¸

Our mission at Product Hunt is to surface great products to the world and help makers find an audience.

We're a curious, motivated group of founders and makers, operating as an 18-person distributed team within AngelList.

We look for self-starters; those with a founder mentality. We ship every day. We embrace bold ideas and encourage experimentation.


## About The Opportunity
This will be the first junior role we have on the engineering team (professional experience can be as few as 1-2 years) _and it will be remote (US or LATAM timezone preferred). You should have a product mindset – all engineers at Product Hunt are product people too – and be eager to work on bug fixes, smaller site enhancements, and engineering support duties. You should be someone that likes to ship, has some basic experience across our entire stack (We use React, GraphQL, Rails) and be excited to learn more. You should be proud of your code but knowledgable enough to know how to manage implementation tradeoffs.

Your responsibilities will include:

â€¢ Working with the community/marketing team to increase efficiency 
â€¢ Fixing bugs (yes, we have those too) 
â€¢ Collaborating closely with designers to ship great products 
â€¢ Leveraging research and usage data to iterate on these products



## Skill & Qualifications

â€¢ A track record of launching great projects 
â€¢ Desire to ship and work autonomously 
â€¢ The ability to work with a distributed team 
â€¢ Strong verbal and written communication skills 
â€¢ An eagerness to work on engineering support tasks (e.g. bug fixing)

The job is remote - timezones that are between westcoast USA/LATAM and eastern europe/africa are preferred  

## How To Apply


Please apply here https://angel.co/product-hunt/jobs/292573-junior-full-stack-engineer


_Please feel free to leave questions in the comments section or ping me on twitter @andreasklinger._
I'm a developer for The Washington Post, ask me anything!
Tags: ama
Published: 2017-10-26 17:40:33

---
title: I'm a developer for The Washington Post, ask me anything!
published: true
description: My team builds tools for the newsroom so that journalists can make articles with rich, engaging content.
tags: ama
cover_image: https://thepracticaldev.s3.amazonaws.com/i/wgbsfgov3hvg09htzh7z.png
---

Hi! I am a developer at The Washington Post. My team builds tools for the newsroom so that journalists can make articles with rich, engaging content. I work primarily on the front end on JavaScript projects. Originally not a techie, I hold a degree in International Relations and taught myself to code after not finding good work in that field. The journey from relative low technical literacy to full time working developer has been... well, hard and interesting. I have some opinions about it all.

I am an active community organizer including sitting as the current Chair for the DC chapter of ACM, helping organize for [DC Tech Meetup](https://www.meetup.com/DC-Tech-Meetup/), [DCFemTech](https://dcfemtech.github.io), and producing a podcast called [DC Tech Stories](http://dctechstories.com/) - check it out!

Currently I am struggling with burn out, how to level up my coding skills without giving my whole life over to side projects, why as a society, we have such a low level of technical literacy, and how to feel like a competent developer while working in imperfect legacy code.  I am excited about the future of news media and technology, my upcoming vacation, and fun web storytelling in general.

Ask me anything!
Python Generator Example : File Watcher
Tags: python, generator, filewatcher
Published: 2017-10-26 11:49:17

---
layout: post
title: "Python Generator Example : File Watcher"
tags: #python,#generator,#filewatcher
published: 1
---
##Python - Generators ==> Demo using file watcher

```
import os
from datetime import datetime as dt
import time

def checkfile(filename):
    try:
        st = os.stat(filename)
        fmtime = st.st_mtime
    except Exception as e:
        print e.message
        return
    print "*********init modification timestamp" , dt.fromtimestamp(fmtime).ctime()
    while True:
        print 'entered while loop'
        st = os.stat(filename)
        print 'collected file stats'
        yield dt.fromtimestamp(fmtime).ctime()
        print 'yield executed'
        if dt.fromtimestamp(st.st_mtime).ctime() <> dt.fromtimestamp(fmtime).ctime():
            print "File modification changed - new file modification timestamp", dt.fromtimestamp(fmtime).ctime()
            fmtime = st.st_mtime
            print 'set new mod time inside if condition'
        else:
            print 'Mod timestamps equal'
        time.sleep(2)

chk = checkfile(r'C:\filetowatch.txt')

for i in chk:
    print chk.next()
    print '---for loop next iteration after gen call'
```

Python has an interesting feature called generators which allow you to consume the benefits of a an iterator but without memory overhead.Generally, an iterator is an object in memory with a list of objects. I've written a simple code above which demonstrates how a generator works. You'll need to create another script to delete and re-create a file in order to see this working.

### What's that code?
The code simply watches for file modified time and identifies if there is any change in the file. A simple file watcher program. I've used python base libraries and hence no external dependencies.

### Learning
File created time won't work (atleast in windows) for the same filename because Windows does not change the create time.Check out this [article](https://support.microsoft.com/en-us/help/172190/windows-nt-contains-file-system-tunneling-capabilities) for more info on "name" tunneling 

Feel free to leave your feedback...
Всё, что вы должны знать о переменных окружения в PHP
Tags: php, environment, variables, dotenv
Published: 2018-01-28 03:32:16

---
title: "Всё, что вы должны знать о переменных окружения в PHP"
published: true
tags:  php, environment, variables, DotEnv
canonical_url: http://phpprofi.ru/blogs/post/72
---

Переменные окружения, используемые в конфигурации, являются на сегодняшний день основным методом установки&nbsp;в приложении таких настроек, как учетные данные базы, API ключи, секретные ключи и всего, что _является различным в зависимости от того, где развертывается приложение_. Сейчас такие настройки попадают в код через окружение, вместо прямого прописывания в файлах конфигурации или, того хуже, хардкода прямо в коде.

![You can't leak what you don't store](http://jolicode.com/media/original/2017/password.png)

Давайте подробнее взглянем на то:

- как это работает?
- действительно ли это хорошая идея?
- как с ними работать в PHP?
- и в заключение&nbsp;на некоторые рекомендации и распространенные ошибки, которых следует избегать – на те ловушки, на которые мы наткнулись в реальном мире!

Читать далее: http://phpprofi.ru/blogs/post/72
How to publish UDP ports with Docker-Swarm
Tags: docker, dockerswarm, udp
Published: 2017-10-26 16:09:02

---
title: How to publish UDP ports with Docker-Swarm
published: true
description: How to publish a UDP Port from a Docker-Swarm Service
tags: Docker, Docker-Swarm, UDP
---

I am sure you know those requests, where you think: Hey no problem, i have done this thousand times, give me 5 minutes and it will work.

The same happened last week, when a teammate from [zisops](https://zenner-iot.com) asked me to publish a UDP Port for a already running Docker Swarm Service. I have done this 100 times before for "normal" Docker Containers. But hey.. Docker Swarm can't handle this with:

```
-p 500:500/udp
```

Ok next step: RTFM but hey.. nothing about publishing a UDP Port for a service. Next try: Start to google.. Gotcha, found a solutions in an Github Issue from the Moby Project. So if you ever have to use UDP with Docker-Swarm remember this small article, and buy me a beer :-)

***Solution***

```
docker service create --name my_service \
    --publish mode=host,published=500,target=5004,protocol=udp \
    my_image
```

Original post in german: https://www.geekpub.de/2017/10/docker-swarm-udp-port-freigeben-fuer-einen-service/
What's the most important topic to teach when teaching webdev?
Tags: webdev, learning, programming, discuss
Published: 2017-10-26 15:11:23

---
title: What's the most important topic to teach when teaching webdev?
published: true
description: "Asking for a friend"
tags: 
  - webdev
  - learning
  - programming
  - discuss
---

I'm currently working with a friend of mine in a non-profit, sideproject to teach highschool students (and up) the very basics of web development in order to empower them and give them a minor boost in their careers for those who are looking to start a career in tech.

We'll be using the ruby language because it is the one we master, but also because we find it easy _and fast_ to learn and hack a thing or two. Being so, we're starting with the very basics of the language up to (surprise, surprise) a Rails aplication. Maybe a web scrapper in the way just so they see the potential.

However, I'd like some input on what would *you* teach, given the opportunity.

Wait for a follow-up post regarding the experience!
DataDigger in Notepad++
Tags: openedge, datadigger
Published: 2018-01-22 20:05:51

---
title: "DataDigger in Notepad++"
published: true
tags: OpenEdge, DataDigger
canonical_url: https://datadigger.wordpress.com/2017/10/26/datadigger-in-notepad/
---

![jggruit](https://datadigger.files.wordpress.com/2017/10/jggruit.png?w=840)If you are using Notepad++ as an editor, you should really check out the plugin 3P from Julien Caillon. His plugin 3P – short for Progress Programmers Pal – is a fan-tas-tic addition to Notepad++. Its list of features is almost endless, his support is great and he provides extra tooling from within Notepad++. It is possible to call DataDigger from Notepad++ with ALT-D. The latest version will be downloaded from GitHub and installed.&nbsp;Same story for ProParse; just press F12 and the latest version will auto-install.

You can install 3P via the plugin manager of Notepad++. Click ‘Plugins \> Plugin Manager \> Show Plugin Manager’

![r7pxc3g](https://datadigger.files.wordpress.com/2017/10/r7pxc3g.png?w=840)

And select 3P from the list of available plugins. It should be at the top

![6uaikyu](https://datadigger.files.wordpress.com/2017/10/6uaikyu.png?w=840)

After installing, Notepad++ will restart to complete the installation. 3P will give some additional notifications about syntax highlighting and update checks. Just follow the instructions and then, when the plugin is installed, press ALT-D.

![hhwg8ik](https://datadigger.files.wordpress.com/2017/10/hhwg8ik.png?w=840)

It will tell you that you need to provide the path to the Progress executable. Set it and try again. When DataDigger is installed, you should be welcomed with

![e9w4rrc](https://datadigger.files.wordpress.com/2017/10/e9w4rrc.png?w=840)

Happy Digging in Notepad++

&nbsp;

&nbsp;
We tested 3 different WordPress websites on all DigitalOcean droplets
Tags: wordpress, php, vps, performance
Published: 2017-10-26 04:08:58

---
title: We tested 3 different WordPress websites on all DigitalOcean droplets
published: true
description: Identify how much different CPU models, affect WordPress website backend performance and find which DigitalOcean droplet is the most feasible
tags: WordPress, PHP, VPS, Performance
---

We did comprehensive research on how different CPU models affect Wordpress website performance. 

Here is a summary of our conclusions.

* PHP depends on CPU processing power meaning if you need better performance, it is important that you pick a CPU model that has a better official benchmark score – CPU matters.
* The number of CPU cores doesn’t affect the performance of PHP applications - PHP is not multi-threaded. The number of CPU cores will only help you handle a higher traffic.
* PHP string functions are more expensive than math functions.
* VPS instances with a larger amount of RAM memory have little or no impact on PHP performance.
* The best decision will be to use a few high CPU VPS instances with a load balancer, with a separate instance for MySQL DB
* A Standard $20 DigitalOcean droplet will give you a better PHP performance in average than a $640 DigitalOcean droplet.
* A High CPU $40 DigitalOcean droplet will give you the best PHP performance among DigitalOcean droplets.
* Dedicated vCPU give us more stable performance - no large loading time spikes
* Bad programmers are too expensive.

Please take a look at [original research article with charts and all the data](https://learnwebdevelopment.review/article/how-much-different-cpu-models-affect-wordpress-performance)