teleren/devto huggingface dataset:
Module Monday 21: Split image wipe, Scroll top, Thumb grid & more
Tags: showdev, opensource, webdev, javascript
Published: 2018-12-03 18:14:20

---
title: Module Monday 21: Split image wipe, Scroll top, Thumb grid & more
published: true
description: Module Monday 21
tags: showdev, opensource, webdev, javascript
cover_image: https://res.cloudinary.com/component/image/upload/c_fill,h_350,w_880/v1543445897/split-image_zcn9uo.gif
canonical_url: https://guide.anymod.com/module-monday/21.html
---

## Open source web modules

Everything below is open source and free to use on any website, web app, or anywhere else. [Anymod](https://anymod.com) has hundreds more like these.

Click a mod to see it along with its source code.

## Split image wipe
Compare images side by side.

<a class="btn btn-sm" href="https://anymod.com/mod/badoom?v=20">View mod</a>

<a href="https://anymod.com/mod/badoom?v=20">
  <img src="https://res.cloudinary.com/component/image/upload/v1543445897/split-image_zcn9uo.gif"/>
</a>

## Scroll to top button
One weird trick to avoid scrolling in any mid-page situation.

<a class="btn btn-sm" href="https://anymod.com/mod/kdkmmk">View mod</a>

<a href="https://anymod.com/mod/kdkmmk">
  <img src="https://res.cloudinary.com/component/image/upload/v1543439292/scroll-top_dab9pj.gif"/>
</a>

## About me section with form
Responsive section for your personal site.

<a class="btn btn-sm" href="https://anymod.com/mod/dkaool?v=20">View mod</a>

<a href="https://anymod.com/mod/dkaool?v=20">
  <img src="https://res.cloudinary.com/component/image/upload/w_700/v1543450944/about-me_u1gzld.png"/>
</a>

## Twitter message button
Let 'em contact you.

<a class="btn btn-sm" href="https://anymod.com/mod/dkadl">View mod</a>

<a href="https://anymod.com/mod/dkadl">
  <img src="https://res.cloudinary.com/component/image/upload/v1543457359/twitter-2_rf1fon.png"/>
</a>

## Simple thumbnail image grid
A responsive image grid with links.

<a class="btn btn-sm" href="https://anymod.com/mod/eonra?v=20">View mod</a>

<a href="https://anymod.com/mod/eonra?v=20">
  <img src="https://res.cloudinary.com/component/image/upload/v1493831397/zfuzuakh4rmjqrqbykt6.png"/>
</a>

<hr>

I post new mods [here](https://dev.to/tyrw) every (Module) Monday -- I hope you find them useful!

Happy coding ✌️
Should you migrate an existing enterprise Java application to serverless architecture?
Tags: serverless, java, jee, enterprise
Published: 2018-12-03 18:15:28

---
title: Should you migrate an existing enterprise Java application to serverless architecture?
published: true
tags: #serverless, #java, #jee, #enterprise
canonical_url: https://maxkatz.org/2018/12/03/should-you-migrate-an-existing-enterprise-java-application-to-serverless-architecture/
---

Last week [Marek Sadowski](https://twitter.com/blumareks) and I presented [Introduction to Serverless with IBM Cloud Functions: a new way to build modern apps](https://www.meetup.com/sv-jug/events/255614502/) at Silicon Valley JUG. 


![Silicon Valley JUG](https://katzmax.files.wordpress.com/2018/11/ibmdeveloper-svjug-1.png?w=1100)


![Silicon Valley JUG](https://katzmax.files.wordpress.com/2018/11/ibmdeveloper-svjug-2.png?w=1100)

![Silicon Valley JUG](https://katzmax.files.wordpress.com/2018/11/ibmdeveloper-svjug-31.jpg?w=1100)


One of the questions from the audience was how do you take an existing large enterprise Java application and migrate it to serverless architecture? 

The short answer is you probably shouldn’t do it.  

But let’s look at the long answer. 

Unless there is a very good reason, there is little value in taking a large existing enterprise Java application and migrating it to serverless architecture. I think serverless should be considered for new applications in most cases.  Now, if you need to add a small new feature to an existing application, you could look at serverless.

For example, if you are running a large loyalty application (airlines, hotels, etc) and you have a new requirement where you need to process new members once a day. Once a file is received/uploaded, a function can be executed to process the new members.  

Or, you can migrate small bits from an existing application like a cron job or a queue process. But again, there is probably little value in doing a complete re-write.
Keeping browser tabs in sync using localStorage, NgRx, and RxJS
Tags: angular, ngrx, rxjs, typescript
Published: 2018-12-03 17:35:17

---
title: Keeping browser tabs in sync using localStorage, NgRx, and RxJS
published: true
description: We're going to take a look at how we can keep state in sync when a user has multiple tabs open.
tags: angular,ngrx,rxjs,typescript
canonical: https://timdeschryver.dev/blog/keeping-browser-tabs-in-sync-using-localstorage-ngrx-and-rxjs
canonical_url: https://timdeschryver.dev/blog/keeping-browser-tabs-in-sync-using-localstorage-ngrx-and-rxjs
cover_image: https://cdn-images-1.medium.com/max/2000/0*43LeTZF4ZPeydYd9
---


In this post, we're going to take a look at how we can keep application state in sync when a user has multiple tabs open. We're going to make this happen by using the Web Storage API, NgRx (Store and Effects), and RxJS. A basic knowledge of NgRx is needed to follow the examples.

There are two ways of syncing state that I know of. One of them is to send the actions from one tab to another tab, the other is to send the (partial) state from one tab to another tab. While both of them have a very similar implementation, they both shine in their own way.

As a starting point, we're going to pick up where we left off in a previous post "Let's have a chat about Actions and Action Creators within NgRx" where we created a simple grocery list.



[Read More...](https://blog.angularindepth.com/keeping-browser-tabs-in-sync-using-localstorage-ngrx-and-rxjs-87de3bca4e2c)
[Update v2] Filler game by Robin
Tags: react, game, inspiration, algorhythm
Published: 2018-12-03 17:30:28

It's been a couple of weeks now since my last update to this game, but today I managed to push the recent changes!

The previous version was capable of the following:
- Play against yourself (or someone on the same maschine)
- Get suggestions about the best move
- See percentage complated
- Toggle owner icon on cells
- Toggle display of suggestions
- Start over again with a new game

#### So what's new?

- New design for blocks
- CPU enemy available (makes moves with a delay of 1.2 seconds)
- CPU enemy can be turned on/off

#### Some interesting stuff

I wanted to give the board with the blocks a better look and went with CSS gradients.
The gradient should use the solid color given as hex code and should go from black-ish over the given color to a lighter version to reach the desired effect.

**How to lighten a color hex code without css-preprocessors?**
My hexcode of the solid color was in a state variable:
`this.state.cell.color.hex`

The css part looks like this:
```css
linear-gradient(141deg, #2c3340 0%, #solidColorHex 51%, #lighterColorHex 75%)
```

Since I am in react and therefore can use javascript to manipulate variables, I convert the color hexcode to a rgba value first:
```javascript
export const hexToRgbA = hex => {
  var c;
  if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)) {
    c = hex.substring(1).split('');
    if (c.length == 3) {
      c = [c[0], c[0], c[1], c[1], c[2], c[2]];
    }
    c = '0x' + c.join('');
    return {r: (c >> 16) & 255, g: (c >> 8) & 255, b: c & 255, a: 1};
  }
  throw new Error('Bad Hex');
};

```

Then I just change the alpha channel to manipulate the color and interpolate the whole thing with variables as my style object on the react side:

```javascript
import {hexToRgbA} from '../helpers';
// ...

const rgbaCol = hexToRgbA(this.state.cell.color.hex);

return (
  <div
    className="cell"
      style={{
        background: `linear-gradient(141deg, #2c3340 0%, rgba(${rgbaCol.r}, ${rgbaCol.g}, ${rgbaCol.b}, 0.6) 51%, ${this.state.cell.color.hex} 75%)`,
        ...
        }}>
        ...
  </div>
);
```



{% github DarkSmile92/filler-game-react %}
Code ??
Tags: code, article, programming, coding
Published: 2018-12-03 17:30:03


---
title: Code ??
published: true
description: About the actual meaning of coding what is it or actually what its means for a programmer that's it. 
tags: #code #article #programming #coding
---
<strong>What is code ??</strong><br />

<img src="https://thepracticaldev.s3.amazonaws.com/i/wxakwfnx452exmjcaj8x.gif">

When you asked this question to some different different people you will get different different answer . Because the reason behind is you can not define or bound the code. For different people it has different meaning . For example in our daily life we can see above both term i.e. code and implementation . If we take mechanic as a example first he observe the all parts where the customer says the problem is and then he will analyse the problem after that he will come with his tools and start repairing that part or portion. <br />

<img src="">

Or let's take another example of HALWAI (a sweet maker etc.) he enlist all the ingredients and then one by one start mixing in a fix amount that’s why sweets become tasty or else customer will give you a bad feedback this one we can say error in coding.
So you can see in both example first we have to analyse and enlist then implement or start code.
Let’s take another example there are two men but both are from different different countries firs one can speak only HINDI language and second one only english in this case there is no medium through which they can translate what the other wants to say. So in this case what they will do ??
I think we all know the answer they will start communicating through some hand sign.
Now the same thing happens with you and computer . we all know high level language and computer knows low lev‐ el language . So to perform a task to computer we use language like C ,C++ , python etc . but in a specific format. we write some line on IDE which will convert high level language to level language and vice versa at the end gives an output .
  In simple way we can say<br />
<blockquote> Coding is a medium through which we can communicate or able to communicate with computer.</blockquote><br />

Hope you like the article!!<br />

See you all in next article .<br />

Happy coding!!<br />
Papers We Love: Exploring Gamification Among Elderly Persons
Tags: pwl, discuss, gamification, a11y
Published: 2018-12-03 17:08:50

---
title: Papers We Love: Exploring Gamification Among Elderly Persons
published: true
description: The dev.to Papers We Love discussion returns after the holidays with a paper on gamification in elder care!
tags: #pwl #discuss #gamification #accessibility
---

Welcome back to Papers We Love! Sorry for the absence last week - the holidays kind of took the pepper out of me and I fell behind. BUT I picked out a paper on [gamification among frail elderly patients](http://gamification-research.org/wp-content/uploads/2011/04/12-Gerling.pdf) that I think will lead to a really good discussion (and isn't too long of a read :) ).

I picked this paper somewhat selfishly. My dad worked in geriatric practice when I was growing up. As a result, I spent a lot of time tagging around with him to nursing homes and interacting with patients. I'm very interested in the intersection of elder care, healthcare, and technology. It's almost like this paper was tailor made for me.

I think the paper did a great job of outlining possible gains as well as technical, cultural, and accessibility challenges. However, I was a bit surprised and dismayed that the paper didn't touch on possible ethical and privacy ramifications of this kind of data gathering. Sure, you might be able to observe a decline and medically intervene earlier. But how is this information being collected and stored? Who has access, and is participation voluntary for the patient? Will this integrate with an Electronic Medical Record, and will performance in gamified activities impact insurance rates or treatment options?

I am incredibly wary of policies and technologies that treat elderly patients as having fewer rights than other people. It's a trap that can rob patients of their dignity at the same time they're being robbed of their mobility, senses, and ability to live autonomously, and I think it's imperative to keep these questions in mind when integrating technology with elder care.
Best way to store password in DB
Tags: help, node, database, mitm
Published: 2018-12-03 16:47:42

---
title: Best way to store password in DB
published: true
description: 
tags: help , nodejs , database, MITM
---

ReactJs,Mongodb

1. how can I overcome MITM, Man In The Middle Attack while sending password

2. If I am not allowed to store SHA256 hashed passwords,How should I implement without using any npm authentication packages
TIGL3D DevLog 3+4: Game save outrage and playtesting
Tags: gamedev, unity3d, devlog
Published: 2018-12-03 16:11:39

---
title: TIGL3D DevLog 3+4: Game save outrage and playtesting
published: true
description: Things start coming together as I prepare for the first public showing of the game in February 2018
tags: gamedev, unity, devlog
cover_image: https://thepracticaldev.s3.amazonaws.com/i/fmhlfc4qibhih7lp5u7y.gif
---

I get angry at a game save asset from the asset store and scramble to get [The Indie Game Legend 3D](http://indiegamelegend.com/) ready for the first public showing in February 2018:

{% youtube V6KHgLXxBOA %}

{% youtube L7rbPcbxp-g %}

Early access in 8 days!
Best way to partition repetitive static html?
Tags: askdev
Published: 2018-12-03 15:25:17

I want to make multiple pages for a site, and they all have common header and footer segments. What is the best way to write this code so I won't have to make the same change across multiple html files?

I guess the modern approach is to go with React-router, declaring the repeated header and footer as components and then using something like Gatsby to render it server side. 

I also came across [handlebars.js](https://handlebarsjs.com/) which appears to be what I'm looking for, but I want to  choose a method with the most minimal initial setup, or at least an environment that is easy to reproduce.
Dockerized PHP application with SSL
Tags: help, php, docker, ssl
Published: 2018-12-03 14:43:12

---
title: Dockerized PHP application with SSL
published: true
description: Looking for help to setting up SSL certificate in a PHP application.
tags: help,php,docker,ssl
---

Hello everyone!

I am migrating an old system I developed some years ago to a containerized environment and I need some help with SSL to serve it through HTTPS. My knowledge about this topic is quite low.

The system is composed by two containers:
* Frontend. AngularJS app served above a NGINX image.
* Backend. PHP API REST served above the image [php:5.6-apache](https://github.com/docker-library/php/blob/c77c579341cfbfee90e669535ea3057679a1005b/5.6/stretch/apache/Dockerfile).

Both containers are running in a EC2 instance orchestated by Docker Swarm. The instance is linked to a domain. I know that I could get a certificate from [Let's Encrypt](https://letsencrypt.org/) but my questions are the following:

* Should I use the same certificate for the frontend and the backend (both in same domain but different ports)?
* Is there a way to renew it automatically or integrate it in my pipeline? Or what is the way to deal with this in a container environment.

Finally, if anyone have read something explaining this, please write it in the comments :)

Many thanks for your help!
Why I'm studying math at 39 years old.
Tags: advice
Published: 2018-12-03 14:31:59

---
title: Why I'm studying math at 39 years old.
published: true
description: An example of hindsight being 20/20 20 years later.
tags: advice
---
![Hangover Math Scene](https://thepracticaldev.s3.amazonaws.com/i/6lfvu7vdhwvawqze3t57.png)

I remember high school not fondly as most people do, but as a place where I was constantly under pressure. See, I was a terrible student and when I say terrible I mean C's D's and F's almost exclusively. The issue was not a learning disability, ADD or anything else it was that I was lazy. I wanted to do the things I wanted to do and homework wasn't it. I wanted to focus on the subjects that I found interesting. Unfortunately, mathematics was not on that list. 

I ended up barely getting out of high school with a C average. I tried to go to college and for an entire year I tried to fake interest and ended up flunking out. Once again math was something that put the nail in the coffin so to speak on my college life. 

So, how is it that you are reading this from a person who has been developing websites and applications for 10 years. 9 years after I flunked out of college I woke up one morning and was fired from my job in a warehouse stacking boxes. The lady who fired me had a 10th grade education and could barely read the invoices for the materials we were loading. I had two kids at the time.... and I was unemployed. The next day I realized what I needed to do.

I started by carving out 2 hours of my day and devoted it to learning. I had always been good with computers so I started there. I went online and found The New Boston and started watching his videos. I understood nothing.... and then I understood a little... and then a little more. And it finally clicked what my teachers were trying to get through to me years before. Any subject can be interesting if you study it and don't expect to know it immediately. 

Flash forward to today. Yesterday on Hacker News a blurb about a new book caught my eye. Its called [A Programmers Introduction to Mathematics](https://jeremykun.com/2018/12/01/a-programmers-introduction-to-mathematics/) and once again that feeling of regret at all the times I drooled on my notebook in Algebra came back to me. So I bought it.. and now I am sitting here in my big chair with a cup of coffee trying to grok polynomials. Something I should know have learned 20 years ago... But better late than never right?
Time Zone management on OpenBSD 6.4
Tags: openbsd, timezone
Published: 2018-12-03 14:25:48

---
title: Time Zone management on OpenBSD 6.4
published: true
description: This post is about how to check and configure the timezone in OpenBSD.
tags: OpenBSD, timezone
cover_image: https://thepracticaldev.s3.amazonaws.com/i/i0ufxdser4m66pl8bmij.jpg
canonical_url: https://obsd.solutions/en/blog/2018/12/03/timezone-management-on-openbsd-64/index.html
---

*\* The cover image is originally by [Tentes](https://pixabay.com/en/users/Tentes-682637) and edited with great appreciation.*

# Summary

This post is about how to check and configure the timezone in [OpenBSD](https://www.openbsd.org/).

### Environment

- OS: OpenBSD 6.4 amd64

<center>✿ ✿ ✿</center>

# Tutorial

### Step 1: Check the timezone

Let's check the current timezone with [`date`](https://man.openbsd.org/date) command:

```shell-session
$ date
Mon Dec  3 13:43:30 UTC 2018
```

We have UTC.

According to their documentation on [TZSET(3)](https://man.openbsd.org/tzset.3),

- `/etc/localtime` is "local time zone file".
- `/usr/share/zoneinfo` is "time zone information directory".

Then, let's investigate why it is by checking `/etc/localtime`:

```shell-session
$ ls -l /etc/localtime
lrwxr-xr-x  1 root  wheel  23 Jun 12 21:27 /etc/localtime -> /usr/share/zoneinfo/UTC
```

Now we know it is because `/etc/localtime` is linked to `UTC` in `/usr/share/zoneinfo/`.

### Step 2: Configure the timezone

How can we configure the timezone?
Let's change the link with [`ln`](https://man.openbsd.org/ln) command:

```shell-session
# ln -fs /usr/share/zoneinfo/%your-location% /etc/localtime
```

In my case in Japan:

```shell-session
# ln -fs /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
```

The result is:

```shell-session
$ date
Mon Dec  3 22:56:30 JST 2018
```

Yep 😃

---

# Reference

[OpenBSD FAQ - General Questions - Time Zone](https://www.openbsd.org/faq/faq8.html#TimeZone)

They say:

> If you have need to change the time zone, you can create a new symbolic link to the appropriate time zone file in /usr/share/zoneinfo.

<center>✿ ✿ ✿</center>

Happy serving 🕊
Im 17 working as a software development apprentice, Ask Me Anything!
Tags: ama, career, software
Published: 2018-12-03 13:11:19

---
title: Im 17 working as a software development apprentice, Ask Me Anything!
published: true
tags: #ama #career #software
---

Hi! 
Im 17 years old and 7 months into my software development apprenticeship in london primarily doing web development. Ive learnt both front end and back end development and want to answer your questions to spread how an apprentice can benefit your company and for people my age show that it could be a better route than UNI :) thanks

AMA
Help! I'm a Tech Lead
Tags: techlead, leadership, career
Published: 2018-12-03 12:53:17

---
title: Help! I'm a Tech Lead
published: true
description: What do I do now?
tags: tech lead, leadership, career
---

![Current feeling](https://media.giphy.com/media/6BK4RVBsgXwBy/giphy.gif)

I recently became the Technical Lead at the company I work for, [Primitive Social](https://www.primitivesocial.com/). We're a smaller software team, but growing somewhat quickly. The job description is a little fluid, as its a new role and I have some privilege to turn it into what it needs to be.

**My question for you: What does it need to be**

What are the most essential parts of being a tech lead? What do you wish your tech lead would do for you?

And what do you think are some of the most important technical standards you think need to be written? (There are no wrong answers, every answer has value, no matter how "obvious")
My first steps with YouTube
Tags: discuss, youtube
Published: 2018-12-03 12:45:23

---
title: My first steps with YouTube
published: true
description: Started doing YouTube videos as bakedbird
tags: discussion, youtube
---

It all started about a month ago when I bought a new camera...

I am a big fan of some great programmer-YouTubers and I was thinking about starting my own channel since 1) there are not many channels of this kind and 2) why not?

Being honest, I have to admit that I was shy at first, not knowing what to say or how to start but as December was approaching, I thought I could start with this popular kind of YouTube videos called Vlogmas. I learned about them from my wife, with whom I spend hours everyday watching YouTube videos, and I noticed that no other programmer-YouTuber does this kind of videos! I don't know why, but I saw a gap and thought about making the start!

It's all going to be about programming, so I thought that Vlogmas is not a great name to go by, since it's labeled by fashion and makeup vloggers. So I thouht about it and chose to name them Codemas! :D

I don't know if this attempt will succeed, but I am surely going to try it out! I do hope though that it's going to be a nice push for other programmer-YouTubers to start doing Codemas videos. After all, it's a great chance to get to know them/ each other better.

Below are the first two videos I have made so far. If you watch them, I would really love to have some feedback! It's a start so, I would like some direction!

Also, feel free pitch ideas for the next videos. Would you subscribe? What would you like to watch?

I really enjoy this fresh start of mine, it's a nice unexplored territory that I hope you come explore with me!

{% youtube HrhlgH5Xfew %}

{% youtube _l9Q9tlpm8A %}