teleren/devto huggingface dataset:
Como descobrir o nome e versão da distribuição linux pela linha de comando
Tags: dev, cat, distro, hostnamectl
Published: 2019-07-31 03:42:29

---
title: Como descobrir o nome e versão da distribuição linux pela linha de comando
published: true
tags: Dev,cat,distro,hostnamectl
canonical_url: https://marquesfernandes.com/2019/06/18/como-descobrir-o-nome-e-versao-da-distribuicao-linux-pela-linha-de-comando/
---

Provavelmente em algum momento da sua vida você estará de frente para um terminal linux desconhecido onde você não faz a mínima ideia de qual seja a distribuição e muito menos a versão… Mas então como eu descubro qual distribuição/versão estou rodando?

**TL;DR** – Você pode usar um dos seguintes métodos abaixo:

1. cat /etc/\*-release
2. lsb\_release -a
3. hostnamectl

## 1. Usando o arquivo /etc/\*-release

Para descobrir a versão e outras informações do seu Linux rode o comando cat abaixo no seu terminal:

```
$ cat /etc/\*-release
```

Exemplo rodando no meu desktop com [Ubuntu](https://ubuntu.com/):

```
DISTRIB\_ID=Ubuntu DISTRIB\_RELEASE=19.04 DISTRIB\_CODENAME=disco DISTRIB\_DESCRIPTION="Ubuntu 19.04" NAME="Ubuntu" VERSION="19.04 (Disco Dingo)" ID=ubuntu ID\_LIKE=debian PRETTY\_NAME="Ubuntu 19.04" VERSION\_ID="19.04" HOME\_URL="https://www.ubuntu.com/" SUPPORT\_URL="https://help.ubuntu.com/" BUG\_REPORT\_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY\_POLICY\_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION\_CODENAME=disco UBUNTU\_CODENAME=disco
```

## 2. Usando o comando lsb\_release

O comando lsb\_release mostra o LSD (Linux Standard Base) e informações específicas da distro. Rode o seguinte comando:

```
$ lsb\_release -a
```

Exemplo do resultado:

```
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 19.04 Release: 19.04 Codename: disco
```

## 3. Usando o comando hostnamectl

Para distribuições baseadas em GNU systemd essa é a melhor opção:

```
$ hostnamectl
```

Exemplo do resultado:

```
Static hostname: \*\*\*\*\*\*\* Icon name: computer-laptop Chassis: laptop Machine ID: 07c27ab13c7c49b59e53df8781de\*\*\*\* Boot ID: 77062197a37d45eeb656c889c7e5\*\*\*\* Operating System: Ubuntu 19.04 Kernel: Linux 5.0.0-16-generic Architecture: x86-64
```

## Como eu descubro a versão do meu Linux Kernel?

Rodando um dos seguintes comandos

```
$ uname -a $ uname -mrs
```

Exemplo do resultado:

```
Linux \*\*\*\*\*\* 5.0.0-16-generic #17-Ubuntu SMP Wed May 15 10:52:21 UTC 2019 x86\_64 x86\_64 x86\_64 GNU/Linux
```

1. **Linux –** Nome do Kernel
2. **5.0.0-16 – ** Versão do Kernel
3. **x86\_64 ** – Versão da arquitetura (64 bit)

O post [Como descobrir o nome e versão da distribuição linux pela linha de comando](https://marquesfernandes.com/2019/06/18/como-descobrir-o-nome-e-versao-da-distribuicao-linux-pela-linha-de-comando/) apareceu primeiro em [Henrique Marques Fernandes](https://marquesfernandes.com).
Any checklist for launching a Rails App for COMMERCIAL use?
Tags: rails
Published: 2019-06-19 03:03:21

I am about to launch a rails app for commercial use. Initially, I will be using it to manage a couple of events ow my own. It will have about 100 users, but I am a bit nervous because will be handling some financial info. I have deployed a few apps to heroku, but nothing commercial.

Are there any resources? like todo lists before launching. Per example, a friend of mine just adviced me that there’s regulation on how an app handles users/customers info. What are the minimum requirements to handle customers? Databases needed, servers, etc. Heroku has different packages but it’s hard to what’s needed.
Learning NextJs - Day 1
Tags: react, nextjs
Published: 2019-06-19 02:48:08

---
title: Learning NextJs - Day 1
published: true
tags: react, nextjs
series: Learning NextJs
canonical_url: https://blog.eperedo.com/2019/06/16/learning-next-day-one/
---

In order to get started with next you need to install the latest version of three libraries:

1. Next
2. React
3. React-Dom

```bash
npm install next react react-dom
```

Once the installation is finished you will need a package.json file. You can easily create one
using the npm init command

```bash
npm init -f
```

The **-f** flag means it will use the defaults, you can ommit it and use the values you want. Now
in the **package.json** in the **scripts** section create a **dev** (it can be any name though) script with the next command.

```bash
	"scripts": {
		"dev": "next dev"
	}
```

The **next dev** will generate a webserver for local development powered by next.

### File System API

Next will search for a pages directory and convert all the files that find on there on routes of your
application.

Let's suppose you want an About page url (/about) to display a welcome message. First you need to create a **pages**
directory

```bash
mkdir pages
```

Now since you want the url to be **/about** the file must have the same name **About.js**. Since here
you are in a react safe space or in other words you just need to create a react component.

```jsx
// pages/About.js
function About() {
  return <h1>Welcome to the About Page!</h1>;
}

export default About;
```

Then in your terminal just execute the **dev** script

```bash
npm run dev
```

And that's it, you open in your browser the url http://localhost:3000/about you should see the welcome message.

But what about the root url (/) how we can create content for that page? Easy, in this case next will map the file **index.js** to the root url, clever, eh?

```jsx
// pages/Index.js

function Home() {
  return <h1>Welcome to my App!</h1>;
}

export default Home;
```

Now going to http://localhost:3000 will display the **Welcome to my App** message.
Working in Circle City, Day 2: Be Nice to People in Traffic
Tags: newhire, circlecity
Published: 2019-06-19 01:20:16

---
title: Working in Circle City, Day 2: Be Nice to People in Traffic
published: true
description: This place is so exciting. This series is all about my new adventure.
tags: newhire, circlecity
cover_image: https://thepracticaldev.s3.amazonaws.com/i/2uuoe4i7ahw0tsfmnvd1.jpeg
series: Working in Circle City
---

Day 2 was pretty quiet and smooth, but still exciting. I had two on-boarding meetings and will have one or two per day through next week. These are chances to learn more about the start of the company, how things work, and the company's values. It's also a great chance to meet people from different teams, which is pretty cool! Everyone is incredibly friendly.

I tried another new (to me) food place! It's a cross between Qdoba and Chipotle. I'm really enjoying all the walking involved with working in the middle of a big city. Speaking of which: I purchased a monthly parking pass! The walk is twice as long as the one from today and yesterday, but that's what I was shooting for. With my bad back, walking is one of the only ways for me to start working out again. 😊

I'd say the only negative thing about the day was traffic on the way home. I've heard that while traffic in this state isn't nearly as bad as cities with higher populations, the people are excessively rude and full of road rage. I already knew it'd be like this, but it's still gross. I wish more people would just be kind and realize that everyone on the road has a story.

Stay tuned for day 3! I'll get to start looking at the code more closely, so things should get extra interesting. 😀

---

Did you know I have a newsletter? 📬

If you want to get notified when I publish new blog posts or make major project announcements, head over to [https://ashleemboyer.com/newsletter](https://ashleemboyer.com/newsletter).
I have no idea what I'm doing, but here Goes #0
Tags: discuss, beginners, blog
Published: 2019-06-18 22:20:24

---
title: I have no idea what I'm doing, but here Goes #0
published: true
description: Blog on my journey to creating an app
tags: #discuss #beginner #blog
cover_image: https://thepracticaldev.s3.amazonaws.com/i/fsbr098fx28ciqcj6xkk.jpg
---

To get this out of the way; I have no idea what I am doing, but I'm going to make an app. Yeah, I'm that guy. 

So I thought, this is a great place to write about the app's journey and share my stupid mistakes, so here's the first blog entry... or blog number 0. See! I made it zero, not 1! OK, settle down. I thought it was funny.

AAANNNyway, I have this problem that is annoying me. I'm currently working in broadcast, and my work patterns are all over the place. During the summer months (October to April - yes that is summer here -keep up, read my bio) I get loads of work. The days are long: I'll get to the airport at 7am, fly to venue, work, and I'm at the hotel at 11pm. Then I'm (usually) up at 5am for a 6am flight home the next morning and onsite at a home venue for a 10am start, and on it goes. I'm busy. Proper busy. It's high stakes, high pressure work, so we're all exhausted after every job let alone the cumulative it has. Stay with me, I'm getting to the point. Promise.

So this is the source of the problem. The problem? While I am working, I don't organise future work because, well, exhaustion. I know, break out the violins. You don't care. Nobody cares.... (sobs in corner in fetal position). 

So I got to thinking (groan... this always gets me in trouble). Don't think, kids. It's overrated. Why don't I 'just' automate this process? How hard can it be? There are a lot of platforms out there like Deputy and the like, but they're all about the employer, and not ME. IT NEEDS TO BE ALL ABOUT MMMEEEEEEEE. So what an excellent place to start!

SO. Which platform? I built my first app (patch.team) in PHP. I gotta say, I like PHP, but is that a bit Truman Show-esque? Well, campers, we're about to find out. Unless anyone can talk me out of this; I'm going for the much hyped Node and MongoDB. I'm in the middle of my Lynda course, and it's already annoying me. I just want to start, but first I need to install what dependency? Then I need to call it? Really? How do I do that again? Do I do that? What? Why is the syntax different FOR EVERYTHING? It's making a cranky old man even crankier. But that's OK. I like it!

Until the next edition of "I have no idea what I am doing, but here Goes", happy coding!
Are portfolios still necessary as a front end developer?
Tags: discuss, webdev, career
Published: 2019-06-19 01:12:20

---
title: Are portfolios still necessary as a front end developer?
published: true
description: 
tags: discuss,webdev,career
---

It's been a few years since I've had to go through the job seeking process and I'm curious, is it still the norm to have a portfolio site as a front end developer?

Some of us, myself included, work on a single web app over the course of a few years so a portfolio of recent work is going to be pretty sparse. Of course a lot of work has gone in to the site so different aspects could be featured, but is it overkill to have a portfolio for this?

None of the job postings I've seen for front end developers make any mention of sending your portfolio, which is why I wonder if it's still a necessity.

_Edit: Thanks for the feedback everyone. It seems the consensus is that having a personal site is worthwhile and a great place to gather your past experience, experiments, and just general thoughts. All very useful for obtaining potential employment opportunities._
What's your take on writing tests for third-party services or integrations?
Tags: discuss, testing
Published: 2019-06-19 01:08:33

Let's say you have an application that uses Stripe.

Stripe gives you a dev environment- own API key, own dashboard, own data, all separated from your Stripe's live data. 

**Do you write tests that interact with this dev environment or do you mock the responses or something alike?**


I work on an app that has many integration tests communicating with test/dev/sandbox environments, and they sometimes fail due to errors on their services, not on our own. Now we're discussing if should we mock the responses instead.
A Learning Path from C++ to ASP.NET Core
Tags: cpp, csharp, aspnet, dotnet
Published: 2019-06-19 00:44:33

---
title: A Learning Path from C++ to ASP.NET Core
published: true
description: How a newcomer to .NET with some familiarity with C++ can learn to build web apps with ASP.NET Core
tags: cpp, csharp, aspnet, dotnet
---

A contact of mine recently asked me a question. They wanted to know how to learn web development with ASP.NET Core 2.1 if they know some C++ but aren't yet familiar with the .NET framework. They asked me if I could suggest a possible learning path for them. So I reached out to some of the developers on my team: _if someone knows C++, what are a few of the stepping stones to .NET_?

One of my teammates suggested the following.

## C++ --> C#
Although the .NET framework supports many languages, C# is the language most widely used with it. For example, ASP.NET is specifically a [framework for building web applications and services in .NET and C#](https://dotnet.microsoft.com/apps/aspnet). Learning the basics of programming in C# and how C# differs from C++ is therefore an essential first step.

## Web Development
The learner should also then invest time in learning about web development: client-side frameworks, server-side frameworks, Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), how JavaScript is used alongside HTML and CSS to build web pages, and related web development concepts together form a layer of knowledge on which to build .NET-specific learnings.

## .NET --> ASP.NET --> ASP.NET Core
Having laid this initial foundation of C# and web development basics, it becomes useful to spend time with the .NET framework, as well as the usage particulars of ASP.NET. The latter is a server-side framework that is itself part of the .NET framework and is/was the progenitor [of ASP.NET Core](https://en.wikipedia.org/wiki/ASP.NET_Core). The key thing to keep in mind here is that there are _many_ frameworks and libraries available for .NET, and if you start learning about all of them, it can become overwhelming. So a person just starting out with .NET and wishing to build web apps with that framework should focus on how to use ASP.NET Core but without going too deep into the gritty details of .NET vs ASP.NET for now.

After becoming familiar with the basics of how ASP.NET Core is used to build web applications and after taking tutorials, even simple ones such as Microsoft's ["ASP.NET Tutorial - Hello World in 10 minutes"](https://dotnet.microsoft.com/learn/web/aspnet-hello-world-tutorial/intro), the newcomer to ASP.NET Core should know enough to create a very early map that they can use to determine where to turn to next.

All great journeys start small and somewhere. I hope this helps my contact who asked this question and helps you, too, reader!

Till next time.
How to Land Your Dream Job Series
Tags: career, algorithms, interview
Published: 2019-06-19 00:09:02

**How to Land Your Dream Job Series**

- [How to Write Bug Free Code During Interview](https://lifelongprogrammer.blogspot.com/2019/01/how-to-write-bug-free-code-during-interview.html)
- [When it Goes Wrong - How to Ace System Design Interview](https://lifelongprogrammer.blogspot.com/2018/08/when-it-goes-wrong-how-to-ace-system.html)
- [How to Land Your Dream Job](https://lifelongprogrammer.blogspot.com/2019/01/how-to-land-your-dream-job.html)
- [Traps and Mistakes during Phone Interview](https://lifelongprogrammer.blogspot.com/2019/01/traps-and-mistakes-during-phone-interview.html)
What's a good way of sending a big directory structure to a server using Ansible?
Tags: ansible, beginners, devpos
Published: 2019-08-08 09:49:03

---
title: What's a good way of sending a big directory structure to a server using Ansible?
published: true
tags: ansible, beginners, devpos
canonical_url: https://mayeu.me/post/what-good-way-sending-big-directory-structure-server-using-ansible/
---

Ansible has a `copy` module that works really well for moving a small set of files around. But it can rapidly slow down your playbook since [it does not scale well with hundreds of files](https://docs.ansible.com/ansible/latest/modules/copy_module.html#notes). So how can you move a big set of files and folder without losing too much time? Well, you use another module named`synchronize` for this.

`synchronize` uses a tool named `rsync` under the hood, so you first have to ensure it is installed on your machine, and on the targeted host (it comes with most Unixes). If you are using macOS or Ubuntu, it should be already there. Otherwise start by installing it on your computer.

To be sure it is installed on your targeted server you should add a task to install it before you use the `synchronize` module in your playbook. Here it is an example for Ubuntu or Debian hosts:

```yaml
- name: Install rsync running synchronize later
  apt:
    name: rsync
    state: present
```

By default `synchronize` just require a `src` and a `dest`, but like a lot of Ansible modules [there are many more options for finer control](https://docs.ansible.com/ansible/latest/modules/synchronize_module.html#synchronize-module).

Here is a minimal example of using the module:

```yaml
- name: Synchronize a local folder to my remote server
  synchronize:
    src: path/to/my/local/folder
    dest: /absolute/path/to/my/destination/folder
```

And with that you can copy a gazillion files (at least) without worrying that your copy will be slow!

Happy syncing 👋

*This post was originally published on my website: [mayeu.me](https://mayeu.me/post/what-good-way-sending-big-directory-structure-server-using-ansible/).*
Now offering design and code reviews at PeerReviews.dev
Tags: beginners, webdev, ux, design
Published: 2019-06-19 20:25:56

---
title: Now offering design and code reviews at PeerReviews.dev
published: true
tags: ["beginners", "webdev", "ux", "design"]
canonical_url: https://bryanlrobinson.com/blog/2019/06/19/doing-design-and-code-reviews-at-peerreviews/
cover_image: https://bryanlrobinson.com/images/peerreview-banner.jpg
---

For the past few months, I’ve talked with a lot of different people about how best to serve up-and-coming designers and developers. I want to be a resource for people learning to code and learning about design. So, when my friend [James Q. Quick](https://learnbuildteach.com) released his first [code review on YouTube](https://peerreviews.dev/videos/jc-smiley-dice-game/), I knew I needed to follow along.

I’d had aspirations years ago of doing design critiques online, but never found the time to do it. James helped push me forward to get things started. I released my first one last week to a lot of great feedback.

The feedback inspired both me and James to make this a bigger and better experience.

{% link https://dev.to/brob/do-you-want-a-design-critique-i-want-to-help-4cm3 %}

## Introducing [PeerReviews.dev](https://peerreviews.dev): Code Reviews and Design Critiques

James and I put our heads together and decided to release the videos on a branded site. A place that could house both our video collections, but also have a place to sign up for a review.

I dedicated some time and launched the site this morning. I’m really excited to see where this concept goes. I’ve already go a handy list of people wanting reviews, which is amazing.

I hope the videos reveal various aspects of design and development that will be helpful to the entire design and development community.

Our other goal is to provide a safe space to get these reviews. We don’t bite. We’re exercising kindness and compassion every step of the way.

So, if you’re interested, [head over to the site and sign up for a review](https://peerreviews.dev) or just watch the various reviews and pick up tips and tricks. It’s absolutely free and we’d love to see what you’re working on!
Building a low latency, globally distributed Python app using Macrometa's geo-distributed database cloud
Tags: replit, python, distributed, database
Published: 2019-06-18 23:26:17

In this tutorial Im going to show you how to quickly and easily build a distributed database backend that spans across North America (Los Angeles & Ashburn VA), Europe (Frankfurt) and Asia (Mumbai, India).

We're going to build simple python application on Macrometa's serverless geo-distributed database cloud (https://www.macrometa.co) to create a data serving backend that will span across multiple worldwide data centers. 

This is so that when end users run your app, it doesn't need to fetch data from a database that is thousands of miles and hundreds of milliseconds away but instead gets its data from the closest running database in a region closest to it. 

So if you're wondering what Macrometa is?  Macrometa is a geo-distributed database cloud service and available for free for developers to build apps on. Macrometa provides the following capabilities:

1. A Serverless real time noSQL geo-distributed database that serves data as Key/Value pairs, JSON Documents, Streams, Graphs and time series.  The geo-distributed bit is important here because that what makes Macrometa special - it can very efficiently, quickly and accurately replicate and synchronize your data across 100s of worldwide locations while hiding the complexities in providing correct concurrent behavior. 

2. A fully integrated Stream engine to let you query and manipulate data in motion without needing to wait for it to be ingested into the database (I will do a separate tutorial on this in a few days)

3. A serverless compute runtime that provides a Web Assembly in V8 engine for you to run your code with hyper-locality to your data (this will be coming out in the second half of 2019 and is not in the currently available product)

learn more at https://www.macrometa.co

So with that background - let's dive right in. 

There are 2 ways to do this tutorial:
1. For those who want to code - the repl.it below is for you.  You can see how to build a simple application to call Macrometa's APIs in Python to do interesting things. 
2. For those of you who prefer a web console or GUI - go to https://www.macrometa.co/quickstart

Building an application consists of 3 basic steps:
1. Create a geo fabric or use the global fabric
2. Create a collection for your data (a collection is like a table in SQL)
3. Send queries to CReate, Update, Delete (CRUD) documents (rows) in your collection 


{% replit @ChetanVenkatesh/Programming-Macrometa-Global-geo-distributed-DB-in-Python %}