teleren/devto huggingface dataset:
NTP (Network Time Protocol) Setup for Linux (Ubuntu) Server
Tags: linux, ubuntu, ntp, timezone
Published: 2021-04-19 22:35:41

When you launch a new Linux server, whether it's an AWS EC2 instance or a local server, by default, the server time is not synced with the NTP server and most of the times the timezone is set to UTC.

In most cases server timing synchronizing with the NTP server is very important.

Following are the steps:

### Install & Configure NTP

* Run the following command to install the NTP

```bash
sudo apt-get install ntp
```

* Open the `ntp.conf` file:

```bash
sudo vi /etc/ntp.conf
```

* Check if the NTP pool entries the same as below otherwise update it:

```bash
pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst
```

* Restart the NTP service

```bash
sudo service ntp restart
```

* Check the NTP service status by running the following command:

```bash
service ntp status
```

### Set/Change timezone

* Let's say you want to change the timezone to AEDT
* You can set it by running the following command:

```bash
sudo timedatectl set-timezone Australia/ACT
```

* Restart the NTP service

```bash
sudo service ntp restart
```

* You can confirm the result by running the following command:

```bash
service ntp status
```

* and it should you the result like the following:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/isv1e5a5gl9wc4zqif2i.png)
Signs that you're a Senior Software Engineer
Tags: career, codenewbie, webdev, beginners
Published: 2021-04-19 22:32:42

Photo by <a href="https://unsplash.com/@elsbethcat?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Beth Macdonald</a> on <a href="https://unsplash.com/s/photos/philosopher?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>

## You're asked to review and merge pull requests

Half your day will be writing comments in PRs.

Sometimes you get a call from someone to clarify a comment, it becomes a 45-minute session where you open 12 Chrome Tabs, MS Paint and start drawing boxes and arrows.

## You're spending more time in meetings than programming

The other half of your day will be participating in meetings. Sometimes you wonder if it's even necessary that you're there. Then a PM has an idea for a new feature, and you're glad you were there to advise them about it before they ignored you.

## You're bald

Your body has decided to drop your hair to keep your brain cooled to do all the processing it has to do on a daily basis. You've received a letter from the world's bald association asking you to join their monthly meetings.

## You're asked for your opinion when the team is making design decisions

You spend years learning and working hard to become someone who other people look up to. Now you are that person. It means more meetings.

## You get called in the middle of the day randomly to give your input or answer questions no one else knows

They say "It will be 2 minutes" in their message. It becomes a 30-min call.

## You're writing more documentation than coding

There was a time when you didn't even think where those docs came from. They were there from the beginning. You never stopped to think who wrote that. Now it's on you.

You realize that no one teaches you how to write docs. Docs are one of the most important aspects of great codebases. Yet nobody really teaches you or prepares you to write good docs.

## You still feel like a newbie

Your feeling of knowledge oscillates between "I know everything" and "I don't know shit"

