teleren/devto huggingface dataset:
Easy Way To Backup Your Data In GNU/Linux
Tags: linux, sysadmin
Published: 2018-11-29 07:26:23

---
title: Easy Way To Backup Your Data In GNU/Linux
published: true
description: A short tutorial how to backup your data in Linux OS
tags: linux, sysadmin
cover_image: https://thepracticaldev.s3.amazonaws.com/i/qk6mip61lxe18nek7i7g.jpg
---

Data is one thing that is very important for us. Data loss is a disaster for everyone, including a System Administrator. Therefore, it is necessary to backup your data regularly. In Linux we can easily to backup data automatically and scheduled. The following will explain how.

## Step 01 – setup ssh

This step should be done because we will upload the backup file to a remote server. At this stage we will arrange to login SSH without password.

Create RSA key:

```bash
mkdir -p ~/.ssh  
touch ~/.ssh/authorized_keys  
ssh-keygen -t rsa -b 2048  
chmod go-w ~/  
chmod 700 ~/.ssh  
chmod 600 ~/.ssh/*
```

Upload public key to backup server:

```bash
ssh-copy-id -i ~/.ssh/id_rsa.pub '-o StrictHostKeyChecking=no REMOTEUSER@REMOETHOST -pREMOTEPORT'  
```

Create backup directory in local and remote server:


```bash
mkdir -p /var/backup; chown -R REMOTEUSER /var/backup  
ssh REMOTEUSER@REMOETHOST -pREMOTEPORT 'sudo mkdir -p /var/backup; sudo chown -R REMOTEUSER /var/backup'
```

## Step 02 – install backup2l

```bash
# In RedHat based distros:
yum update  
yum install backup2l

# In Debian based distros:
apt-get update  
apt-get install backup2l 

```

Or you can build it from source. Please read the official documentation for more information.

## Step 03 – configure backup2l


Edit `/etc/backup2l.conf` and create configuration like this:

```bash
FOR_VERSION=1.5  
VOLNAME="all"  
SRCLIST=(/etc/apache2/sites-available /home)  
SKIPCOND=(-path "/home/REMOTEUSER" "/etc/apache2/sites-available/default*" "*.nobackup*" -o -name "*.o")  
BACKUP_DIR="/var/backup"  
MAX_LEVEL=3  
MAX_PER_LEVEL=9  
MAX_FULL=2  
GENERATIONS=1  
CREATE_CHECK_FILE=1  
AUTORUN=0  
SIZE_UNITS="M"  
UNCONFIGURED=0  
CREATE_DRIVER="DRIVER_TAR_GZ"  
PRE_BACKUP () {  
  echo -e "  Backup MySQL Databases:"
  echo -e "  -----------------------"
  /usr/bin/mysqldump -u root -p --all-databases --skip-lock-tables | bzip2 > /home/all_db.sql.bz2
}
POST_BACKUP () {  
  echo -e "  Uploading Backup File to Backup Server:"
  echo -e "  ---------------------------------------"
  /usr/bin/scp -r /var/backup/all.*.tar.gz REMOTEUSER@REMOTEHOST:/var/backup/.
}
```

Create Cron for auto backup, in this example I just create automatic backup every week. You can edit as you want.

```bash
cat > /etc/cron.d/autobackup <<EOF  
@weekly /usr/sbin/backup2l > /dev/null || nice -n 19 ionice -c 3 backup2l -b
EOF
```

**Important:** You can modify the configuration as you want. Remember to change __REMOTEUSER__, __REMOTEHOST__, and __REMOTEPORT__ variables.
How to make this type of landing page??
Tags: website
Published: 2018-11-29 06:46:27

---
title: How to make this type of landing page??
published: True
description: This is the link of website https://thedrawingroomcreative.com/ 
tags: Website 
---

https://thedrawingroomcreative.com/
this is the website !! please if anyone can help me making this type of landing page
Change is good. You go first. 
Tags: webdev, productivity, codenewbie, career
Published: 2018-11-29 06:37:01

---
cover_image: https://www.nextavenue.org/wp-content/uploads/2017/05/If-I-Could-Change-My-Career-at-60-So-Can-You_61822822-1-750x485.jpg
title: Change is good. You go first. 
published: true
description: A Change Management Model for everyday use, even Web Development.
tags: #webdev #productivity #codenewbie #career
---
As a boot camp student, it’s been a bit surreal to sit in a classroom again.  From what I’ve learned so far, if someone is contemplating a career in web development but doesn’t enjoy the intricacies of problem solving, or sorting through copious lines of code to discover that the malfunction is related to a typo, then web development is probably not the best career choice.  In some ways web development is like untangling and enormous pile of jumbled-knotted rope.  For some people, they’d take one look at the gigantic mess and either panic or walk away.  For others, the appeal of a puzzle is exciting and the act of chasing down individual strands of rope to find the first end is satisfying. 

