teleren/devto huggingface dataset:
How Do You Take Care Of Yourself?
Tags: productivity, bootcamp, life, success
Published: 2019-12-30 06:45:19

# Is This Really About Coding?

##Yes. Kind of. Look, let me tell you a story:

![alt text](https://media.giphy.com/media/3ov9k7k39byaUPrmIE/giphy.gif)

Once upon a time there was a person. This person wanted to transform his life by learning how to code, so [he joined a bootcamp](https://dev.to/shawnhuangfernandes/booting-up-bootcamp-weeks-1-5-1bnp).

He had never really coded before, and he knew it would be a large commitment, both in terms of time and emotions.

*'That's okay, I'll work hard, try my best, and transform my life for the better!'* he told himself. 

Obtaining a life full of meaning and opportunity was on the forefront of his mind, which motivated him to focus on the bootcamp, focus on learning as quickly as possible.

![alt text](https://media.giphy.com/media/IPbS5R4fSUl5S/giphy.gif)

The bootcamp threw a lot of new, weird stuff his way such as javascript, the squid operator, and going to happy-hours.

He felt good. He was studying hard, networking, working on projects, going to hackathons, and volunteering.

## But Then It Happened

11 weeks into the bootcamp, the person's partner came up to them and said:

*"Hey! Just a heads up, I booked us for that 4-day wedding photo shoot in China so we can have some awesome wedding photos. It's coming up in 2 months!"*

Jokingly, she added: *"We gotta make sure we're in shape!"*

The person took a hard look in the mirror and realized that **although he'd been working hard towards his dream of getting into tech, he had been neglecting his health as a result.**

He thought about the future he was working towards, and **he realized he had to take care of his health as well as his studies, because he couldn't enjoy the fruits of his labor if he wasn't in good health**.

*Also, he wanted to look bomb-diggity for his wedding photos, because otherwise people would know that his partner was indeed, out of his league.*

So he decided to eat right, and planned on exercising daily with one of his bootcamp peers!

## Moral Of The Story: Take Care Of Yourself

We work hard and sacrifice a lot as an investment to our future-selves. Sometimes in that pursuit, we neglect our health and fitness because we say:

- We have other priorities, more important priorities
- We don't have the time
- We don't want to be body builders
- We never have come exercising or dieting properly
- We find it boring, or pointless

Whatever the reason may be, taking some time to make sure you're remaining in good health is really important, because as you work towards success, **your health will determine whether or not you (and your loved ones) can enjoy that success or not**.

![alt text](https://media.giphy.com/media/xT5LMBc1W9lVSheDnO/giphy.gif)

##Do You Struggle With Maintaining Your Health?

I would absolutely love to know what challenges you run into as a developer, when it comes to maintaining your health, and how you deal with it!

Good Luck In Your Own Endeavors!
Shawn
Running a book club in PostCo 
Published: 2019-12-30 06:34:52

This article will be about our learnings running a tech book club in PostCo for the past 3 months. 

Our motivation
We want to try to cultivate a strong learning culture in PostCo, book clubs are a fast way to encourage cross learning and healthy discussion among team members.  We decided to start with a book that is simple enough and is on everybody’s reading list, Pragmatic Programmer by Dave Thomas and Andy Hunt.

Running the book club 
1. Setup a recurring calendar invite 
2. A Github wiki to keep track of the discussions.
3. Inform ahead to the participants which chapter will be in discussion.
4. We encourage everyone to go through the chapters, so that everyone is in line with the topics that will be discussed in the book club sessions. This allows conversation and discussion to flow more smoothly. 

Learnings: 
1. We would encourage active participation by encouraging questions in the middle of the session.
2. Create a page, in which participants can propose new books for the book club. 
3. One person leading the talk normally does not work,  participants will rely too much on the lead to delivery book’s content rather than reading the content themselves.
4. Active participation, where participants should bring up topics they found interesting in the chapter. 
5. Generate follow-up discussion in Slack channel participants can post interesting blogs, videos, papars that related to the day.

Some of the books which are currently in our list. 
1. Seven Databases in Seven weeks
2. 99 Bottles by Sandi Metz
3. Structure and Interpretation of Computer Programs 
4. Design patterns in Ruby 

Conclusion
Book clubs are a great way to level up your team, and encourage healthy discussion between members.
🛡️ DevOps Cheat Sheet
Tags: devops, kubernetes, docker, git
Published: 2019-12-30 06:23:00

**Git** is the open source distributed version control system that facilitates GitHub, Bitbucket and GitLab activities on your desktop or laptop computer. This cheat sheet summarizes commonly used Git command line arguments for quick reference.

*Configuration*

The following command line arguments are to configure user information for all local repositories.

Sets the name you want attached to your commit transactions

`git config --global user.name "Orestis Pantazos"`

Sets the email you want attached to your commit transactions

`git config --global user.email "opantazos@gmail.com"`

*Create repositories*

When starting out with a new repository, you only need to do it once; either locally, then push to GitHub, or by cloning an existing repository.

Turn an existing directory into a git repository.

`git init`

Clone and download a repository that already exists on GitHub, including all of the files, branches and commits.

`git clone https://github.com/orestispantazos/java-ee-kickoff-app`

*Branches*

Branches are an important part of working with Git. Any commits you make will be made on the branch you are currently checkout out to. Use `git status` to see and check which branch that is.

Creates a new branch

`git branch hotfix/test`

Switches to the specified branch and updates the working directory

`git checkout hotfix/test`

Combines the specified branch's history into the current branch. This is usually done in pull requests, but is an important Git operation.

`git merge hotfix/test`

Deletes the specified branch

`git branch -d hotfix/test`

*The .gitignore file*

It may be a good idea sometimes to exclude files from being tracked with Git. This is typically done in a special file name `.gitignore`.

*Synchronize changes*

Synchronize your local repository with the remote repository on GitHub.com.

Combines remote tracking branch into current local branch.

`git merge`

Uploads all local branch commits to GitHub.

`git push`

Updates your current local working branch with all new commits from the corresponding remote branch on GitHub.

`git pull`

*Note:* `git pull` is a combination of `git fetch` and `git merge`

🔁 To Be Continued 🔁
Ansible notes: group_names
Tags: ansible, devops
Published: 2019-12-30 06:20:46

In ansible, `group_names` is a list (array) of all the groups the current host is in.  
This can be used in templates using Jinja2 syntax to make template source files that vary based on the group membership (or role) of the host: 

```
{% if 'webserver' in group_names %}
   # some part of a configuration file that only applies to webservers
{% endif %}
```

For example, If I must run a task for certain host in the group of hosts.

And the inventory hosts file shown as follows.
```yaml
[all]
node1  ip=192.168.1.1
node2  ip=192.168.1.2

[delpy_infra]
node1
node2

[special]
node2
```

And here's the task. 
You can use `group_names` to specify the certain host.
```yaml
- name: Speciall ops for special nodes
  command: "/usr/bin/special.sh"
  when: "'special' in {{ group_names }}"
```
My 2020 Goals
Tags: goals, newyear, discuss
Published: 2019-12-30 05:47:08

I’m not usually one to set “goals” but having recently got a new job that’s all about goal setting I’ve decided I need to use this in my personal life too!

## 1. Write more
Writing about things helps me retain knowledge better, so once I learn a new thing, I want to write about it help me, and also help others who may be having the same issue.

## 2. Attend more meetups
We don’t have very many meetups here in Melbourne but would love to attend more and engage in the tech community.

## 3. Learn more
To stay on top of my game I need to take more initiative to learn more, expand my knowledge and learn new technologies 

## 4. Engage more
I spend all my time reading things and replying in my head but I need to start engaging in conversation and helping people out.

## 5. Start a blog!
This isn’t too hard because I’ve built a lot! But I finally need to get it done and live.

What are your goals for 2020?
What's the longest stretch you've done at work?
Published: 2019-12-30 05:39:12

Mine's 3 days(Friday to Sunday). Had some short naps though. We needed to fix a production issue which was not even caused by our team.:D We had to deploy a new version of our application(a replacement of the one which caused the issue) to resolve it. News reached us that we need to stay reached us on Friday late afternoon, around 5pm and we were able to go back home on Sunday afternoon. I was 15 younger then so I was able to cope. I even went to work the following Monday. 

How about you, what's your longest stretch?
Create VPC using awscli
Tags: devops, aws, vpc
Published: 2019-12-29 23:35:37

---
title: Create VPC using awscli
published: true
description:
tags: devops, aws, vpc
---
The main idea of this post is to have an easy way to remind how to setup a VPC using [awscli](https://aws.amazon.com/cli/), and it's not intended to explain how a VPC works and what are the benefits of them.

# The setup
Assuming that you already have awscli in place and configured, this is what we should do in order to have a working VPC:

- Create a VPC with a /16 subnet (it can be /17, /18, etc. but never less than /16). I'll be using **10.88.0.0/16** for this example.
- Create, at least, in different availability zones:
  - Two public subnet: **10.88.0.0/24** and **10.88.1.0/24**
  - Two private subnet: **10.88.2.0/24** and **10.88.3.0/24**
- Create an Internet gateway and attach it to the VPC.
- Create an Elastic IP Address.
- Create a NAT gateway, attach to it the Elastic IP and place the NAT gateway in the public subnet.
- Create a couple of routing tables:
  - Assign public subnet to Internet gateway with destination of 0.0.0.0/0
  - Assign the private subnet to NAT gateway with destination of 0.0.0.0/0

# How it should be done.
This is the full list of commands that reflects the scenario described in the setup section. I won't explain each command, but feel free to ask in the comments:

```BASH
aws ec2 create-vpc --cidr-block 10.88.0.0/16
aws ec2 create-subnet --vpc-id $VPC_ID --cidr-block 10.88.0.0/24 --availability-zone us-east-1e
aws ec2 create-subnet --vpc-id $VPC_ID --cidr-block 10.88.1.0/24 --availability-zone us-east-1f
aws ec2 create-subnet --vpc-id $VPC_ID --cidr-block 10.88.2.0/24 --availability-zone us-east-1e
aws ec2 create-subnet --vpc-id $VPC_ID --cidr-block 10.88.3.0/24 --availability-zone us-east-1f
aws ec2 create-internet-gateway
aws ec2 attach-internet-gateway --vpc-id $VPC_ID --internet-gateway-id $IGW
aws ec2 create-route-table --vpc-id $VPC_ID
aws ec2 create-route --route-table-id $RTB --destination-cidr-block 0.0.0.0/0 --gateway-id $IGW
aws ec2 allocate-address --domain vpc
aws ec2 create-nat-gateway --subnet-id $PUBLIC_SUBNET --allocation-id $EIP
aws ec2 create-route-table --vpc-id $VPC_ID
aws ec2 create-route --route-table-id $RTB_PRIVATE --destination-cidr-block 0.0.0.0/0 --gateway-id $NGW
aws ec2 associate-route-table --subnet-id $PUBLIC_SUBNET0 --route-table-id $RTB_PUB
aws ec2 associate-route-table --subnet-id $PUBLIC_SUBNET1 --route-table-id $RTB_PUB
aws ec2 associate-route-table --subnet-id $PRIVATE_SUBNET2 --route-table-id $RTB_PRIV
aws ec2 associate-route-table --subnet-id $PRIVATE_SUBNET3 --route-table-id $RTB_PRIV
```

# Tips and tricks.
As a lot of reference to previously created resources is needed, I found useful to create a file with the following format:
```BASH
export VPC_ID="vpc-<some_long_id>"
export PRIV_SUBNET="subnet-<some_long_id>"
export PUB_SUBNET="subnet-<some_long_id>"
```
And time to time I run `source file_with_var` so I can easily access them using the `$`.
Library for ReactJs
Tags: react, vscode, javascript, uiux
Published: 2019-12-30 05:27:22

---
title: Library for ReactJs
published: true
description: For fast UI development use ant design
tags: reactjs, vscode , javascript , ui/ux

---

#INTRODUCTION

For fast development you can use ANT DESIGN .

#INSTALLATION

1. Go to your application folder where package.json file exist

2. $ npm install antd

wait for installation .... enjoy UI component from ant design.


Note: You can use many more library of your choice.
What are lambda expressions in Python?
Tags: python, beginners, lambda
Published: 2019-12-30 05:10:21

---
description: This article goes over what lambda expressions are in Python and how you can use them to replace disposable functions making for more clean and concise code.
---
# What are lambda expressions?
lambda expressions in Python are best described as ***single-use anonymous functions***. What I mean by this, can be explained with a quick example.
```python
[1,2,3,4,5]
```
I have this list of numbers that I want to square (multiply by itself). I could create a function like so.
```python
def square(number):
    return number*number
```

This works fine, but what if you only need to do this one time? It would be a little cumbersome to have a function dedicated to this pretty menial task. We can use a lambda express for this instead.

```python
lambda number: number*number
```
So you can see what's happening by referencing the above function next to our lambda expression. We declare `lambda` so the interpreter knows this is a lambda express. The first item is then the parameter which replaces the `number` argument in the `square()` function. Next is the actual result of the expression, `number*number`.

Here's an example using `map()` to get the squared result of each number in our list.
```python
list(map(lambda number: number*number, numbers))
> [1,4,9,16,25]
```

I hope this is a good example to help you grasp lambda expressions so you can avoid huge pages of disposable functions!
disk_filling
Tags: disk, linux, cheatsheet
Published: 2019-12-30 05:05:03

### identify the filling disk
```df -h```

### find the culprit
*pipe sort -h will sort by size.*

```du -h --max-depth=1 /var```

*Use -x it restricts to only where its ran*

### zipping and compressing

```cat /var/log/solr/solr.log | gzip > /data/solr.log.gz```


### zip multiple directories into individual files

*be careful you are in correct directory…*.

```for i in */; do zip -r "${i%/}.zip" "$i"; done```


### back up log somewhere with more space

```cat /var/log/jboss/server.log.2016-03* | gzip > /usr/bak/server.log.2016-03.gz```

### zero out the log file without disrupting the process

```tar cf - test/ | gzip > test .tar.gz ```

```tar cf - /var/log/jboss/server.log.2016-03* | gzip > /usr/bak/serverlog201603.tar.gz ```

```echo > /var/log/solr/solr.log ```


### delete all files older than 5 days (fix the command to actually use it, ya dope)

```find /path/to/files* -mtime +5 -exec 'are em' {} \;```



### find whats eating up space if root partition /  is eating up space

```find / -xdev -size +1000M ```


### nested find, better than du -h -max-depth, less memory intensive

```for i in $(find /data/users -mindepth 1 -maxdepth 1 -type d) ; do echo $i && find $i -type f -exec du -x {} \; | awk '{ print $1 }' | paste -sd+ | bc ; done```

## TODO
- merge or add notes on LVM
- merge or add notes on NFS
How to Create a simple Calculator App with Android Studio and Kotlin
Tags: kotlin, android, tutorial, beginners
Published: 2019-12-30 03:57:33

## Android Programming with Kotlin for Beginners - How to Create a simple Calculator App with Android Studio and Kotlin

### Learn the basics about Android Studio and programming with Kotlin. 

#### In this course you will create a simple calculator app with Android Studio and Kotlin. You will learn basic things about the android frameworks activities, fragments and views.

You will create custom views and layout them inside a Constraint Layout.

You will learn the advantages of the Model-View-Presenter Architecture, how to use it and how to implement it in our calculator app.

**What you'll learn**
* Android
* Kotlin
* Basic Model View Presenter Architecture
* What is an activity?
* What is a fragment?
* What is a view?
* How to use a Constraint Layout?

{% youtube Eq3NPoGrSt0 %}
ReactJS - How to Start React Application
Published: 2019-12-30 04:59:07

STEP - 1

npx create-react-app application-name-of-your-choice

// this will create a new application name application-name-of-your-choice

STEP - 2

cd application-name-of-your-choice 

// this will move you to your application folder.

STEP - 3

npm start 

// this will start your development server with localhost.

HAPPY CODING...........
Reflections
Tags: career
Published: 2019-12-30 04:52:31

This year has been a milestone for me. I have managed to shift my career to tech, learning enough skills to make myself marketable in the industry. I am so blessed to have had all the support and friendships that I have had along the way, and I know that I am only just starting out on my journey as a Software Engineer.

Over the course of six months, I have learned how to be a competent full-stack web developer, utilizing Javascript and Ruby on Rails. To continue to grow as a forever student, I plan on tackling Python, Django, and Node.js next. So many companies desire machine learning in the current market that I feel like Python is the best skill to learn to remain a competitive, desirable candidate.

Many companies will be refreshing their budget for staffing come January. The job hunt will renew in earnest come the new year, and I am hungry to find a position where I can really flex my creativity and problem solving skills.
Learn the basics of React and using NPM
Tags: react, npm, javascript, webdev
Published: 2019-12-30 04:44:42

## Learn React Fundamentals in 1 Hour - Learn the basics of React and using NPM

### In this course you will quickly learn all the basics of React and using npm. Learn the fundamentals like components, state, props, lifecycle methods, css, lifting state, etc.

Here are some notes about react from the landing page:

"React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.

Declarative views make your code more predictable and easier to debug."

"Build encapsulated components that manage their own state, then compose them to make complex UIs.

Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM."

"We don’t make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code.

React can also render on the server using Node and power mobile apps using React Native."

What you'll learn:
* What is React and why is it so popular?
* Install Node and npm and what they do
* The difference between state and props
* How to create parent and children components
* Using ES6 in React
* Simple Styling in React
* The concept of lifting up state
* Building production-ready assets
* Learn react in one hour

{% youtube F93Pzj6xk1E %}
TIL What That Thingy On The Right Is
Published: 2019-12-30 03:51:08

It’s 10:44 pm ET and Today (very recently, actually) I Learned that the thingy to the right of the unicorn is neither a paintbrush nor a pencil (what I thought it was) but is actually a save button! 

The great part is, I used to click on a post and then want to save it but thought I had to go back to the feed and find it again and save it. I have spent a great deal of time doing this painful process in the past. No more! 😅
Learning Java - Udemy Masterclass
Published: 2019-12-30 03:47:58

Last week I wrote about my first impressions of Java as a programming language. This week I'm going to write about my first impressions of the course I am using to learn that language.

I am using Udemy's [Java Programming Masterclass for Software Developers](https://www.udemy.com/course/java-the-complete-java-developer-course/). The course is a couple hundred dollars normally, but Udemy hosts massive sales all the time - I snagged it for less than $15, and did the same with the course I used to teach myself the basics of Redux back in October. If you're looking to get it and aren't in a hurry, I'd recommend keeping an eye out for those sales.

The course is created and taught by a man called Tim Buchalka. The format is a series of videos - just a couple introductory ones where you're watching him talk in front of you, and then the rest are capture of his screen as he codes. In addition to the videos there are coding exercises that you can actually enter in and get confirmation on. I've only completed the first couple sections of the course, since I'm busy with the holidays. That being said, from what I've seen so far the program is really solid.

There's a lot of good content presented clearly and thoroughly, in an order that makes sense, and with guidance on how best to learn from the course. And best of all, there's a lot of support. Since so many thousands of people have taken this course over the years (he even keeps updating it as Java updates!), there's a big community of people who have had the same questions as you most like, and there's a good system for searching the discussions by lecture so you can find the help you need. 

Tim himself is a good presenter. He has an Australian accent and talks just a bit fast, which may be difficult to understand for some, but there's good close captioning provided. I tend to leave it on all the time even though I don't have any trouble understanding him, just to help my processing. 

Personally, since these early stages are just teaching me a different style of content I pretty much know already, having worked with Javascript and Ruby, I have been watching every video on at least 1.5x speed and only pausing when I want to take a little extra time for notes or to copy some code. The entertaining result is listening to an extremely fast Aussie amiably explaining things to me, and that's just great.

As I get a little further into the meat of the course I may have more to say about it, and I'm certain I'll have more to say about Java!
[JS] Universal language detector
Tags: javascript, universal, languagedetector, i18n
Published: 2019-12-30 03:27:13

We've been working with i18n (internationalization) for a few months, and we couldn't find any easy way of knowing what's the user's language that works both on the browser and on the server.

There are tons of libs out there, but none that are working universally. So, we decided to outsource our proprietary implementation and release it under MIT license.

Also, because we're fans of the Next.js framework, we've made an integration example with a demo available there:
https://universal-language-detector.now.sh/


https://github.com/UnlyEd/universal-language-detector

Did you get stuck too with a similar issue when implementing i18n? How did you sort it out? Does this lib help? Let us know! :)