teleren/devto huggingface dataset:
Deploying Go Applications to GitHub Releases with GoReleaser and Travis CI
Tags: go, tutorial
Published: 2020-01-06 13:28:17

## Setting Up Goreleaser and Travis CI

All the installation Instructions of Gorelaser can be found in their [Official Docs](https://goreleaser.com/install/).  I'm assuming you know how to set up Travis CI.   
After Installing Goreleaser, you just have to `cd` to that go repository you want to deploy and run `goreleaser init`. This command will create a `goreleaser.yml` already filled with some commands and stuff.      

You can add these to the bottom of the `.gorealeaser.yml` made by `goreleaser init` and it'll work fine.  
**Here is the Gorelaser part to Deploy the Application to GitHub Relases**  
```yml
release:
  github:
    owner: <username>
    name: <repo>
```


**For Deploying to GitHub Releases change your `.travis.yml` file like this**

```yml
deploy:
- provider: script
  skip_cleanup: true
  script: curl -sL https://git.io/goreleaser | bash
  on:
    tags: true
```
This will only deploy to GitHub releases when a tag is created and pushed. You will need a GitHub Token in the Repo scope and while adding it to Travis Secrets you must name it like `GITHUB_TOKEN` only.

---
### Some tips before pushing a tags for checking Goreleaser.
You can always try goreleaser in you the terminal. 
- Try `goreleaser release --skip-publish` command and you can always test with this before you push to GitHub. 
I'd totally suggest this since I had simply pushed without any testing and I had to write the whole thing...again.

---

## GoDownloader
You can install godownloader from their [releases page](https://github.com/goreleaser/godownloader/releases). Follow the next steps to use it Globally
```sh
$ tar -xvf <filename>.tar.gz
$ mv godownloader /usr/local/bin/
```
Now go to your working folder and run
```sh
$ godownloader --repo=<user>/<repo> > godownloader.sh
```
This will make a `godownlaoder.sh` file which can be used as an installation script.

----
## Here are my Pipelines for [Shelby](https://github.com/athul/shelby)
- `.travis.yml`

```yml
sudo: false
language: go

go:
  - "1.13"
before_script:
  - go get -v
  - go build
  - rm -rf shelby
#
# before we deploy, we go build for all operating systems we would like to support
deploy:
- provider: script
  skip_cleanup: true
  script: curl -sL https://git.io/goreleaser | bash
  on:
    tags: true
```
- `.goreleaser.yml`

```yml

before:
  hooks:
    # you may remove this if you don't use vgo
    - go mod tidy
    # you may remove this if you don't need go generate
    - go get -v 
builds:
- 

  env:
    - CGO_ENABLED=0
  ldflags:
    - -s -w 
  goos:
    - darwin
    - linux
  goarch:
    - amd64
archives:
- replacements:
    darwin: Darwin
    linux: Linux
    amd64: x86_64
checksum:
  name_template: 'checksums.txt'
snapshot:
  name_template: "{{ .Tag }}"
changelog:
  sort: asc
  filters:
    exclude:
    - '^docs:'
    - '^test:'
release:
  github:
    owner: athul
    name: shelby
```
Creating an Emoji Game with Vue, Auth0, and Google Vision API
Tags: vue, api
Published: 2020-01-06 19:41:54

---
title: Creating an Emoji Game with Vue, Auth0, and Google Vision API
published: true
description: Using Google Vision API, build a game where the user scans an image to match an emoji displayed.
tags: #vuejs #api
canonical_url: https://auth0.com/blog/creating-an-emoji-game-with-vue-auth0-and-google-vision-api/
---

TL;DR: Let's face it, Artificial Intelligence (AI) is taking over applications. In the not-so-far future, most software will have AI systems embedded in it and applications without it will slowly fade away. The ability for software applications to understand data generated by users and use it for valuable predictions is fast becoming a must-have in every application. The big names in tech are not unaware of this as we see tech giants like Google, Microsoft e.t.c. launching AI and Machine learning APIs and SDKs to enable developers to easily embed these capabilities in their applications. In this article, you would make use of Google's Vision API to build a simple emoji prediction game.

What You Will Build
The application you will be building is a simple emoji game that displays a random emoji to the user, the user then has to scan a physical object around them that matches the emoji using the webcam. Google's Vision API will predict the scanned image and return results that will be compared to the emoji to see if it matches. 

[Keep reading 🚀] (https://auth0.com/blog/creating-an-emoji-game-with-vue-auth0-and-google-vision-api/?utm_source=twitter&utm_medium=sc&utm_campaign=vue_goooglevisionapi)
Linkdump for 2020-W01: WebAuthn, Drone, Lando, Laradock, Hammerspoon ...
Tags: webdev, devops, devjournal
Published: 2020-01-07 01:24:53

This is the first post of the my weekly `linkdump` series. I want to start this mainly because I come across so many stuff every week and I wanted to share what cought my attention.

If you are an avid [HackerNews](https://news.ycombinator.com/) follower, some of these are probably not "news" to you ;)

### WebAuthn

This is the new standard from `W3C` to address this never ending mess of passwords. I hope to have time to play around with it the next weeks.

Link: https://webauthn.guide/
Demo: https://webauthn.io/
HackerNews: https://news.ycombinator.com/item?id=21962424

### Drone

That's my absolute favorite `CI/CD` tool so far. The main advantages I see are: minimalist, written in `Go`, built on `Docker`, solid documentation and ease of use. I have been able to setup the server and the runner in a few minutes.

Link: https://drone.io/
Documentation: https://docs.drone.io/
Git: https://github.com/drone/drone

### Lando

When it comes to use the right too for your local developement environement, there are a lot of choices. This one is based on `Docker` and seems to support a lot of services and stacks.

Link: https://lando.dev/
Documentation: https://docs.lando.dev/basics/
HackerNews: https://news.ycombinator.com/item?id=21301665

### Laradock

Yet another pile of `Docker` setup files to build your local PHP environement. I tested it and the performance seems to be great so far. I will probably fork it later this year to see if we can migrate our internal [Vagrant LEMP stack](https://github.com/milhouse1337/vagrant-lemp).

Link: https://laradock.io/
Git: https://github.com/laradock/laradock

### Hammerspoon

This is a nice and very powerful tool for MacOS automation. This is written in `Lua` and the documentation is very simple to follow. I will have to dedicate a whole article on this one.

Link: https://www.hammerspoon.org/
Documentation: https://www.hammerspoon.org/go/
HackerNews: https://news.ycombinator.com/item?id=21801178

### Svelte and Sapper

An alternative to `React` and `Vue` without Virtual DOM. This looks promising and the comments on HN are great so far.

Link: https://svelte.dev/
Link: https://sapper.svelte.dev/
HackerNews: https://news.ycombinator.com/item?id=21376557
HackerNews (2018): https://news.ycombinator.com/item?id=19950253

### sscaffold

We use [Bootstrap](https://getbootstrap.com/) a lot at work, but sometimes it's nice get back to the basic with a minimialist approach. This one is based on `normalize.css`, `skeleton.css` and `miligram`.

Link: https://sscaffold-css.com/
Git: https://github.com/robsheldon/sscaffold-css/
HackerNews: https://news.ycombinator.com/item?id=21948472

That's it for today!
How to select fields in a document in MongoDB
Tags: mongodb, webdev, tutorial, showdev
Published: 2020-05-07 14:22:24

---
title: How to select fields in a document in MongoDB
published: true
date: 2020-01-05 00:00:00 UTC
tags: ['mongodb', 'webdev', 'tutorial', 'showdev']
canonical_url: https://learnwithparam.com/blog/how-to-select-fields-in-a-mongo-query/
description: MongoDB is really easy to work with. Today, we will see how to select only a few fields out of a large document using mongo query
---

Let’s assume we have a collection with lot of data in a single document. We have a `countries` collection. We are going to select just few fields we want,

```js
// Query without selection
db.posts.find({});
// Result will look like
[
  {
    _id: ObjectId('5e14ba178e47a9a3b8b7af52'),
    name: 'Estonia',
    shortName: 'EST',
    cities: ['Tartu', 'Tallinn', 'Viljandi'],
  },
  {
    _id: ObjectId('5e14ba3c8e47a9a3b8b7af5a'),
    name: 'India',
    shortName: 'IND',
    cities: ['Chennai', 'Mumbai', 'Delhi'],
  },
  {
    _id: ObjectId('5e14ba558e47a9a3b8b7af62'),
    name: 'United states of America',
    shortName: 'USA',
    cities: [],
  },
  {
    _id: ObjectId('5e14ba6a8e47a9a3b8b7af67'),
    name: 'Sweden',
    shortName: 'SE',
  },
];
```

Now, I want to select only the `name` field and display only the result with `name` field.

Inorder to do that, we need to first understand the mongoDB query syntax

```js
db.countries.find(
  // For basic filtering based on the key values passed
  {},
  // for selecting the fields
  {}
);
```

You can pass the second parameter to the `find` method. It will work for `findOne` too.

Now let’s select the `name` field.Here you need to learn one more trick, The key will be the field you want to select, what about the value?Value will be `1` for selecting a field. `0` for deselecting a field.

Let’s see it as example

#### Selecting only country name field

```js
// Query with name selection
db.posts.find({}, { name: 1 });

// Result will look like
[
  {
    _id: ObjectId('5e14ba178e47a9a3b8b7af52'),
    name: 'Estonia',
  },
  {
    _id: ObjectId('5e14ba3c8e47a9a3b8b7af5a'),
    name: 'India',
  },
  {
    _id: ObjectId('5e14ba558e47a9a3b8b7af62'),
    name: 'United states of America',
  },
  {
    _id: ObjectId('5e14ba6a8e47a9a3b8b7af67'),
    name: 'Sweden',
  },
];
```

Here we have successfully selected only the `name` field. Wait? there is also the `_id` field without we pass it explicitly?

by default, mongo query will always include the `_id` field.

#### Deselecting any field

Let’s deselect the `_id` field itself, it’s the same way,

```js
// Query with name selection and _id deselection
db.posts.find({}, { name: 1, _id: 0 });

// Result will look like
[
  {
    name: 'Estonia',
  },
  {
    name: 'India',
  },
  {
    name: 'United states of America',
  },
  {
    name: 'Sweden',
  },
];
```

Hope you find this tutorial series helpful. Next we will learn more into this series. Share it with your groups and happy learning 🤗
Searching for files by file name on Mac or Linux
Tags: linux, bash, productivity
Published: 2020-03-05 19:00:16

---
title: Searching for files by file name on Mac or Linux
published: true
date: 2020-01-07 22:42:00 UTC
tags: Linux, Bash, Productivity
canonical_url: https://www.petefreitag.com/item/890.cfm
---

Have you ever had to find a file by a file name or file extension? Sure you have! Here's how I locate a file when I'm using a Mac or Linux shell.

**The `find` command**

The `find` command is really handy because it will list every file in the current directory and all sub directories. You can also give it a path, so if you want to search just your home directory (and it is not your current working directory) you can just run:

```
find ~
```

And that will list every single file in your home directory (The `~` is a shortcut for home directory).

The `find` command will be installed by default on your Mac, and just about every linux distribution.

While that is handy, it might list out thousands of files, so our next step is to search the results for the file name we are looking for.

**The `grep` command**

The `grep` command can be used to search the output of another command by using the `|` pipe operator. For example if I run:

```
find ~ | grep log
```

I can search my home directory for any file with `log` in the file name (or directory name).

Since grep supports regular expressions, if I just want to search file files ending in `.log` I can do that like this:

```
find | grep '\.log$'
```

**Searching by file name using `find`**

After my initial thought to use `grep`, I realized that the `find` command also has a lot of builtin options you can leverage, so we can simplify this by using:

```
find -name '\*.log'
```

There are a bunch of options you might find handy, run `man find` to see them all.

Some of you might say that you can just use Finder on a Mac to search for files by name, and you'd be correct, that also works, but this is much faster and more flexible.
Dev goals for 2020
Tags: development
Published: 2020-01-07 20:41:30

---
title: Dev goals for 2020
published: true
description: My development goals for 2020
tags: development
---
2020 looks to be a great year coding wise and I thought that I would share what my development goals for the new year are.

* Blockchain as a database
* API integration with chat platforms
* AI and BOTS
* PHP frameworks
* Python
* Architecture and design
* Update my github profile picture
Codecademy - CSS 6: Colours
Tags: 100daysofcode, css, womenintech, codenewbie
Published: 2020-01-07 22:12:28

###**What i've learnt from the colours lesson of Codecademy's CSS course.**

- Colors in CSS can be described in three different ways:
 - Named colors — English words that describe colors, also called keyword colors
 - RGB — numeric values that describe a mix of red, green, and blue
 - HSL — numeric values that describe a mix of hue, saturation, and lightness

- When you style an elements colour you can either style the foreground colour or the background colour. You would use these properties for this:
 - color - this property styles an element’s foreground color.
 - background-color - this property styles an element’s background color.

- There are many different colours to choose from...[here are just some!](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value)


####Hex
- Hexadecimal colours can be used. These are 3 or 6 digit numbers that begin with a hash character. The numbers and letters represent values for red, blue and green. 
```
.green {
  background-color: #8FBC8F;
}
```

####RGB
- As an alternative to hex colour codes, RGB codes can be used. There isn't a right or wrong choice, its a matter of personal preference. However its best to stick to one format throughout your CSS.
- The first number represents the amount of red, the second is green, and the third is blue. 
```
h1 {
  color: rgb(23, 45, 23);
}
```

####HSL
- Another colour scheme is HSL or hue-saturation-lightness.
- HSL is laid out similarly to RGB except the numbers mean different things.
- The first number represents the degree of the hue, and can be between 0 and 360. The second and third numbers are percentages representing saturation (intensity of the colour) and lightness respectively (50% is about normal lightness). Here is an example:
```
.box {
color: hsl(120, 60%, 70%);
}
```
- The first number is the hue and it refers to an angle on the colour wheel below.
![Colour wheel](https://thepracticaldev.s3.amazonaws.com/i/tvzmabhq0f38oz56y8es.png)
- HSL is useful because you can change things like the lightness by changing one number, rather than affecting each number in the code. 

####Opacity and Alpha
- You can change the opacity of elements so they show the elements beneath them. 
- You can adapt your RGB and HSL properties to include an opacity value that is called an alpha.
- To change the HSL you add an a onto the property and a fourth value.
```
color: hsla(34, 100%, 50%, 0.1);
```
- To change the RGB you also add an a onto the property and a fourth value.
```
color: rgba(234, 45, 98, 0.33);
```
- The alpha values can be between 0 and 1. Zero is completely transparent and one is opaque. Half transparent is 0.5.
- You can think of the alpha value as, “the amount of the background to mix with the foreground”. When a color’s alpha is below one, any color behind it will be blended in. The blending happens for each pixel; no blurring occurs.

- Alpha can only be used with HSL and RGB, not hex or named colours.
- There is a value for completely transparent which is equivalent to rgba(0, 0, 0, 0) which is:
```
color: transparent;
```
How to Handle Content Scraping in Laravel
Tags: laravel, laravel58, laravel6, laravelcodesnippet
Published: 2020-01-08 17:50:47

---
title: How to Handle Content Scraping in Laravel
published: true
date: 2020-01-06 19:21:18 UTC
tags: Laravel,Laravel 5.8,Laravel 6,Laravel Code Snippet
canonical_url: https://codebriefly.com/how-to-handle-content-scraping-in-laravel/
---

 ![How to Handle Content Scraping in Laravel](https://codebriefly.com/wp-content/uploads/2020/01/How-to-Handle-Content-Scraping-in-Laravel.jpg)

In this article, we will discuss “How to handle content scraping in Laravel”. Prerequisite Guzzle HTTP Package: Guzzle is a PHP HTTP client that makes it easy to send HTTP requests. Symfony Dom Crawler: The DomCrawler component eases DOM navigation for HTML and XML documents. I’m note adding the Laravel installation steps in this article, […]

The post [How to Handle Content Scraping in Laravel](https://codebriefly.com/how-to-handle-content-scraping-in-laravel/) appeared first on [Code Briefly](https://codebriefly.com).
Heartbeat (NW.js + Vue[tify].js) on YouTube
Tags: nwjs, vue, tutorial
Published: 2020-01-08 00:55:00

Hello everybody!

I hope you are doing great today.

I wanted to share with you all through a post here something I have been working on for quite a while now: [a YouTube playlist](https://www.youtube.com/playlist?list=PLmJs3lfUmCdT9MyG60Oo6HM7xAn79vwZ0).


When I started looking into Vue and learning how to use it, I also wanted to try to use it with [NW.js](https://nwjs.io/). 

At the time [there wasn't really any documentation I could find or ask for](https://forum.vuejs.org/t/nw-js-and-vue/2590), so I decided to document my findings and also share them.

Out of that came a series of videos in which my original intention was to retrace my steps and just rebuild the thing I had already working. 

But I refactored stuff along the way and got some more ideas as to how to implement some of the solutions to the problems I found. Some bugs were also fixed and eventually reached 5:00+ hours worth of content. 

I want to note that the whole series has the intention to provide short and focused videos that cover just one subject at a time. And even though it is edited (some times heavily 😅) I try to show everything I go through, even the mistakes.

You will notice we cover a lot of stuff that revolves around building an app, including but not limited to:
* Vue and NW.js of course
* git
* Vuetify
* Node packages like [NeDB](https://github.com/louischatriot/nedb) and [ping-monitor](https://github.com/qawemlilo/ping-monitor#readme)
* [Inkscape](https://inkscape.org/) to create the logo
* Keyboard shortcuts for VSCode
* npm tasks

Right now I am coughing a lot from being sick, but I plan to get back at recording more videos on this series and perhaps create a shorter version with the newer stuff that came out after I recorded these videos or even cover more topics... but we'll see.

I also want to get a better quality output for the videos so that they are more enjoyable, but I digress...

You are more than welcome to leave comments on the videos and thanks in advance for watching!

Catch you later 😁

Here is the 0th video:

{% youtube dWGekDUJG1g %}
55 : We Live Matter
Published: 2020-06-03 15:40:04

Programming is not only solving poroblem, it is also about building the logic, and structure, the harmony among HTML, CSS and JavaScript is important to know, in my opinion, I don't know why I spent so much of time to understand the people who disagree with the idea of considering HTML, CSS not as much as important considered Vanilla JavaScript.



So, then, To keep going, I just want everyone know that never mind of one's opinion, it can not be true, and that is why I would like to tell you that there has something very important inside of HTML and CSS even though it is type of markup language, why does Javascript get higher than HTML and CSS? 



We can't build anything without HTML, We can't decorate anything without CSS, Javascript is for interacting at the end, it is just different, the world is messed up these days, and regardless of the problems, there is no reason to say YES to HATE and Violence, I kept my silence in the beginning, because, I was afraid of getting judgements from people.
Devart SecureBridge Now Supports Android 64-bit
Tags: android, delphi, datasecurity, security
Published: 2020-01-08 16:49:33

---
title: Devart SecureBridge Now Supports Android 64-bit
published: true
description: Devart has recently introduced a new version of SecureBridge, a set of Delphi security components. The updated solution now supports Android 64-bit development. 
tags: android, Delphi, data security, security
---
*Devart has recently introduced a new version of SecureBridge, a set of Delphi security components. The updated solution now supports Android 64-bit development.*

Devart, a recognized vendor of professional database management software and Delphi data access components for developers and DBAs, has released [SecureBridge 9.2](https://www.devart.com/sbridge/) with support for Android 64-bit development. The vendor also supported the keyboard-interactive authentication in the TScSSHServer component, which allows the SSH server to prompt the user to input their password.

* The full list of new and improved features inсludes:
* Support for Android 64-bit development;
* Support for the latest Lazarus version 2.0.6;
* A new method TScSFTPClient.ReadDirectoryToList to retrieve a directory listing;
* Support for keyboard-interactive authentication in TScSSHServer;
* Improved server certificate validation in the TLS/SSL protocol on Android.

SecureBridge offers components that can be used as clients and servers for SSH, SFTP, SSL, FTPS, HTTP/HTTPS, WebSocket, and SignalR protocols to protect data flow over an untrusted network. It is also compatible with data access components to prevent data interception and theft. To learn more about the current release, please visit 
https://blog.devart.com/securebridge-now-supports-android-64-bit.html

**About Devart**
Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects.
For additional information about Devart, visit https://www.devart.com/
How much does audio quality matter to you with your headphone music?
Tags: watercooler, discuss
Published: 2020-01-08 17:37:29

I got Tidal because I was sick of not having Jay Z in my streaming libraries. Then I decided to test out the $20/mo for hifi/master to see if I can appreciate the difference.

I don’t know if either my ears or my headphones are capable of picking up the difference in quality, but I’ll continue to experiment with it.

I have the Bose QCII which are bluetooth (e.g. compression) so it's unclear to me whether I'm even benefitting from less compression in the streaming, but I got mixed answers when I researched this.

Anyway....

Do you go for highest quality with your hardware/software and if so, am I thinking about things the right way?

Opened ended chat about anything related to this is welcome and appreciated.