teleren/devto huggingface dataset:
Mirroring My Canvas Games Between GitLab and GitHub
Tags: git, github, gitlab
Published: 2018-05-15 17:28:13

---
title: Mirroring My Canvas Games Between GitLab and GitHub
published: true
description: GitLab repo mirror on push
tags: git, github, gitlab
---

I migrated my private projects to GitLab about 2 years ago when we started using it at work. I have nothing against GitHub, but I really like GitLab's interface. The problem is GitHub is THE place to host your stuff if you want others to have easy access to it. This meant I had to maintain two different remotes for every project.

Today, I fixed that.

GitLab's mirror push interface is really easy to use. You can access it via Settings > Repository > Push to a remote repository.

![](https://thepracticaldev.s3.amazonaws.com/i/2vf8rqo06ojr49k2oo1x.png)
![](https://thepracticaldev.s3.amazonaws.com/i/y5e96c14frqptfolo0xw.png)

Usage:
- Add the GitHub project's URL with the proper credentials to the 'Git repository URL' field
- Click 'Update Now'
- GitLab will show: ![](https://thepracticaldev.s3.amazonaws.com/i/3q2w30egz5g7vjedta33.png)
- GitHub will show: ![](https://thepracticaldev.s3.amazonaws.com/i/myusv54urg1q1dp97rbc.png)

Woo.

Sources:
- https://stackoverflow.com/questions/21962872/how-to-create-a-gitlab-webhook-to-update-a-mirror-repo-on-github
- https://gitlab.com/help/workflow/repository_mirroring#pushing-to-a-remote-repository
- https://news.ycombinator.com/item?id=8908235
OpenShift for Mere Mortals: Building Images
Tags: containers, docker, kubernetes, openshift
Published: 2018-05-15 17:23:05

---
title: OpenShift for Mere Mortals: Building Images
published: true
description: part three of my blog series on openshift
tags: containers, docker, kubernetes, openshift
cover_image: https://thepracticaldev.s3.amazonaws.com/i/87wwsie36oobbrhen5d8.png
---

I've published part 3 of my blog series on **Red Hat OpenShift**. This week I'm focusing on how **images** are built from the ground up (using **Docker** as an example) and optimizing the size of the images.

[https://vault.osninja.net/openshift-for-mere-mortals-part-three/](https://vault.osninja.net/openshift-for-mere-mortals-part-three/)
What should I be asking for salary?
Tags: discuss, career, programming
Published: 2018-05-15 17:14:50

---
title: What should I be asking for salary?
published: true
description: 
tags: #discuss #career #programming
---

Hello all,

I figured I'd poll the crowd and see what I get. I'm curious about those of us who work in the software industry. How do you come up with a figure to ask for when looking for a job? How do you negotiate getting a higher salary than what they offer? Do you research salary sites? Do you find those sites to be reliable? Is it natural to ask for more money when moving to a job from another company? What are you thoughts?
Quick Tip: Get MySQL version
Tags: mysql
Published: 2018-05-15 14:58:09

---
title: Quick Tip: Get MySQL version
published: true
description: Get the MySQL server version
tags: MySQL
---

I needed to get the version of a [PostgreSQL](https://dev.to/lefebvre/quick-tip-get-postgresql-version-j9a) server the other day and figured I should also look up how to do that with MySQL as I also use that DB from time to time.

It turns out you can easily get this information with a quick database query, similar to the one used for PostgreSQL:

    SELECT VERSION();

I hope this helps someone.
Quick Tip: Get PostgreSQL version
Tags: postgres
Published: 2018-05-15 14:44:03

---
title: Quick Tip: Get PostgreSQL version
published: true
description: Show PostgreSQL version
tags: PostgreSQL
---

I ran into this the other day and thought it might be worth a quick tip. I had a need to figure out what version of PostgreSQL was running on a server. It turns out you can easily get this information with a quick database query:

    SELECT version();

I hope this helps someone.
I made a microframework for converting handlebars to HTML!
Tags: html, handlebars, webdev, showdev
Published: 2018-05-15 13:27:41

---
title: I made a microframework for converting handlebars to HTML!
published: true
description: It's called Panhandle.
tags: html, handlebars, webdev, showdev
---

I was building a website using Github Pages and wanted to use templating functionality without having to resort to Jekyll. I found a few repos and code samples from devs who had attempted to solve this same problem, but the best thing I found was an old repo by a developer who hasn't logged in for quite some time called [handlebars-to-html](https://github.com/cdierkens/handlebars-to-html). I took his code, cleaned it up and applied it to my website, and then ripped out some of the guts to create a microframework I decided to call Panhandle.

I'm brand new to async/await and the project's not building in the right order, and I think the architecture could be improved a little bit too. However, I spent about 20 hours working on it, it's definitely usable, and I have other stuff that's more pressing in work and life - so that's where I decided to stop.

I'm really proud of what I've done so far, but I know it can be improved a bit. If you think this project/problem are interesting, please feel free to fork and contribute! Thanks!

https://github.com/neilthawani/panhandle
Django Quick Tip #1: Human Friendly Timestamps with Django's Humanize
Tags: python, django, webdev, tutorial
Published: 2018-05-15 13:15:29

---
title: Django Quick Tip #1: Human Friendly Timestamps with Django's Humanize
published: true
description: Add a 'human touch' to your timestamps with the inbuilt 'humanize' module
tags: #python, #django, #webdev, #tutorial
---

Welcome to this short Django Tip. No long story here since this is a 'Quickie'.
This is what we would achieve:

![Tranformed timestamp](https://thepracticaldev.s3.amazonaws.com/i/jai675t6vj4qhwnhxz9r.png)

To achieve this, we would be using the `humanize` module which is located in `django.contrib.humanize`.
The humanize module is a collection of template filters that adds a human touch to our displayed data. Instead of spitting out the exact values in our database, it prettifies it to a nice readable format.

#Let's get to work

##1. Add the module to your `INSTALLED_APPS`:
```python
'django.contrib.humanize'
```
##2. Load it up in your template:
```python 
{% load humanize %}
```
##3. Apply the filter to your timestamp
```python
{{ viewed_on|naturaltime }}
```

#That's it!

The `humanize` module also contains other filters. Here's a [link](https://docs.djangoproject.com/en/2.0/ref/contrib/humanize/) to the the documentation.
Now go forth and make your apps human friendly.

#Video Version
{% youtube jsXHgjXRJLY %}
What's development like with a Surface laptop? Worth switching from OSX?
Tags: discuss, productivity
Published: 2018-05-15 13:01:06

---
title: What's development like with a Surface laptop? Worth switching from OSX?
published: true
tags: discuss, productivity
---

I feel like my beloved Macbook Pro purchased in 2015 will give up sooner or later and I'm starting to consider my options. From what I read here and there people seems disappointed by the new Macbooks (keyboard quality, lack of magsafe, ports, esc key...). Add to that the latest issues in their OS and it seems to me that buying a new Macbook Pro is not worth the $$$$ it costs anymore.

I'm really tempted to get a Surface Laptop and to go back to Windows after being on OSX for almost 10 years. However, I'd like to get the opinions of other devs before doing so. I've read a lot of blog posts but haven't really come across a good discussion between developers.

So, I'd be happy to get your feedback if you have done the transition OSX -> Windows 10. I believe that with Docker I can get rid of a lot of the dev environment issues but I have a few specific questions:
- How's bash on Windows 10?
- How's Docker support?
- What about designing things? Is Figma the answer?
- Is there anything you're missing?
- Is there anything that is now making your life better?
- What about viruses (10 years ago this was a big issue)?
How do you find a mentor as a "non-trad"?
Tags: discuss
Published: 2018-05-15 11:48:25

---
title: How do you find a mentor as a "non-trad"?
published: true
description: A quest for career guidance in an ever-changing industry
tags: discuss
---

## The Question:

I'm a "non-traditional" developer in the sense that I'm 38, with 3 years in the game as a Ruby on Rails developer who, through some fortuitous opportunities, was able to teach myself how to develop. I can't say I have a lot of industry connections, and I find myself pretty clueless as to how to navigate the industry career-wise. I'd love to find a mentor who could help me guide my decision-making and help me make sense of the endless languages/frameworks that continuously come out and where my skill sets would be most valuable. 

**Where did you find your mentor?**
A Github's search engine for OSS contributors wannabe
Tags: beginners, opensource, react, showdev
Published: 2018-05-15 07:57:38

---
title: A Github's search engine for OSS contributors wannabe
published: true
description: A search engine to find the perfect issue to contribute to  
tags: beginner, open-source, react, showdev
---


TLDR: it's live [here](https://first-contrib.surge.sh) and the code is [here](https://github.com/GaelS/first-contrib-app)

![App](https://thepracticaldev.s3.amazonaws.com/i/7uvn3nxnspq3emfw4sgo.png)

Hi all,

It can be hard sometimes for beginners to find THE good project and THE good issue to make a first open source contribution. In order to tackle, I created an application powered by the Github's GraphQL API.

It works as a search engine which allows you to query by keywords and languages across all repositories to find issues tagged with beginners friendly labels (I have listed more than 50 of them so far!).

The Github's API does not really expect this kind of use case where you want to search across all repositories. So, tweaks and workarounds had to (and some still need to) be found to handle in a better way some features such as the pagination for instance. 

Besides, to have fun while practicing my CSS skills, I tried to achieve a 80's vibes design, hope you'll like it or better, will want to improve it !

This app is realized with React (preact under the hood), React Router and React Apollo.

Feel free to give me your feedbacks whether you like it or not :)

Thanks,
Gaël

PS : A small preview below :)

![Preview](https://thepracticaldev.s3.amazonaws.com/i/m673htjy3wygtjfegd3o.jpg)
Livetable
Tags: pushercontest, timetable, mern, heroku
Published: 2018-05-15 07:28:41

---
title: Livetable
published: true
description: Hasslefree realtime scheduling based on week.
tags: pushercontest, timetable, MERN, heroku
---

# What I built

{% youtube VQveIMl4fwQ %}

This is a common room timetable building PWA in which people who have common problems to solve can decide how to allocate time synchronously. For example, suppose a tuition group have a group of students with different schedules trying to set the optimal time to take their common tuition classes. They can go to this app, make there own room and then arrange their timetable. I intend to build a ton of more features in it but right now due to end term exams I'm afraid this is my entry.

## Demo Link

Project is deployed on heroku: https://mysterious-beach-92009.herokuapp.com/

*Note*: Features like responsive design, UI design, loading animations, custom features related to timetable manipulation have not been added till now.

## Link to Code

{% github himanshuc3/LiveTable %}

*Note*: Ton of refactoring left to be done!!!

## How I built it (what's the stack? did I run into issues or discover something new along the way?)

MERN Stack:

Front End - React
Front End libraries - moment, cleave.js, nuka carousel, rodal, react-timetable-events
Back End - Node, Express
Realtime Communication achieved through - pusher😍

*Note*: Mongo not integrated right now as right now its a demo app and I didn't have much time too. But surely OAuth will come into play and so will mongo.

### Issues I came across:

1. Setting up MERN stack: I've worked with React and Express before. But not combined. Managing two different servers, 1 for react and 1 for Express was a little tricky and challenging at the started, but I conquered it. Thanks to this **challenge** for that.
2. Research: I first tried building my own scheduler. Failed. Tried another one quickly. Failed. And 3 more tries later found the correct library. Lesson: Research saves a ton of time.
3. Pusher: It was really hard..... Nah, I was kidding. Pusher integrated smoothly. Hardly wrote 5-6 lines for integration.

# Additional Resources/Info

Additional Resources:
1. Found the website undraw.co during development. There were some pretty sweet illustrations there.
2. Bootstrapping an idea is easier than I thought. Some hickups, but I take them with both hands open.
It's not a rat race, first of all, understand why do organizations need DevOps?
Tags: devops, ci, cd
Published: 2018-05-15 07:14:24

---
title: It's not a rat race, first of all, understand why do organizations need DevOps?
published: true
description: 
tags: devops, ci, cd, 
---

If you ask me, I have listed down these 10 things to justify the need of DevOps in any organization.

1. To improve the end-to-end customer experience

2. To develop or deploy cloud-based applications in scale

3. To release apps and features more quickly and efficiently to meet customer demands

4. To simultaneously deploy across different environments 

5. For better collaboration between development and operations team

6. To better operate in the complex IT infrastructure 

7. For better version control and resource management

8. For a stable operating environment 

9. To mitigate the blame game between the teams

10. To find bugs as soon as they appear and address them immediately, so they don't reach your customers. 

Want to add anything else to this list?  Go ahead.
dig コマンドで TXT レコードを引いてくる
Tags: dig
Published: 2018-05-15 04:49:36

---
title: dig コマンドで TXT レコードを引いてくる
published: true
description: dig コマンドのオプションを知らなかった
tags: dig
---

```
dig -t TXT example.com
```

何かと必要になるでおなじみの TXT レコードがちゃんと設定されているか確かめる方法を知らなかったので備忘録として...。

前回の投稿からだいぶ日が空いてしまったけれど、dev.to に投稿しようとおもってざっくり書いたけど、まだ推敲してない投稿がたくさんあります...。
Hi all
Published: 2018-05-15 01:52:16

---
title: Hi all
published: false
description: Introduction
tags: 
published: true
---

Hi all,

I'm Joris, a dev from the Netherlands. I've been a web dev for quite a while now and i'm currently specializing in embedded systems.

I'm looking forward to be part of this cool and welcoming community.

If you have any questions about web dev, embedded systems, living in the Netherlands or anything else, let me know!
100 Days Of Code: Websites == Experience
Tags: coding
Published: 2018-10-17 18:47:34

---
title: 100 Days Of Code: Websites == Experience
published: true
tags: #coding
canonical_url: https://distort-roving.blogspot.com/2018/05/100-days-of-code-websites-experience.html
---

 [![](https://images.unsplash.com/photo-1487058792275-0ad4aaf24ca7?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=6726719ee78dabe78033950d9f3f7145&auto=format&fit=crop&w=1350&q=80)](https://images.unsplash.com/photo-1487058792275-0ad4aaf24ca7?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=6726719ee78dabe78033950d9f3f7145&auto=format&fit=crop&w=1350&q=80) 
 Photo from https://unsplash.com/@markusspiske |

  
Sometimes, life just doesn't go according to plan. Like this post, that should have been done yesterday. And is going to be choppy, since it seems that they need me more than usual right now.  
  
I had been taken, literally, to visit a friend of my son - who owned a shop here in town. Okay, yeah, they have a Facebook presence (actually, two of them), but wanted more exposure. And so I was 'volunteered' to do a quick web page for them - and then offered, since I was doing one, I may as well do two, to the stylist that rented a part of their sales floor.  
  
This was a mistake - trying to get communication with them is nearly impossible. I have rough ideas ready for both sites, but want some information from them. I'm about ready to give up - and use just random images from the internet.  
  
That takes care of two of the sites - the third is a wonderful business in another state: a Mexican-Greek restaurant that is very involved in the community. I have a menu, and have made plans to return some time soon for another meal. This one is taking a while: I want this to be as unique and welcoming as the business is.  
  
Making websites just to have on the portfolio has never appealed to me - there are so many small businesses that might be interested in having one, and getting to meet new people, and support the local community is always a pleasure.
hasOwnProperty considered harmful
Tags: javascript, performance, coding, programming
Published: 2018-05-14 23:50:56

---
title: hasOwnProperty considered harmful
published: true
description: hasOwnProperty is often unnecessary and performs poorly
tags: Javascript, performance, coding, programming
---

A lot of Javascript developers *automatically* reach for `hasOwnProperty` when looping over an object with for...in; case in point something I read on reddit recently:

```
    for (var k in this.generalKeyHandling) {
	    if (this.generalKeyHandling.hasOwnProperty(k) && this.down.indexOf(k) > -1) {
        // etc.
```
The object however had just been defined in an immediately preceding literal, therefore it would not have any inherited properties, which is the point of using `hasOwnProperty`.  Not only is using it in this case therefore unnecessary, but [a JSPerf](https://jsperf.com/hasownproperty-overkill/1) seems to indicate it could be up to 10 times slower.

If object (literals) you define can somehow get hijacked such that they have inhertited properties by the time you want to iterate over them, you have bigger problems that using `hasOwnProperty` merely masks.  So, when thinking about using it, to quote some advice from a lost episode of the Andy Griffith show: "Aunt Bea, I gotta cookin' tip for ya: DON'T!"
Changelog: Profile and general design adjustments
Tags: meta, changelog
Published: 2018-05-14 21:10:35

---
title: Changelog: Profile and general design adjustments
published: true
description: We were inspired by a few posts on dev portfolio sites/pages
tags: meta, changelog
---

Hey everybody, we just pushed some adjustments to profile pages, as well as the look of some other pages on the site. You can see the changes by visiting [my profile](/ben) or your own profile pages.

We were inspired by a few posts on dev portfolio sites/pages

{% link https://dev.to/amandasopkin/fantastic-personal-websites-and-how-to-make-them--22om %}

{% link https://dev.to/flexdinesh/create-your-developer-landing-page-with-github-pages---42jk %}

We want your DEV profile to be a great showcase of you and your work.  We'll continue to make adjustments and additions to help accomplish that goal.  

We're happy to partner with you in your dev career and we'll try to make a few more small adjustments to make this new design direction really fit nicely across everyone's profiles once we see it in the wild for a little while.

Of course, we also welcome you to add the [DEV badge](https://dev.to/p/badges) to your personal site as well. Thanks for being a great part of this community.

Happy coding ❤️
How do you think of RISK when you are working on a new feature?
Tags: discuss
Published: 2018-05-14 20:30:35

---
title: How do you think of RISK when you are working on a new feature?
published: true
tags: discuss
---

It's not all happiness and rainbows when working on new code. We want to be working on the right task for our customer but sometimes building the RIGHT thing takes a lot more discussion than just coding up a storm. How do you think of assessing risk in your projects? What are activities that make development less risky?
Meet Burns: cleaner application events for Node.js
Published: 2018-05-14 20:14:17

Hi dev,to community,

I recently published a new version of my NPM package,[Burns](https://github.com/shalvah/burns). Burns is a Node module for writing clean event\-driven code and managing your application events easily. It was inspired by Laravel's [events](https://laravel.com/docs/master/events) and [broadcasting](https://laravel.com/docs/master/broadcasting) systems.

Here's a brief overview of how you use it:

* First, you define an event handler:

```js
// handlers/order.js

function sendOrderShippedEmail(data)
{
    mailer.sendEmail(`Hi ${data.userName}, Your order ${data.orderId} has been shipped`);
}
```

* Then you attach the handler to an event:

```js
let orderHandlers = require('./handlers/order');
burns.registerEvents({
  orderShipped: orderHandlers.sendOrderShippedEmail
});
```

* And then dispatch the event when you're ready\!

```js
burns.dispatch('orderShipped', {
    orderId: order.id, 
    userName: user.name
});
```

You can also get your event broadcast \(for instance, via [Pusher](https://pusher.com) by specifying a few options.

Please do [check it out](https://github.com/shalvah/burns) and share your opinions. 😊

Some things I'd like feedback on:

1. _Usefulness of the package._ Do you see this package having any real\-world applications in your work?
2. _External API._ Is the API clear and easy to use?
3. _Documentation._ Is the README clear and concise?
4. \(Bonus: Code quality. Any bugs or things I should watch out for?\)

Also, if you know of any tools out there that provide similar functions, I'd love to hear about them.

Thanks\!
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2018-05-14 19:36:54

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---

#1. Fundamentally Wrong

Sam explains why companies shouldn't adjust salaries and wages based on an employee's location.

{% link https://dev.to/sam_ferree/why-i-think-cost-of-living-pay-for-remote-workers-is-bs-5b68 %}

#2. Universally Derided: Git Submodules

Dave shares their workflow with git submodules to manage dependencies. 

{% link https://dev.to/dwd/git-submodules-revisited-1p54 %}

#3. Stack Overflow foraging 

Advice to n00bs? Steal other people's code, cobble together websites, and figure out how it all works along the way.

{% link https://dev.to/catcarbn/franken-code-till-you-make-it-1j41 %}

#4. Forget the JavaScript

From famous puzzles to oil paintings to a web version of mario kart, Abdelrahman shares an awesome collection of Pure CSS examples. 

{% link https://dev.to/abdelrahman3d/css-abuse-31gp %}

#5. Greedy Algorithm or Dynamic Programming?

Don't know what either term means? Vicky explains the two common approaches to solving the knapsack problem. 

{% link https://dev.to/hivickylai/knapsack-problem-algorithms-for-my-real-life-carry-on-knapsack-33jj %}

#6. Cut bundle size, improve performance

The latest release of Webpack handles a lot of optimizations by default. Jesal explores what remaining items can be tweaked to ensure you get the most out of Webpack. 

{% link https://dev.to/jesalg/optimizing-front-end-delivery-with-webpack-4-1mm4 %}

#7. Beyond JS Fatigue

There are a gazillion languages and lots of technologies in the cloud. How much are we all suppose to know?

{% link https://dev.to/rhymes/is-software-developer-fatigue-a-thing-2a09 %}

_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Monday!_