teleren/devto huggingface dataset:
Manage dotfiles with the GNU stow command
Tags: blog, dotfiles, zsh, bash
Published: 2019-06-24 10:14:02

---
title: Manage dotfiles with the GNU stow command
published: true
tags: Blog, dotfiles, zsh, bash
canonical_url: https://www.eddinn.net/blog/manage-dotfiles-with-the-gnu-stow-command
---

 ![](https://www.eddinn.net/images/1/c/a/4/8/1ca487714880de770218b25b4cc88322aac18bc1-tree-view.png)

I've been looking for a good way to manage my dotfiles and configs, and I found [this article](https://dev.to/writingcode/how-i-manage-my-dotfiles-using-gnu-stow-4l59) written by [Shawn McElroy](https://dev.to/autoferrit) about managing your dotfiles with GNU stow.

So I applied his methods to my config and so far I'm very pleased, and I initialized an git repo on my [GitHub page](https://github.com/eddinn/dotfiles) with an initial config and README.md
Spotify's lowkey tech playlist is brain fuel for my coding
Tags: discuss, productivity, healthydebate
Published: 2019-06-23 09:49:57

---
title: Spotify's lowkey tech playlist is brain fuel for my coding
published: true
description: My favourite playlist for coding to is Spotify's lowkey tech
tags: discuss, productivity, healthydebate
cover_image: https://thepracticaldev.s3.amazonaws.com/i/458ynumwbjer9p3k983c.jpg
---

I'm always on the lookout for music to listen to while I code. Finding the right album or playlist can help me sink into deep work and I get lost in code for hours (in a good way, with deep focus I mean). 

Here's one from Spotify that I'm loving right now. Really gets me in the zone. Would love to hear suggestions for other good ones though. 

{% spotify spotify:user:spotify:playlist:37i9dQZF1DX0r3x8OtiwEM %}


Playlist link: https://open.spotify.com/user/spotify/playlist/37i9dQZF1DX0r3x8OtiwEM?si=f8MXDYSxQ_6-xE4-OPF67w

Eager to hear other's suggestions too - I find discovering music difficult nowadays that I don't listen to radio at all.
Slot Filling Chatbots
Tags: chatbot, machinelearning, nlp, ai
Published: 2019-06-23 09:41:39

Assume I run a transit business. I need to know what sort of cars you need, when you need it, how heavy is your cargo, your destination and your start point.

A long time ago, I would print this as a form on paper and either hand it to you to fill, or fill it my self over a conversation on the phone. Then I would calculate the price and dispatch someone to take care of it.

A few years ago, I would convert it to some sort of a computer program, either web-based or local binary, and I would ask the user to fill it out or fill it myself over a conversation.

Now, with the current interest in social media and IMs, I could deploy my application on one of these and let the customer chat with it to put their orders. Let's see how that could go.

## Scenario 1: State-based chatbot

A state-based chatbot is a simple one, at each point in the conversation, it expects something from the user. Consider the following dialog:

```
User: Hi!
Bot's State: conversation_start
Bot: Hi, welcome to my shop! Do you want to put an order?

User: Yes
Bot's State: order_weight
Bot: Ok, how heavy is your cargo?

User: Around 400 Kg
Bot's State: order_dest
Bot: And where is your destination?

...
```

You can imagine how that goes. That would work fine if the user complies with what the bot is asking. Now consider this:

```
User: Hi! I have 400Kg cargo that I want to deliver to X.
Bot: Hi, welcome to my shop! Do you want to put an order?

User: Ummm, yes, I have a 400kg cargo for X.
Bot: Ok, how heavy is your cargo?
```

Ops. That didn't go too well.

## Scenario 2: Slot Filling Chatbot

A slot filling chatbot is no different from a regular state-based chatbot. Perhaps the only real difference is that it uses some form of NLU to understand what the user is saying. Say, for example, the user provides her cargo weight in the first message. The slot filling chatbot would jump over that step because it already knows the weight. So the second dialog would go smoother.

In the next posts, I'll try to write a tutorial on writing a slot filling chatbot.j
Build your Discord bot using TypeScript and decorators !
Tags: typescript, decorators, bot, discord
Published: 2019-06-23 09:39:19

After developing several Discord bots in JS, I decided to switch to TypeScript however I was not satisfied with the way we listen on an event that is very "JavaScript".

So last night, I decided to create a very small framework to develop a Discord bot using three TypeScript decorators: `@Discord`, `@On()` and `@Once()`.

## How does it works ?
It's quite simple, when you decorate your class with `@Discord`, it's instantiated internally, so when a certain event is triggered, the framework will simply call the corresponding class method and pass it all the arguments provided by triggering this event.

## So, how ?

#### The full documentation can be found [here](https://github.com/owengombas/DiscordTS) but here is a simple example:
```typescript
import {
  Discord,
  On,
  Client // Use the Client that are provided by @typeit/discord
} from "@typeit/discord";
// You must import the types from @types/discord.js
import {
  Message
} from "discord.js";

// Decorate the class with the @Discord decorator
@Discord
export class AppDiscord {
  private static _client: Client;
  private _prefix: string = "!";
  private _sayHelloMessage: string = "hello !";
  private _commandNotFoundMessage: string = "command not found...";

  static start() {
    this._client = new Client();
    // In the login method, you must specify the glob string to load your classes (for the framework).
    // In this case that's not necessary because the entry point of your application is this file.
    this._client.login(
      "YOUR_TOKEN",
      `${__dirname}/*Discord.ts` // glob string to load the classes
    );
  }

  // When the "message" event is triggered, this method is called with a specific payload (related to the event)
  @On("message")
  async onMessage(message: Message, client: Client) {
    // Your logic...
    if (AppDiscord._client.user.id !== message.author.id) {
      if (message.content[0] === this._prefix) {
        const cmd = message.content.replace(this._prefix, "").toLowerCase();
        switch (cmd) {
          case "hello":
            message.reply(this._sayHelloMessage);
            break;
          default:
            message.reply(this._commandNotFoundMessage);
            break;
        }
      }
    }
  }
}

// Start your app
AppDiscord.start();
```

Et voilà !
Generate documents with minimum
Tags: python
Published: 2019-06-23 09:19:42

I need to generate pdf document (invoice) based on a format based on data derived from csv document. I would like if its a a complete console application.

Jinja2 seems to be the popular solution, but from what I understand, needs to be web based & needs a framework like flask.

I am trying to keep it bare minimum, plus its something I have to run on my desktop. Basically a mail merge without any office suite.
Automatize your new developer’s team onboarding with this simple app (in Python)
Tags: python, management, onboarding
Published: 2019-06-23 17:58:35

---
title: Automatize your new developer’s team onboarding with this simple app (in Python)
published: true
tags: python,management,onboarding
canonical_url: http://javaguirre.me/2019/06/23/automatize-developer-onboarding
cover_image: https://thepracticaldev.s3.amazonaws.com/i/s1arwt8yz1a20hv8dwie.jpg
---

When a new developer joins our team, everybody wants to give them the best possible experience 🙌.

![](https://media.giphy.com/media/FQyQEYd0KlYQ/giphy.gif)

We’ve created a simple command line app in Python that with minimum configuration helps the new developer, in a geeky way, set up his/her environment and checks if everything works! It also gives information about which services would they have access to so they can check and don’t need to go somewhere else for that info.

We use [Click](https://click.palletsprojects.com/en/7.x/), the library to create Command line interfaces in Python, and YAML for the configuration. The config has a specific structure moreover, we can configure the file path so someone could reuse the project for their own company 🤓.

[The documentation is in the README](https://github.com/TheNeonProject/onboarding). You can set the company information in the config, as [in our own that you could use as an example](https://github.com/TheNeonProject/onboarding/blob/master/config.yml). To use your config file, you can set `ONBOARDING_FILE_PATH`.

You can install it with [pipenv](https://github.com/pypa/pipenv).

```bash
pip3 install pipenv
pipenv --python 3.7
pipenv install
```

Once this command finishes, we can run it using `pipenv`.

```bash
export ONBOARDING_FILE_PATH=config.yml
pipenv run python cli.py
```

[It has the configuration to launch from VS Code Debug tab too](https://github.com/TheNeonProject/onboarding/blob/master/.vscode/launch.json).

You can see here the output of the app with my company configuration.

![](https://user-images.githubusercontent.com/488556/59706185-3a765680-9200-11e9-90ce-490c377e7016.png)

![](https://user-images.githubusercontent.com/488556/59706184-3a765680-9200-11e9-9a29-a10e7fe8fff1.png)

[The project is open source and can you can clone it from GitHub](https://github.com/TheNeonProject/onboarding).

Maybe if we have time, we’ll create a Python package and add more functionality 🎸, but for now, it does the trick. :-)

*Cover image by Photo by Harley-Davidson on Unsplash*
A Kubectl Alias Dotfile & Other Life-Enhancing Kubectl Tools
Tags: kubernetes, k8s, kubectl, dotfile
Published: 2019-06-23 08:59:43

---
title: A Kubectl Alias Dotfile & Other Life-Enhancing Kubectl Tools
published: true
description: Some Kubectl aliases I've been using
tags: kubernetes, k8s, kubectl, dotfile
---

# TL;DR

It's here: https://gist.github.com/zephinzer/f0a321e9bcb204debd45160b890eb6a3

- - -

# The backstory

I began actively using Kubernetes some time back, and the commands were getting too lengthy to type out. Imagine having a pod on fire and you're still typing `kubectl get pods -n somenamespace | grep deploymentname`, finding the pod with the dreaded `CrashLoopBackOff`, and finally running `kubectl log -f -n somenamespace podname`.

So. I created a set of aliases that worked using abbreviations of Kubernetes's inbuilt verbs and resource types:

## Verbs
- apply (a)
- config (conf)
- describe (d)
- delete (del)
- edit (e)
- exec (exec)
- expose (exp)
- get (g)
- logs (l)
- port-forward (pf)
- run (r)
- top (t)

## Resources
- config (c)
- configmap (cm)
- cronjob (cj)
- clusterrole (cr)
- clusterrolebinding (crb)
- deployment (d)
- daemonset (ds)
- endpoint (e)
- ingress (i)
- job (j)
- pod (p)
- persistentvolume (pv)
- persistentvolumeclaim (pvc)
- node (n)
- namespace (ns)
- role (r)
- rolebinding (rb)
- secret (sec)
- service (s)
- serviceaccount (sa)

## Lazy Utility Exports
This set of aliases also exports two functions I've found really useful to avoid typing the `-n <NAMESPACE>` which happens quite often if you've correctly set up your cluster. Presenting..

`kcsetns ${YOUR_NAMESPACE}` - this sets your namespace to a string value which all future `kubectl` commands will respect.

`kcgetns` - this retrieves the current namespace context of your `kubectl` commands.

- - -

OK, so I promised some other life-enhancing tools as well. I've found these extremely useful when administering a Kubenretes cluster without a UI:

1. [derailed/k9s](https://github.com/derailed/k9s) - a really cool curses-based interface that imo works better than the Kubernetes Dashboard for administering a cluster
2. [wercker/stern](https://github.com/wercker/stern) - a logs collater that allows you to view logs from all selected pods at once

Till next time!
Maker Story: Password Reset Flow after 5 months
Tags: showdev, startup, discuss, career
Published: 2019-06-23 08:12:31

---
title: Maker Story: Password Reset Flow after 5 months
published: true
description: Why Maker's do some things late but features first
tags: showdev,startup,discussion,career
---
Hi
I'm Stefan, Maker of [Full-Stack Developer Job and Resume Board](https://fullstackjob.com).
I started my project on February 19. You can read a bit more about [here](https://dev.to/golangch/omg-i-love-to-develop-software-how-i-built-fullstackjobcom-with-go-vue-a2i)

All started with a simple listing of Full-Stack Developer Jobs. A second step was a simple Job Newsletter Subscription.
After I did some improvements I saw/got from User Feedback, Usage Analyses etc, like better Filter Options, improved Job aggregation etc.

Then about a month ago, I release the Online Resume Builder for Candidates, also with following improvements, like privacy Settings, Contact possibility via Form for Recruiters etc. You can see a bit of the status from back then in [this video](https://www.youtube.com/watch?v=QmipWffbhao)

So you can see, I deliver continuously new features for the user and improve on backend side things, which I see make sense to automate. 

End of last week I released an advanced Job Alert and Newsletter Feature, where Candidates for Full-Stack Developer Jobs can define multiple Filter based Subscriptions for daily/weekly Job Newsletters and Job Alerts, send as soon a new Job is added to the board:
![](https://thepracticaldev.s3.amazonaws.com/i/kwavq1vm3123e4v1fiqa.png)


Now... What I did only over this weekend is a "Password Reset" Feature.
Ok, there are frameworks where you have this together with Auth etc out of the box. I use Go and no framework and do this all on my own, mainly for flexibility reasons and it's good learning. 
But why I did it so late? Well. Makers do things then when they are bringing some value for the product and the users who use it. As long as I did not have much registered users, there was just no need for this. If a User forgot his PW, i set him a new one manually (or I could, it just never happened). 


But now, with the new features, I have over 200 Users and growing, so I want to give this feature out to the users and also make my life potentially easier. :-)

edited: 
The point is NOT to let security or other important stuff left behind, but features, which are not that important to a user or not bringing any other gain to the product. So in the mentioned case of "Password Reset Flow", this does NOT mean, that passwords are not stored securely, but there were no UI and API endpoints to do so.

Cheers
Stefan, Maker of [Full-Stack Developer Jobs and Resume Builder](https://fullstackjob.com)
Intro to Modules on Go - Part 2
Tags: go, modules, code, emacs
Published: 2019-06-23 06:12:37

---
title: Intro to Modules on Go - Part 2
published: true
description: Intro to Modules on Go - Part 2
tags: golang, modules, code, emacs
---

In the previous [post](https://dev.to/prassee/intro-to-modules-on-go-part-1-1k77 "Intro to Modules on Go - Part 1 ") we saw how to init modules, write one, publish it (locally with `replace` directive) & use it on another Go project / module. This part we are going to publish the module to github and get rid of `replace` way of aliasing.

**Publishing to Github**

Publshing to github is a no-brainer just init a git repo and push it to github. However the name of the repo does matters here since the consumers of our module would use that as the identifier.

Lets change the go.mod file on `localmod1`. So that it points to a proper git repo than just a name.
    
    module github.com/prassee/localmod1

    go 1.12
    
now lets push it to github.

    git init . 
    git remote add origin git@github.com:prassee/localmod1.git
    ...
    git cm 'initial commit' 
    git push origin master


Now the module is published to [github](https://github.com/prassee/localmod1). Lets proceed further to use it on other modules.


**Using in other modules**

This step does not require any coding but we just need to edit `go.mod` file. Lets open `usingmod1` module's
go.mod file. 

    module usingmod1
    
    replace github.com/prassee/localmod1 => ../localmod1
                                                                       
    go 1.12
                                                                       
    require github.com/prassee/localmod1 v0.0.0-00010101000000-00000000
    0000 // indirect


in the above we just need to replace the 2nd line with the following and updated version should look like below.

    module usingmod1
    require github.com/prassee/localmod1 v1.0.2
    go 1.12

now if we run `go mod tidy`. we can see its downloading the artifact with the version as we desired.

    > go mod tidy
    go: finding github.com/prassee/localmod1 v1.0.2
    go: downloading github.com/prassee/localmod1 v1.0.2
    go: extracting github.com/prassee/localmod1 v1.0.2
    

**Notes**

  * Across this excercise we never used `go get` command or had any vendor folder to 
manage our dependenceis. 
  * Modules were written outside the `GOPATH`.


Thats all folks .... I think I had covered the extent I know about Go Modules.
#PureCSS - Responsive Reddit Loader
Tags: codepen, css, purecss
Published: 2019-06-23 07:40:49

---
title: #PureCSS - Responsive Reddit Loader
published: true
tags: codepen,css,purecss
---

<p>Responsive Reddit Loader using CSS</p>

{% codepen https://codepen.io/AsyrafHussin/pen/OEOZVW %}
How to upload a Laravel project on shared hosting.
Tags: laravel, sharedhosting, htaccess, php
Published: 2019-06-23 07:30:28

---
title: How to upload a Laravel project on shared hosting.
published: true
description: step by step guide to uploading a laravel project on shared hosting
tags: laravel, shared hosting, htaccess, php
---

I can understand if you are searching for this article, you are in a desperate need and a VPS is not an option available to you. I'll not lecture you on how VPS is a good option but if you have that, go for it.

uploading the files is simple, all you have to do is make .zip and upload, the tricky part are as follow.

1. The config cache issue
2. The public directory issue.

I tell you how to resolve these two issues one by one.

## Config Cache Issue

There are two possible ways to resolve this issue. 

1. The first one is to use the artisan commands through URL, yes you heard it right. We can use all the artisan commands through URL. Here is the link for more details. [Click here for more details](https://laravel.com/docs/5.0/artisan)

2. you can do the work which the command will do manually. i.e. you have to delete the old cache. ones the old cache is deleted, in next run new cache for config will be auto-generated.
To do that all you have to do is
*root directory -> bootstrap directory -> cache*
and delete all the files and we are good to go.

## Public directory issue

to resolve this issue all you have to do is add a .htaccess file to your root directory with some rules. You can find the [complete details here](https://codebysamgan.com/htaccess-to-remove-public-from-laravel-app/)

hope this was of any help to you. In case you have any queries you are welcome to ask in the comment section.

happy coding.

samgan
Making a game in GDevelop
Published: 2019-06-25 22:34:13

---
title: Making a game in GDevelop
published: true
tags: 
canonical_url: https://triptych.writeas.com/making-a-game-in-gdevelop?pk_campaign=rss-feed
---

I just discovered GDevelop, though I think I have seen this engine in the past in earlier versions and thought “It's not fully baked, I'll check it out later” only to forget about it until I was reminded of it a few weeks ago. It's like Construct 2 and other “action sheet” kinda game makers where you don't exactly code , more like you set up listeners for certain events, then manipulate pre-built objects to make a game.

[GDevelop](https://gdevelop-app.com/) is essentially a hybrid app that has been written in C++ but gradually ported over to ReactJS as well as Webassembly. Check out this [very interesting slide show](https://slides.com/florianrival/native-web-apps#/) from the author that talks about the app's transformation.

For me, I've been trying to build a game making tool for over a year now, and I've been learning a lot about how to make an app. [Godot Engine](https://godotengine.org/) is an excellent tool for making games, both 2D and 3D and it even has enough functionality to create other kinds of apps.

I'm even working on a book about making apps in Godot, but more on that later. Today is all about GDevelop.

I decided to try out one of the tutorials to see how complex and workable creating a simple game in GDevelop would be, and I have to say it was pretty good.

If you want to skip to the playing part of this – check out my [demo game](https://godotengine.org/) over at itch.io.

Essentially I implemented [this demo](http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/platform-game/start). It was pretty straightforward, with only a few glitches. I actually found a bug in the app, filed an issue, and got a response all in the space of 30 mins.

Apparently GDevelop is being maintained by a single person, in their spare time. It's looking pretty good for a side project, but to be honest I think they need to allow more folks to contribute.

It seems to be actively developed, with some [exciting features](https://twitter.com/GDevelopApp/status/1133731182099800071) just a few months ago added. I like where the app is going, and I plan on trying to create a real game in it this year.

My goals for my time at Terminus / Campus Movie Fest are to make progress on #ittybittyrpg and to get a basic walk around demo for Dungeon Afternoon working in GDevelop. I might even write some tutorials on my [Andreww.xyz](http://andreww.xyz) home page.

So, if you are a “non coder” or are looking for an app that has a nice framework to build a game within – that is open source and free – give GDevelop a try.
Ultimate WP_Query Guide with Arguments
Tags: wordpress, wordpresstips, wordpresscustomque, wordpresstipstri
Published: 2020-01-02 19:25:06

---
title: Ultimate WP_Query Guide with Arguments
published: true
date: 2019-06-23 07:16:25 UTC
tags: WordPress,Wordpress Tips,Wordpress Custom Que,Wordpress Tips & Tri
canonical_url: https://codebriefly.com/ultimate-wp-query-guide-with-arguments/
---

 ![Ultimate WP_query guide with arguments](https://codebriefly.com/wp-content/uploads/2018/04/wordpress2.jpg)

In this article, we will discuss the WordPress WP\_query with Arguments. You can use this in the custom query when you require. Basic WP\_Query Syntax $args = array( // List of arguments ); $custom\_query = new WP\_Query( $args ); // The Loop if ( $custom\_query-\>have\_posts() ) { while ( $custom\_query-\>have\_posts() ) { $custom\_query-\>the\_post(); // Do Stuff […]

The post [Ultimate WP\_Query Guide with Arguments](https://codebriefly.com/ultimate-wp-query-guide-with-arguments/) appeared first on [Code Briefly](https://codebriefly.com).
Animation Font Awesome Icons
Tags: codepen, html, css, animation
Published: 2019-06-23 05:52:32

---
title: Animation Font Awesome Icons
published: true
tags: codepen, html, css, animation
---


{% codepen https://codepen.io/ahmadbassamemran/pen/RzVRPb %}
<hr/>

<p>In this video we will create some animated font-awesome effects using Only CSS . This is a simple project but I thought a cool one to share. I am really liking creating things with plain CSS lately.<p>

<hr/>
[Do Not Forget To Like & Subscribe In The Channel:](https://www.youtube.com/AhmadEmran?sub_confirmation=1)
<hr/>

{% youtube mPmCTAFlIRQ %}