![meme](https://pbs.twimg.com/media/EzXLj9-VIAc9ivL?format=jpg&name=medium)

## You're asked to do presentations

Sometimes you think using Comic Sans is fun because it pisses off the designers.

You have a stash of memes from the internet to add to your presentations. You only do the presentation to show the memes.

## You realize coding skills are not everything

Helping other teammates, devs or not. Sharing what you know. Trying to create a good environment for everyone to work in. Being a good person. Those things are more important than knowing how to implement an A\* Algorithm

I'm sure I'm missing a lot of things. If you can come up with one please share in the comments 👇

## Follow me on [twitter](https://twitter.com/jordienr) for more

## Check my newsletter: [Zero to Frontend](https://www.zerotofrontend.dev/)
How to choose programming language for web backend
Tags: fsharp
Published: 2021-04-19 22:31:38

Skip PHP, Python, Ruby, JavaScript and Dart. Try different, try better.

Choose Elixir or Clojure if you like dynamic types.

Take Go if you need cheap, fast, minimalistic, effective.

Choose Rust if you care about memory, performance and language being beautiful.

Skip Java. Choose Scala if you want everything from OOP and FP worlds. Choose Kotlin if you like JVM, want better Java and don't have the guts for Scala.

Skip Swift. Well, choose it if you are an iOS dev.

Choose C# if you want the balance. Choose F# if you liked the balance of modern .NET, but want more than C#.

Choose TypeScript if you really need some kind of unified codebase with frontend.

I haven't tried OCaml, Haskell, Crystal, or Nim.

I chose C#/F#.
Codecademy Python Final Project
Tags: codecademy, python, github, bash
Published: 2021-04-19 22:29:32

Hello everyone!This is my Python final project for Codecademy. This is my first project where I used python and bash on my own computer. I decided to do a small trivia game where you would need to answer 10 questions and could only get one wrong before the game would end. I have experience making a couple games in C# with Unity, but I've never made one with the terminal. 

I didn't want to worry about making the game too complicated, instead I wanted to make one that did a couple of interesting things in the code (for me at least) that would show a little bit of more advanced code than just simply using functions. These included having random questions chosen from an array, randomizing the answer choices, and removing the questions from the array once they were asked so there would be no repeats. I also made the code so I could easily remove or add questions and not need to change the functions at all. I also made it so the only line of code besides the functions and variables was game_start() and compartmentalized it to work from there.

While this is definitely a minimum viable product, I am happy with how it turned out. If I were to focus on content I would have added randomized responses to correct or incorrect answers as well as a bit more story, but that was not the focus of this project so I wanted to practice not over reaching and considering it complete.

Below is a link to the code if you would like to take a look, I would love to hear what you think! (positive or negative, I'm a big boi and can handle criticism)
https://github.com/TheHamhams/Python_Game
10 Content Tools We're Using That Actually Save Time & Money When Promoting Our Products
Tags: design, content, marketing, product
Published: 2021-04-19 22:19:47

OK, there's more than ten.
Here's some stuff we're using that works for us.
Using free tools whenever possible, but some are paid.

Wondershare Filmora — an easy and user friendly way to
edit videos together: https://filmora.wondershare.com/

Giphy — great for finding content: https://giphy.com/

EZgif — for working with GIFs: https://ezgif.com/effects

Figma - for creating ad units, and easily rendering out ad units at different sizes

AMcharts — for creating quick charts: https://www.amcharts.com/demos/?theme=dark#chart-types 

Compomnents.ai — Headline styler: https://components.ai/text-shadow?tab=editor

Screely — turn an image into a device mockup: https://www.screely.com/ 

These:

  + https://getstencil.com/ easy design
  + https://www.canva.com/ easy graphic asset design
  + https://www.kapwing.com/ images, videos, and gifs
  + https://icons8.com/creator/dashboard create images from stock assets
  + https://www.flexclip.com/  easy videos, like canva
  + https://www.kamua.com/ online video creation
  + https://haikei.app/ create SVGs in the browser
  + https://placeit.net/ place your logo or art on realistic product photos

More:

- https://thenounproject.com/ free stock photos
- https://mixkit.co/ free stock video
- https://icons8.com/music/ free stock music
- https://developer.amazon.com/en-US/docs/alexa/custom-skills/ask-soundlibrary.html free sound effects

🔥 if you appreciate this list, please follow me on twitter:
→ https://twitter.com/rowemore 🙏

⋯

╔══════════════════════════════════════╗
╠═ WHAT ARE YOUR FAVORITES?
╠══════════════════════════════════════╣
╠═ Please respond & add to the list!
╚══════════════════════════════════════╝
Day 348 : Whoa
Tags: hiphop, code, coding, lifelongdev
Published: 2021-04-19 22:17:12

_liner notes_:
- Saturday : Did some research into my new side project. Figured I would start this new one because I'll be able to work on other projects and create content at the same time. Then I did the radio show. Had a really good time as usual, but right before the show, I found out that Black Rob passed away. Whoa, that sucked! The recording of this week's show is at https://kNOwBETTERHIPHOP.com

![Radio show episode image of a US map from CNN showing where some of the mass shootings have happened in the past month with the words April 17th 2021 9-11-2021](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qoa8kr529nih99lafh5i.jpg)

- Sunday : I pretty much got all the post radio show promo work done after the show on Saturday. Spent the day, doing laundry and setting up my new side project. Got the starter project up and running and was adding Firebase to it. I set up some Authentication with Twitter and Github. I also watched an episode of "Dr. Stone". Ended the night watching "Fear the Walking Dead" and "Gangs of London". Pretty productive day.

- Professional : Had a meeting with my manager to plan out this next sprint. Then I wrote up some notes on some user test we did last week. Pretty much it.

- Personal : I noticed that the app I use to keep track of my different accounts had an issue with one account. I called them and got it situated. Got kind of worried because if I some how lose access to my account, that would suck. Super happy that it wasn't super difficult to get access back. I think the issue may have been that the tracking application may have tried to access it too many times or something. Just had to reset.

![A landscape shot from the view of a lake with 2 mountains in the background in Avachinsky, Russia](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gfekasuhzpkw8ij69zfn.jpg)

Some brackets came in for the frame that will go inside of my van. They are the same one that I bought from the hardware store that fit my aluminum pieces, except much cheaper. Now that I know, they are the same, I placed another order. Also bought some smaller framing that I'll use to build things like my work area and bed. I didn't go with the last company because that would take forever. I bought what seems like a standard size so it's pretty wildy available has a bunch of connectors. I just need to cut them down to the sizes I want. That should be coming in a couple of days. I want to finish integrating Firebase into my project. I also want to look into making it a PWA and get push notifications working. Then watch some anime. I was listening to the closing arguments of the Derek Chauvin trial and I'm basically drained.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube EC5LzftfcjI %}
Map and Set in JavaScript for Humans
Tags: javascript, webdev
Published: 2021-04-19 21:37:35

Would you like to hear more about `Set` and `Map` objects in JavaScript? 

Let's catch up with them on this thread 🧵

---

`Set` in JavaScript 👇

📌 It's not key/value like the Object type. Keys are just values exposed

📌 Don't accept duplicated values

📌 It's iterable with `forEarch` method and `for...of`

📌 Conceptually is similar to `[]`

💡 `Set` is useful to remove duplicates on `[]`.

---

`Map` in JavaScript 👇

📌 Allow/preserve any key type. Even objects

📌 Don't expose insecure data properties

📌 Iterate with `forEarch` method and `for...of`

📌 Stay the insertion order doesn't matter the type

💡 Prefer `Map` instead of `{}` for client-side data manipulation.

---

Thoughts on `Map`, `Set`, `{}`, and `[]` in JavaScript 👇

📌 Each has a specific usage in JS

📌 Use `{}` for data traffic from the server. 

📌 `Set` helps apply omit, diff, etc. on `[]`

📌 `Map` return size. `{}` don't return size

🗣 There's not a silver bullet. Use them carefully.

---

😉 Hope that you now understand better such useful objects on JavaScript, they are highly valuable, and master them will make you a better JavaScript Developer.
Precisa transferir um arquivo? O magic-wormhole vai mudar sua vida!
Tags: python, cli, terminal, filesharing
Published: 2021-04-19 21:33:41

Já precisou transferir um arquivo para alguém pela internet e não foi fácil chegar numa solução fácil? O magic-wormhole pode ser uma excelente alternativa!


 ![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oarmau5pnnfx0c5zouzx.png)

[XKCD #949: File transfer](https://xkcd.com/949/)

Esse XKCD ilustra bem a motivação do magic-wormhole, a fim de copiar um arquivo para outra pessoa, algumas vezes sites como Dropbox não são a melhor opção, e como muitas vezes não se pode encontrar fisicamente para ser via um “pendrive” (principalmente com uma pandemia 😷) o magic-wormhole cria um “túnel mágico” para te salvar✨

## Como usar

O magic-wormhole é um programa em python para ser usado no terminal, então se você já tem o python instalado basta instalá-lo com o pip:

> pip install magic-wormhole

Uma vez instalado de ambos os lados (quem envia e quem recebe), basta rodar o comando **wormhole send** seguido do nome do arquivo:

```
$ wormhole send 
Sending 45 Bytes file named 'arquivo_a_ser_enviado'
Wormhole code is: 6-wichita-reindeer
On the other computer, please run:
wormhole receive 6-wichita-reindeer
```

Agora, quem vai receber deve digitar **wormhole receive** seguindo do código gerado (6-wichita-reindeer).

É isso! Como mágica o arquivo é enviado como mágica 🤩

## Como funciona o magic-wormhole?

Sem entrar muito em detalhes, o magic-wormhole funciona em 2 partes: a descoberta e o envio em si.

1. A pessoa que vai enviar o arquivo roda o wormhole send.
2. É gerado um código (ex.: 6-wichita-reindeer), pelo servidor mailbox do magic-wormhole.
3. Quando o cliente entra com o código, a pessoa que envia e a recebe conseguem “se encontrar”.
4. É tentado uma conexão direta, entre as duas pessoas, se estiverem na mesma rede local vai funcionar e ser muito rápido, caso contrário o magic-wormhole intermedia a conexão através do seu servidor de transito (a conexão sempre é criptografada).

Quem tiver interesse para aprender profundamente como funciona veja a [palestra do Brian Warner, o autor original do projeto na PyCon 2016](https://www.youtube.com/watch?v=oFrTqQw0_3c).

Outro programa excelente que funciona de uma maneira similar, mas para outro proposito é o [Syncthing](https://syncthing.net/), que permite sincronizar os arquivos entre seus dispositivos, criando sua “nuvem privada” somente com seus dispositivos.
I am a construction site worker and I learn Rails
Tags: ruby, rails
Published: 2021-04-19 21:07:23

There are more blogs than you can imagine. About programming, about cooking, about cars, about travel. Give me some random topic and I'll find at least five blogs on it. People write about everything and nothing, several posts a day or one a month, with or without meaning, more or less, but they write. Since practically all topics in practically all fields are exhausted, why do I also decide to write another one among a million others, a blog about programming? 

My goal for this year is to become a Ruby on Rails programmer, with this blog I want to document my progress with learning Rails. 

What's so special about it? In the learning itself probably nothing, while what I do outside of learning I think is not an everyday occurrence. I'm a construction worker, I'm a paving and laying pipes every day, I work in trenches several meters long and with excavators several tons long (we dig those bitcoins, but we haven't found anything yet). 

Will working in IT be something new for me? No. In Poland I worked for a few years, mainly as an administrator and as a freelancer I managed to write a few smaller or bigger applications, mainly in php + angular stack. So I have some experience as a programmer, but I have never worked in a team. I have an irresistible impression that I am stuck in so-called noobville from the beginning. I have superficial knowledge in a few areas, but I'm an expert in none. 

The first post is just a hello and it won't be anything special, starting tomorrow I'll be adding more and more technical content. 

PS. Cover photo: meet Luna, who will accompany me (and you) in learning Rails
Python Testing 101 with pytest
Published: 2021-04-19 20:18:14

For Python Frederick's March presentation, I presented on Python testing. In the presentation, I used pytest to show how quickly you can get started with testing your code. We covered the what, why, and how of testing in Python.

The recording from the talk is available on YouTube. [Check it out!](https://www.youtube.com/watch?v=etosV2IWBF0&list=PLFcKEo4b_n1wMFhbiedpMgh2VRT5uICuF)

{% youtube etosV2IWBF0 %}

<!--more-->

The material for the presentation is also available on GitHub. The presentation is in the [Python Frederick talks repository](https://github.com/python-frederick/talks/tree/master/2019-03-python-testing-101-with-pytest). The code for the talk is in a new [Python Frederick testing 101 repository](https://github.com/python-frederick/python-testing-101).
Multiple bootstrap colorpickers at one page
Tags: javascript, bootstrap, colorpicker, css
Published: 2021-04-19 20:11:39

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zvvldandfsuq2n8r495a.jpg)

One time I have to upload multiple GPS logfiles to the map and several colors needed for the uploaded linestring. The bootstrap colorpicker not supported multiple on-the-fly added pickers at one page. But i found a simple trick:

{% codepen https://codepen.io/cosmiclaca/pen/jOyvRKO %}

Git example: https://github.com/CosmicLaca/multiple_bootstrap_colorpicker
How to Build a Cross-Platform Desktop Application in Python
Tags: python
Published: 2021-04-19 19:58:39

How to Build a Cross-Platform Desktop Application in Python
Developing desktop GUI applications used to be a tedious, error-prone, and slow process. 

Of course, Python has dramatically simplified application development overall, but in the GUI realm, there was still no real substitute to the cross-platform frameworks like GTK or Qt.

If you are new to PyQt, I suggest this course: 
[Create Desktop Apps with Python PyQt5](https://gumroad.com/l/pysqtsamples)

## Use a GUI module

The [PyQt](https://pythonpyqt.com/) library is a Python bindings for Trolltech's Qt framework. It provides a rich set of Python classes that allow programmers to easily write graphical user interface applications.

If you are a fan of [Python](https://pythonspot.com) and its many bindings to C libraries, then you probably know about PyQt. PyQt is a binding of the Python programming language and Qt, the cross-platform application framework that provides graphical user interfaces and reusable software components targeting the desktop environment. 

![pyqt widgets](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t44il13dsafpjdq6rsnk.jpeg)

Qt is already well supported on Linux, with MacOS, iOS and Windows all available via other components. On a recent project, I needed to create a desktop application using Python. Qt is my first choice for creating an GUI interface.

PyQt is supported on many different operating systems, including all of the major Unix flavors as well as Windows and Mac OS X. Notably, the PyQt bindings are available in the default package repositories of most distributions such as Ubuntu, Fedora and Debian. Thanks to this widespread adoption even novice Linux users can easily install PyQt.

This makes PyQt an ideal cross-platform GUI toolkit for both novice Linux users and power users alike. There are some other [GUI](https://pythonprogramminglanguage.com/python-gui/) toolkits like [tkinter](https://python-commandments.org/tkinter-basics/) but they're not as advanced.

You can also opt for [web apps](https://pythonbasics.org/flask-tutorial-hello-world/) instead of Desktop apps, but they often require either internet or the user to run a server on their computer.
Learning to code to land a job? It goes beyond the screen
Tags: learning, motivation, codenewbie, career
Published: 2021-04-19 19:57:44

---
canonical_url: https://tanikadev.hashnode.dev/learning-to-code-to-land-a-new-job-it-goes-beyond-the-screen?guid=78975d09-fa56-45b5-855c-91bbe550acc8&deviceId=eb40f689-d214-409f-8665-ddddea9d70df
---

Let’s talk networking.

Being a web dev is a very social affair. It was previously viewed that a web developer/coder was a person who was a hermit and only interacted with his/her computer monitor; the days of being an introverted coder are over. To flourish in the tech community you need to network, and you need to network hard. When starting out in the industry you will be going for entry/junior level positions and they are rarely posted. There is a way to find out about them, and that’s by talking to people.

So where are these people and how do you find them? At events. There are a multitude of events taking place every day, some even right on your doorstep with the exact people you want to be in contact with. Sites you can use to find events are:--

Meetup.co.uk - Find groups that host online or in person events and meet people in your local community who share your interests.

Eventbrite.co.uk - Eventbrite brings people together through live experiences. Discover events that match your passions, or create your own with online ticketing tools.

There are also seminars and conferences you can go to. They are in a larger format with seminars from people in the field and stalls with people promoting their products or services, so they tend to have their own websites. Doing a google search of a specific niche in the development field you are interested should yield results (i.e typing ‘javascript conferences’ came back with 204 million results in 0.51 secs). 
There's a nice article in Dev.to with tips from an introvert who attended their first Web Dev conference. In the article Jenn wrote for tip number 7  *“Vendor tables are a great place to practise conversation skills. They WANT to talk.”**. This is a great piece of advice striking up conversation with people will have it become second nature thereby reducing inhibitions you may have. Sometimes jumping in at the deep end is the best way to learn how to swim.

This may seem daunting for an introvert but this isn’t to get introverted people scared (hands up I’m one of them, and I kind of felt daunted too) it’s just to say that this is an area you need to work on. In the same way you’re working on developing your hard skills by learning a programming language, you also need to work on your soft skills by developing your communication and social skills, just as much, if not more. 

Don’t worry, on your own time you can still practice coding secluded in a dark room, but remember to go out into the light every once in a while, for a meetup or two.

*https://dev.to/geekgalgroks/the-introverts-guide-to-tech-conferences-22nf
Cheatsheets.click 
Tags: kubernetes, tutorial, bash, linux
Published: 2021-04-19 19:29:06

I'm always looking for an easy way to document commands I use on a daily basis (or better even the ones I only use every so often, and forget easily), so this week I decided to build an easy to search site exactly for this https://cheatsheets.click.

I'm looking forward to any contributions you can give (entries can be easily added to a json file).