In a traditional learning environment, a specific subject builds mastery over a defined period. A boot camp environment builds a broad knowledge base in a fast-paced learning environment.  Simply saying the word ‘boot camp’ evokes images of military themed movies with a drill sergeant and new recruits where the intensity of the training is visible.  The environment for a web development boot camp is similar in the level of immersion into a fast-paced learning environment that’s hands on, engaging, requires significant attention, time and energy.  Learning anything new can conjure feelings of frustration, self-doubt or discomfort and it can catch some people off guard. 

Learning is CHANGE. You may be familiar with the traditional “Change Curve.”

![change curve](https://thepracticaldev.s3.amazonaws.com/i/76t9nlhr16aijm7ghk69.jpeg)
According to William Bridges, Managing Transitions, change is situational however transitions are psychological.  Transitions have an ending phase, the letting go of old ways and old identities.  The neutral phase is exploration and learning.  The “old” is gone however the “new” hasn’t arrived yet. Last is new beginnings, a phase of new identities, new energy and discovering a new purpose.  Every person experiences this differently with different reactions and at different paces.  Let’s face it change, of any type, is difficult but it can be easier with the right tools.  

Part of my non-technical background was spent as a certified practitioner of change management through Prosci Change Management.  Their model for change, ADKAR, is simply fantastic and can be applied to any professional or personal situation, even web development! 

Check out [part two](https://dev.to/kymiddleton/change-is-great-ill-go-first--11jm) to learn more about this model and how it can help you.
Just Fucking Ship Taught Me How to Ship Blog Posts
Tags: productivity, blogging
Published: 2019-03-02 16:19:16

---
title: Just Fucking Ship Taught Me How to Ship Blog Posts
published: true
tags: productivity, blogging
canonical_url: https://www.kahlillechelt.com/2018/11/29/just-fucking-ship-taught-me-how-to-ship-blog-posts/
---

[Just Fucking Ship](https://stackingthebricks.com/just-fucking-ship/) by [the most excellent Amy Hoy](https://mobile.twitter.com/amyhoy) is a great book. It’s about how to bootstrap and ship any (side-)project.

The most valuable part of the book for me personally was how she describes outlining a blog post.

I always thought outlining a post was to come up with some high-level headlines. That never really helped though, because they were too high-level and I was still busy working on the structure of the blog post on the fly while filling in the gaps between the headlines.

No, what I learned from Amy is that you have to write down each and every thought that you want to put into that post. Write them down, fuck structure, fuck grammar, fuck spelling.

Put it all on (virtual) paper. Now that you did that you can look at it and move your points around, give the whole thing some structure, delete some, add some.

Once you are happy with that, you go ahead and _write_ the blog post. At this point its super easy because all you need to do is write it out, you are not structuring it while you write it anymore.

This makes so much sense because it completely separates writing a blog post into two smaller isolated steps:

1. Determine content & structure
2. Write it

Take this here blog post for example. When I first started writing it I started with a big introduction about the book and Amy and bla and immediately I got bored of my own words.

That made me stop and think again: what is it really I want to convey with this post?

1. Just Fucking Ship is great
2. Here is why it was great for me

So I deleted everything and just wrote Just Fucking Ship is a great book and went on writing about my greatest take-away from it.

I feel like it makes this post much more meaty and interesting for somebody to read. It definitely is much more fun to write.

For closing I would like to add that there are also many more surprising tips in that book to help you finally start and also _actually ship_ your side project.

But instead of telling you what they are I would rather you go and support Amy Hoy and get yourself the book! It’s a really quick read and it is worth it.
IOS & Android API Oauth implementation in Node.js
Tags: discuss, javascript, node, webdev
Published: 2018-11-29 05:42:46

---
title: IOS & Android API Oauth implementation in Node.js
published: true
description: Will this api snippet will work for FB Oauth implementation in both ios and android. 
tags: discuss,javascript,node,webdev
---

I'm new in mobile API's development & I have to integrate fb oauth in my API for both ios and android.Is this is correct way to implement fb oauth in API ? 

  ![API Snippet](https://thepracticaldev.s3.amazonaws.com/i/sudhx5x7yev8wtpe9kj7.PNG)
pixelRestorer
Tags: pixelart, images, restoration, javascript
Published: 2018-11-29 05:37:39

---
title: pixelRestorer
published: true
description: Using statistics to restore pixel art images.
tags: pixelart, images, restoration, javascript
canonical_url: https://github.com/victorqribeiro/pixelRestorer
cover_image: https://thepracticaldev.s3.amazonaws.com/i/w403dbtnphi42l2sksf0.png
---

# pixelRestorer

Using statistics to restore pixel art images.

Read more about it and get the code [here](https://github.com/victorqribeiro/pixelRestorer) or see it live [here](https://victorribeiro.com/pixelRestorer)
Joined the Daily Coding Problem? Snazz up that README with a grid!
Tags: dailycodingproblem, badges, svg
Published: 2018-11-29 05:25:49

---
title: Joined the Daily Coding Problem? Snazz up that README with a grid!
published: true
description: I made a thing
tags: dailycodingproblem, badges, svg
---

I recently joined the [Daily Coding Problem](https://dailycodingproblem.com) after reading [this post](https://dev.to/cwetanow/daily-coding-problem-1-23e0) about it.

Little coding problems like this are right up my alley. You know what else is right up my alley? BADGES.

So, I present, [dcp-badger](https://github.com/caseyWebb/dcp-badger).

![](https://apps.caseyWebb.xyz/dcp-badger.svg?repo=caseyWebb/dcp)

It's quite a simple little app that uses the file naming schema to build the above grid to track your completion and activity, and was a fun opportunity to try out some things I've been curious about for a while, like:

- [RegExp named capture groups](https://github.com/tc39/proposal-regexp-named-groups)
- Server-side JSX
- Dynamic SVG (inspired by shields.io)
- [zeit/micro](https://npmjs.org/package/micro)

So yea. Grids for everyone! +1 Vanity.
Big Tech Company Interview Advice Thread
Tags: discuss, career
Published: 2018-11-29 02:34:52

---
title: Big Tech Company Interview Advice Thread
published: true
description: Give and receive advice on big tech company interviews
tags: discuss, career
---
Inspired by some of the comments in the thread about people's worst interview experiences about big tech company interviews, I thought that it would be a great idea to start a conversation with questions about interviewing at the big tech companies and answers from people who have interviewed with them.

{% link https://dev.to/sergio/what-was-your-worst-interview-experience-4d4n %}

I've only done one "big 5" interview, I'm more of a startup person and can't see myself working at one! That being said, [here](https://github.com/aspittel/coding-cheat-sheets) are some notes that I took while prepairing for that interview almost two years ago! I would also highly advise you to get really comfortable with graph traversal problems because those seem really popular now. That being said, it was my first experience with technical interviewing (went straight into the deep end!) and didn't make it too far!

I've gotten recruited a few times from a couple of the big 5 companies as well. One was (I think) because I did okay in Google's [Code Jam competition](https://codingcompetitions.withgoogle.com/codejam/) (that was the one time I accepted an interview), I've also gotten invited to [FooBar](https://medium.com/magentacodes/things-you-should-know-about-google-foobar-invitation-703a535bf30f) through searching Python stuff so if I wanted I could have completed the challenges and interviewed through that I think. I've also been recruited by other big 5's through my LinkedIn, because of my blog, and due to open source contributions.

Again, I'm probably not the best to give advice here, but I will where I can and hope that others will chime in too!

**Ask questions and leave your thoughts about big tech company interviews below!**
What's a useful programming language feature or concept that a lot of languages don't have?
Tags: discuss
Published: 2018-11-29 03:37:57

---
title: What's a useful programming language feature or concept that a lot of languages don't have?
published: true
description: 
tags: discuss
---

One thing that comes to mind is Ruby's macro-style methods:

```ruby
class BankAccount < Account
  attr_accessor :balance
  belongs_to :customer
end
```

What's something your favorite language has that others don't?  Or something from a language you tried out that one time and immediately missed it in other languages?
What's Your Shell of Choice?
Tags: discuss, terminal, shell, bash
Published: 2018-11-29 03:13:08

So I just started using [`zsh` shell](http://www.zsh.org/) with [Oh My Zsh](https://ohmyz.sh/), and it's been a pretty awesome experience so far! I love the amount of plugins and configuration options that it gives you. I'm using a decent amount of the standard plugins, as well as some custom aliases, and I'm noticing that I can get around and perform basic terminal actions much more quickly than I could before.

Aside from the plugins, I'm also a fan of customizing the theme and `PROMPT`, and after spending some time about how the formatting works, I think I settled on the following, which contains my username, computer name, current directory, `git` setup (and whether or not its up to date, dirty, or clean), as well as battery life if I am not plugged into a charger. I also spaced out the prompt a little, to give my terminal a cleaner feel.

![Look at this beautiful console](https://thepracticaldev.s3.amazonaws.com/i/hpr49acjro34hsznkcfj.png)

So far I'm happy with `zsh`, and it seems to be working better with my tools and scripts versus when I tried out the [`fish` shell](https://fishshell.com).

What's your shell of choice and why? `bash`, `zsh`, `fish`, or something else? 😃
Markdown Headers Are Now Anchored!
Tags: meta, changelog
Published: 2018-11-29 02:29:58

---
title: Markdown Headers Are Now Anchored!
published: true
description: You can now link to headers in your posts! 
tags: meta, changelog
---

You can now link to headers in your posts! This happens automatically when you create a header. It will create an anchor link based on the text of your header. For example, if you have a header like "Implementation", you can visit `https://dev.to/andy/andys-post#implementation` to jump straight to the "Implementation" section of the post.

Here's a more straightforward example:
[Click to jump to the bottom of the page](#bottom)

# How to use

```markdown
[Jump to "How to use"](#how-to-use)
```

[Jump above to the "How to use" header](#how-to-use)

When using multiword headers, the anchor link will convert spaces to dashes.

# How to link to a header from a different post

You might want to link to a specific section of a different post. Well, you can do that, too:

```markdown
[External post header jump example](https://dev.to/rhymes/changelog-export-posts-1kdm#how-do-i-do-that?)
```

[External post header jump example](https://dev.to/rhymes/changelog-export-posts-1kdm#how-do-i-do-that?)

If you'd like this functionality for your previous posts, you'll need to resave the post itself.

Thanks [@glebec](https://dev.to/glebec) and [@bennypowers](https://dev.to/bennypowers) for getting the PR rolling!

# Bottom

My header is called "Bottom", so visiting `#bottom` will move you to this section of the content.

[Jump back to "How to use" section](#how-to-use)

[Check out the PR here.](https://github.com/thepracticaldev/dev.to/pull/713)

# Happy coding!
Recommend: AST for JavaScript developers
Tags: ast, compiler, chengefavor, tir
Published: 2018-11-29 01:19:44

---
title: Recommend: AST for JavaScript developers
published: true
description: 
tags: AST, compiler, chenge-favor, tir
---

AST is a data structure abstract syntax tree used in compiler. Following is a good post, recommend it.

![](https://cdn-images-1.medium.com/max/1600/1*5wXtJkRUNEKXj7MpbAZKOw.png)

[link-->](https://itnext.io/ast-for-javascript-developers-3e79aeb08343)
Build Web APIs with Aqueduct #1 (video series)
Tags: dart, api, webdev, beginners
Published: 2018-11-29 00:04:21

A couple of months ago I wrote a [series of articles](https://dev.to/graphicbeacon/building-restful-web-apis-with-dart-aqueduct-and-postgresql-55k) based on the Aqueduct framework for Dart. We developed a RESTful API serving up a list of reading materials from a PostgreSQL database.

In this series of videos, we will develop a RESTful Web API based on Aqueduct 3 for Dart 2. The API has changed since the written article, which has introduced breaking changes.

Here's the first video in the series:

{% youtube vvDomA-ru3E %}
→ [**Watch on YouTube**](http://bit.ly/aqueduct-tutorial)

---

## A brief overview of Aqueduct

Aqueduct is an open-source framework for creating and deploying RESTful Web APIs on the server. It borrows concepts from _Express_, _Hapi_ and even _.NET Web API_, offering a point of entry if you've used any of those other frameworks.

Here are some of the features it has:

1. Fluid, chainable **routing**. _A functional style to composing your routes and its handler methods_
2. A **CLI** tool. _This allows you to scaffold your next project by issuing straightforward commands_
3. **Multi-threading** out of the box. _Spins up multiple instances of your application via Dart's "isolates", scaling across all CPU cores on the server._
4. Has an inbuilt **ORM**. _A must-have if you work with relational databases! Also supports database migration._
5. Has an **integrated testing** library. _Because you need to test all the things! Plays well with tools like TravisCI._

Learn more on [their website](https://aqueduct.io#doc-callout).

Here's the [**full video**](http://bit.ly/aqueduct-tutorial).

---

**Subscribe to [my YouTube channel](http://bit.ly/fullstackdart)** for more videos covering various aspects of full-stack web development with Dart.

**Like, share and [follow me](https://twitter.com/creativ_bracket)** 😍 for more content on Dart.

## Further reading

* [**Aqueduct:** A Tour](http://aqueduct.io/docs/tour/)
* [**Free Dart screencasts on Egghead.io**](https://egghead.io/instructors/jermaine-oppong)
DynamoDB transactions
Tags: cloud, database, aws, distributeddatabase
Published: 2018-11-28 21:38:36

---
title: DynamoDB transactions
published: true
description: DynamoDB transaction
tags: cloud,database,aws,distributeddatabase
---

You have an idea and you want to try it out? 
Nice, package the code and push it to your favorite cloud provider and you are application will be instantly available to thousands, tens of thousands or even millions of customers.

Awww, it such a great time to be a developer. 
 
From now, it is even better indeed AWS just announced Dynamo DB transactions at Re:invent!

### Why does it matter?
#### Atomicity 
It enables atomic operations on multiple items, such that either all occur, or nothing occurs.
#### Isolation
What it is called Isolation from database people, it is called consistency from distributed systems people. So in this context the words are interchangeable.
Dynamo transactions provides sequential consistency by rejecting a transaction when an item is modified outside of a transaction.

Check out my old article about [consistency models](https://dev.to/napicellatwit/consistency-models-52) to know more about the implication of sequential consistency

### Resources
1. [Aws Blog post about Dynamo Transactions](https://aws.amazon.com/blogs/aws/new-amazon-dynamodb-transactions/)
2. [Follow the full list of AWS announcements during Re:invent](https://aws.amazon.com/new/reinvent/)
How to deal with the event-stream vulnerability
Tags: webdev, security, howto
Published: 2018-11-28 21:18:04

---
title: How to deal with the event-stream vulnerability
published: true
description: Simple answer on the hyped theme
tags: #webdev #security #howto
cover_image: https://thepracticaldev.s3.amazonaws.com/i/jia30y0fe77jhtc8a98c.jpg
---

For the last couple of days in the internet, you probably have seen a lot of news about **event-stream npm package vulnerability** and that package steals bitcoins. I was disappointed that I had to read tons on articles before actually get the answers on the following questions:
- **Does it affect my projects?**
- **What should I do?**

So I decided to put here my today research and a short overview as possible to help you find and fix the problem for your projects.

- existing information tells that targeted package which only affected by the vulnerability of the event-stream package is copay-dash. **If you don’t have copay-dash, relax and continue read calmly**;
- event-stream@3.3.6 had a vulnerability in the dependency package flatmap-stream@0.1.1;
- the vulnerable version of that package already removed from the npm registry;
- removing the package from the npm registry caused the issue that on npm install(fresh install, without cache) and npm audit you will get an error;
```
npm ERR! code ENOAUDIT
```
or 
```
npm ERR! code E404
npm ERR! 404 Not Found: flatmap-stream@0.1.1
```
- if you have that error, your project has vulnerable package;
- a lot of popular packages were affected, for example, **nodemon**;
- search through your yarn.lock or package-lock.json and find the root package which installs flatmap-stream@0.1.1;
- visit github pages of packages which were affected and maybe there is already new version with a fix. So just install new version with a command like `npm install nodemon@latest -D`;
- for more information about the situation read that [article](https://schneid.io/blog/event-stream-vulnerability-explained)
Game Off 2018 (FINAL)
Tags: lua, gamedev, gameoff2018, pixelart
Published: 2018-11-28 19:39:11

---
title: Game Off 2018 (FINAL)
published: true
description: Flower unlock system
tags: lua, gamedev, gameoff2018, pixelart
---

Hey!
This is the last post for this project because the game is finish! I've add some sound, gamepad support, and finish all of the other features!

![World](https://thepracticaldev.s3.amazonaws.com/i/ue6vhfj12sezcsxc7u1w.gif)

So the game is online on Itch and you can play on Windows! (I don't have compile it for Linux for now), and you can see the code on Github!

> Game : [bigaston.itch.io/hybrid-power](https://bigaston.itch.io/hybrid-power)
> Source code :  [github.com/Bigaston/hybrid-power](https://github.com/Bigaston/hybrid-power)

Thanks for your commend during all of this mounth and see you later for other project!
Styled-components media queries                
Tags: styledcomponents, react
Published: 2018-11-28 18:42:36

---
title: Styled-components media queries                
published: true
description: Interpolated or not?
tags: styled-components, react
---

In company we want to create some styled-component helper to write elegant media-queries and we are arguing which way to choose:
  * with interpolated string like: 
    ```
      styled.div`
        ${media.mobile`
          color: red
        `}
      `
```

* or returning only @media string fragment like (eg. @media (min-width: 100px):
    ```
      styled.div`
        ${media.mobile} {
          color: red
        }
      `
```
What disadvantages / caveats of this two approach?