teleren/devto huggingface dataset:
Github Action: Commit Notarization
Tags: actionshackathon, github, blockchain, chile
Published: 2020-09-21 08:08:10

---
title: Github Action: Commit Notarization
published: true
description: Using blockchain to notarize commit history
tags: actionshackathon, github, blockchain, chile
---


### My Workflow
[Note]: # (Make sure to include the name of your GitHub Action and share where it's being used!)

Using [_Chaucha_](https://chaucha.cl) blockchain, commits can be certified
using _OP_RETURN_. Now _Github_ history can be _notarized_.

![OP_RETURN](https://user-images.githubusercontent.com/292738/93739829-9546ec80-fbbf-11ea-9c66-a1b7c1dfca99.png)

![OP_RETURN in Explorer](https://user-images.githubusercontent.com/292738/93740190-654c1900-fbc0-11ea-898c-bc7e0e20ab9f.png)

![OP_RETURN Decoded](https://user-images.githubusercontent.com/292738/93740118-3c2b8880-fbc0-11ea-9356-f6d3a4904075.png)


### Submission Category: 

Wacky Wildcards


### Yaml File or Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)

{% github proyecto-chaucha/chaucha-gha-opreturn %}


### Additional Resources / Info

https://chaucha.cl

Note: Maybe this sumission is late, but anyway :)
Deploying a Django Blog App on Heroku 
Tags: django, heroku
Published: 2020-09-13 16:35:47

---
title: Deploying a Django Blog App on Heroku 
published: true
description: (for personal reference)
tags: django, heroku
//cover_image: https://direct_url_to_image.jpg
---
(For personal reference, this is what worked for me) 

I tried a couple ways to deploy a Django blog app to Heroku and finally found a way that worked for me! 

I used the django-heroku library. It helps automatically configure `DATABASE_URL`, `ALLOWED_HOSTS`, WhiteNoise (for static assets), Logging, and Heroku CI for the application so we don’t have to ourselves. For reference, https://github.com/heroku/django-heroku

I also used gunicorn, which is a Python WSGI HTTP Server for UNIX. (I don't install this locally since I'm working in a windows environment but since Heroku needs gunicorn for deployment, I have it as something Heroku itself needs to download)

Here’re the things that I added/steps that I took:

## **requirements.txt**
Let Heroku know what packages it needs to download in a requirements.txt file in the main directory. In here we have Django, django-heroku, and gunicorn

*maindirectory/requirements.txt:*

```
Django~=<version number>
gunicorn
django-heroku
```
## **Procfile**
Set up a Procfile in the main directory (important: it needs to be titled as Procfile, not Procfile.txt!) A Procfile declares what commands should be run by Heroku in order to start up the website.

*maindirectory/Procfile:*

```
web: gunicorn <mysite>.wsgi --log-file -
```

This line means that we're deploying a web application and that it should be started by running gunicorn mysite.wsgi

## **settings.py**

Configure the app using django-heroku somewhere in settings.py 

*maindirectory/<mysite>/settings.py:*

```
# Configure Django App for Heroku.
import django_heroku
django_heroku.settings(locals())
```

## **Install Heroku**
*This step can be skipped if it's already done

Install the Heroku CLI from here: https://devcenter.heroku.com/articles/heroku-cli

Authenticate the Heroku account on the computer by running this command:

```$ heroku login```

## **Deploy**
Now to deploy to Heroku! Create a heroku application on the command line:

```
$ heroku create <app name>
```

commit changes and push

```
$ git add .
$ git commit -m "some message"
$ git push heroku
```

We’ve deployed your code to Heroku, and specified the process types in the `Procfile` (we chose a `web` process type earlier). We can now tell Heroku to start this `web process`.

To do that, run the following command:

```
$ heroku ps:scale web=1
```

We can now visit the app in our browser with `heroku open`.

```
$ heroku open
```
Getting invited to a technical interview
Tags: beginners, webdev, career, interview
Published: 2020-09-26 16:22:31

---
title: Getting invited to a technical interview
published: true
date: 2020-09-21 07:37:03 UTC
tags: beginners, webdev, career, interview
canonical_url: https://slawinski.dev/blog/getting-invited-to-a-technical-interview/
---
*It appears my writing has caught your attention. If you wish to hear from me on regular basis, please consider subscribing to my [newsletter](https://slawinski.dev/newsletter/).*

In accordance with the famous philosopher Mike Shinoda, to ace a tech interview, the following ingredients are required: 10% luck, 20% skill, 15% concentrated power of will... The list goes on. But how to make sure that you're going to stand out in a sea of candidates?

## Resume

First off - resume. Unless you're talented in the field of arts, I do not recommend designing your resume from scratch - there are so many aspects you need to be aware of that it is easier to use a template. There are immense numbers of them available online, but I recommend starting with free [Google docs resume templates](https://docs.google.com/templates).

## Linkedin profile

Recruiters use LinkedIn extensively to source promising candidates, so to stand out also on that platform, you need to fine-tune your profile page (not to mention keeping your profile up-to-date). I used to think my profile page was OK until I watched [a couple of live-streams](https://www.youtube.com/playlist?list=PL54X5yR8qizsMpvTCqUIEFMeEp-chvcxk) where HR specialists reviewed other people's profiles. Their feedback allowed me to improve my profile drastically.

## Github profile

Another place to shine is your Github profile. Until recently, there weren't many ways to advertise yourself on Github, but that has changed with the introduction of the Profile READMEs. That's right. You can now create a README in markdown, which will be displayed on your profile page. As you can expect, the choice of information to put there is limitless. [Here are some fun examples](https://www.aboutmonica.com/blog/how-to-create-a-github-profile-readme) as well as a step by step guide on how to make one yourself.

## Conclusion

That's it. It isn't much, and it certainly won't help you pass any interview, but it will (or at least I hope it will) increase you chances of getting that interview in the first place. The rest is up to you. Good luck!
C# - The For Loop Paradox
Tags: csharp, closures, async, tasks
Published: 2020-09-21 07:31:38

---
title: C# - The For Loop Paradox
published: true
description: Explain why my C# for loop is using the last value of i
tags: csharp, closures, async, tasks
//cover_image: https://direct_url_to_image.jpg
---

# For Loop Paradox

So first of all what is the for loop paradox?

It happens when you use `i` value of a for loop inside an `async Task`. What will happen is that your task will run only using the last value of `i`. Maybe if your for loop is very big some of your Tasks might get also some intermediate values.

But let's see some code to demonstrate this behavior:

```csharp
class Program
{
    static async Task Main(string[] args)
    {
        var tasks = new List<Task>();

        for (var i = 0; i <= 9; i++)
        {
            tasks.Add(Task.Run(() =>
            {
                Console.WriteLine(i);
            }));
        }

        await Task.WhenAll(tasks.ToArray());
    }
}
```

The expected result would be to print on the console all the values from 0 to 9 in a random order since these are Tasks and ordering is not guaranteed.

But let's see what we actually get:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/otf5tcbt1v091i8d277x.PNG)

Hmmm... something is wrong we are actually printing only the number 10 which is not expected at all...

# Why is this happening?

This is a common behavior with closures, what happen is that this piece of code:

```csharp
tasks.Add(Task.Run(() =>
        {
            Console.WriteLine(i);
        }));
```

is using the value that `i` has at the time of the execution.

> **Closures close over variables, not over values.**

# Ok, but how to work around this behavior?

The fix is pretty simple, just assign the `i` value to a new variable.

```csharp
class Program
{
    static async Task Main(string[] args)
    {
        var tasks = new List<Task>();

        for (var i = 0; i <= 9; i++)
        {
            // work around for closure behavior
            var j = i;

            tasks.Add(Task.Run(() =>
            {
                // use the new j variable here
                Console.WriteLine(j);
            }));
        }

        await Task.WhenAll(tasks.ToArray());
    }
}
```

Now every time we iterate over the for loop, we create a new variable j. Each closure is closed over a different j variable, which is assigned only once and keeps the correct current value of `i` variable at each iteration.

Now in our console we get the expected results!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/e1qqbd0aeav5vqyxon1j.PNG)


# History Lesson Incoming!

This behavior was also happening when using `foreach` loop but the C# Team did a breaking change when they released the C# 5 and **"fix"** this behavior.

But for the `for loop` they decided to keep it as it is.

# More resources

You can read more about closures in C# and how to use them to your advantage on the article of one and only Jon Skeet [The Beauty of Closures](https://csharpindepth.com/Articles/Closures)

I hope that by reading this article I'll save you some debug time!

This post was written with love ❤️
Perl modules on CPAN having links to VCS and having CI configured
Tags: perl, vcs, git, ci
Published: 2020-09-21 07:17:15

---
title: Perl modules on CPAN having links to VCS and having CI configured
published: true
description: MetaCPAN that shows the documentation of all the Perl modules can also show a link to their VCS
tags: Perl, VCS, Git, CI
//cover_image: https://direct_url_to_image.jpg
---

{% youtube fz1SeFJrpdk %}

Having a link to a VCS from your Perl module distribution, is a simple way to encourage others to learn from your setup and to contribute improvements.
The time is ripe for Offen
Tags: watercooler, webdev, opensource, privacy
Published: 2020-09-21 07:09:38

We develop a fair and lightweight web analytics software called [Offen](https://www.offen.dev/?utm_source=forum) that treats operators and users as equal parties. In the last eight weeks we have been working on milestone 6 ‐ the last one defined in our initial product plan defining the scope of our support by the [NGI Zero PET initiative](https://nlnet.nl/thema/NGIZeroPET.html).  Here's what happened.

**Running almost everywhere**
We extended our installation options and tuorials. Let us know if you are aware of another great target for installing Offen.

- There is a tutorial for installing Offen on [Uberspace](https://uberspace.de/): [https://lab.uberspace.de/guide_offen.html](https://lab.uberspace.de/guide_offen.html)

- We packaged Offen for [YunoHost](https://yunohost.org/#/) (an operating system tailored towards self hosting): [https://github.com/offen/offen_ynh](https://github.com/offen/offen_ynh)

- We wrote a tutorial for how to host your static website alongside Offen: [https://github.com/hetzneronline/community-content/pull/257](https://github.com/hetzneronline/community-content/pull/257)
- You can deploy Offen to Heroku with a single click: [https://github.com/offen/heroku](https://github.com/offen/heroku)

- There is also a prebuilt image for DigitalOcean: [https://github.com/offen/digitalocean](https://github.com/offen/digitalocean)

- In case Docker is something you are using, here's our image: [https://hub.docker.com/r/offen/offen](https://hub.docker.com/r/offen/offen)

- Raspberry Pis can run Offen just fine: [https://docs.offen.dev/running-offen/downloads-distributions/#building-offen-for-architectures-other-than-amd64](https://docs.offen.dev/running-offen/downloads-distributions/#building-offen-for-architectures-other-than-amd64/?utm_source=forum)

**Helping you to get started**
We have seen people starting to install of Offen and fixed some expected teething troubles along the way. We have also gained further insights into the way our software is deployed and used so that we can further optimize it for relevant use cases.

**Helping you to start contributing**
It is of the most importance for us to open up the development of Offen to the community. To kick this off, we will be participating in this year's [Hacktoberfest](https://hacktoberfest.digitalocean.com/). Head to the [relevant issues on our repository](https://github.com/offen/offen/issues?q=is%3Aissue+is%3Aopen+label%3AHacktoberfest) and start hacking right away. Also feel free to forward this to whoever might be interested. 

**Up next**
The time is ripe for a paradigm shift in data collection and processing. So please help us to spread the word and find a broader audience. Any sharing, connecting or introducing is very welcome. Thanks!

Read the [detailed milestone 6 report](https://www.offen.dev/blog/packaging-testing/?utm_source=forum) on our blog.
How to setup Golang with VSCode
Tags: go, vscode
Published: 2020-09-21 07:08:10

---
title: How to setup Golang with VSCode
published: true
description: How to setup Golang with VSCode
tags: go,vscode
//cover_image: https://direct_url_to_image.jpg
---

I have used Golang some years ago, but unfortunately I hadn't tried to do it in a long time and had forgotten all about it....

So I set it up from the beginning with a fresh mind.😊

The environment I used is as follows.

- macOS Catalina 10.15.5
- Visual Studio Code 1.46.1

## Installing Go

Download and install Go from the following link.

- [Downloads \- The Go Programming Language](https://golang.org/dl/)

![Go](https://dev-to-uploads.s3.amazonaws.com/i/to2q6344cjugd9jkyhzc.png)

After the installation, open a terminal and check the version using the following command.

```
$ go version
go version go1.15.2 darwin/amd64
```

Create directory for GOPATH setting.

```
$ mkdir ~/go
```

For GOPATH envirionment variable, add the following lines to the `~/.bash_profile`.

```
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH 
```
## Installing Visual Studio Code

Download and install VSCode from the following link.

- [Download Visual Studio Code \- Mac, Linux, Windows](https://code.visualstudio.com/Download)

After the installation, Launch VSCode.

Open the Extensions Marketplace (`Cmd+Shift+X`), search `Go` and install it.

![Go extension](https://dev-to-uploads.s3.amazonaws.com/i/9t69ovan4mxgkabygdgz.png)

open the Command Palette (`Cmd+Shift+P`) and run the `Go: Install/Update Tools` command.

![Go extensions](https://dev-to-uploads.s3.amazonaws.com/i/x451msl1u4gxqxfsw20b.png)
 
Install all the Go extensions listed there.

![Go extensions](https://dev-to-uploads.s3.amazonaws.com/i/wtlz4iv9m3ow3nm00sh0.png)

## Start coding

Create `hello.go` in VSCode.

```
package main

import "fmt"

func main() {
	fmt.Println("Hello, world!")
}
```

By default, auto-completion and formatting for code saving are enabled. That's great.

![auto-completion](https://dev-to-uploads.s3.amazonaws.com/i/1x993gm4bgyfjigthcle.png)

Open a terminal (`` Ctrl+` ``) and execute the following command.

```
$ go run hello.go 
Hello, world!
```

Have fun!👍
Monday Express BigO Notation [Day 1]
Tags: javascript, datastractures, algorithims, devcircles
Published: 2020-09-21 07:08:01

---
title: Monday Express BigO Notation [Day 1] 
published: true
description: Hello welcome to the first BigO notation challenge where we will be solving a few challenges

tags: #Javascript #Datastractures #Algorithims #DevCircles 
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/c5b6uew9ug4gb0i2ijvq.jpg
---

### Hello welcome to the first BigO notation challenge where we will be solving a few challenges :rocket:

# For our first challenge we are going to solve this problem, feel free to use any language that you are comfortable with. 


[Big O Challenge Link](https://www.hackerrank.com/challenges/ctci-big-o/problem)

A  _prime_  is a natural number  _greater than_  that has no positive divisors other than  and itself. Given  integers, determine the primality of each integer and print whether it is  `Prime`  or  `Not prime`  on a new line.

**Note:**  If possible, try to come up with an  primality algorithm, or see what sort of optimizations you can come up with for an  algorithm. Be sure to check out the  _Editorial_  after submitting your code!

**Function Description**

Complete the  _primality_  function in the editor below. It should return  `Prime`  if  is prime, or  `Not prime`.

primality has the following parameter(s):

-   _n_: an integer to test for primality

**Input Format**

The first line contains an integer,  , denoting the number of integers to check for primality.  
Each of the  subsequent lines contains an integer,  , the number you must test for primality.

**Constraints**

**Output Format**

For each integer, print whether  is  `Prime`  or  `Not prime`  on a new line.

**Sample Input**

```
3
12
5
7

```

**Sample Output**

```
Not prime
Prime
Prime

```

**Explanation**

We check the following  integers for primality:

1.  is divisible by numbers other than  and itself (i.e.:  ,  ,  ,  ), so we print  `Not prime`  on a new line.
2.  is only divisible  and itself, so we print  `Prime`  on a new line.
3.  is only divisible  and itself, so we print  `Prime`  on a new line.

I hope to see all those responses and if you can do a video solving the solution. 
# Good Luck :tada:
vagrant will not run an ansible play if the vm do not match the hosts line in the play
Tags: vagrant, ansible
Published: 2020-09-21 07:04:01

```
---
- hosts: localhost
  connection: local
  tasks:
    - debug: msg="Please work, Vagrant!"
```

I use a playbook with content as above in vagrant provision, but when run vagrant, it says

> skipping: no hosts matched

so it is run `ansible-playbook -i <vm-host-name>, playbook.yml`, if the target do not match `hosts:` in the play, the play will be skipped
How to Get Location from IP in Laravel
Tags: laravel, ip, laravelip
Published: 2020-09-21 07:01:05

Hi Guys
some weeks age i had been working on my Project and i had to get location from client's ip . so I searched in github and Packagist for a package that can get location from IP but there is no one . so I decided to develop a package with name laravel-ip.
this Package can get location by 3 Drivers:
* [ipinfo](https://www.ipinfo.io/)
* [ipapi](https://www.ipapi.com/)
* [geojs](https://www.geojs.io/)

and also You can Block some clients by ip,country and whatever you want and you can choose what ips can access to your site (I added this Feature for Pepole who deploy their Project on host and don't wanna someone see their website).

as I am lazy 😅😅 and i become tired to write all my README.md here Please see my github repository . 

**This is my first Package and i will be happy if you downlaod it and tell me it's Bugs if you found one**

https://github.com/hamidreza2005/laravel-ip
چاپ تراکت تحریر ، گلاسه
Published: 2020-09-21 06:55:48

<a href="https://b-zr.com/flyer/">چاپ تراکت تحریر و گلاسه</a> نوعی تبلیغات کاغذی می باشد که به منظور توزیع گسترده ، چاپ و در فضای عمومی بین مردم پخش می شود. تراکت ها گاهی روی در دیوار چسبانده می شود و گاهی مستقیم به درب منازل پست می شود. از تراکتها می توان برای اطلاع رسانی در حوزه کسب و کار و خبردار کردن مردم یک محله از خدمات خود آگاه کرد.
Github profile viewer count
Tags: github, git, githunt, showdev
Published: 2020-09-21 06:29:24

A simple way to add profile viewer count in your git. Copy the below code & paste it in your github README.md file. 👀

<pre>
![Visitor Count](https://profile-counter.glitch.me/{username}/count.svg)
</pre>

Replace the username with your github username.
When you preview it you would get something like this

![Visitor Count](https://profile-counter.glitch.me/{username}/count.svg)

Then commit it. 
From that time onwards whoever visits your profile each time the count will be added.

Tips: You can visit your own profile n number of times to increase the count as well 😁

Checkout my github profile to view the implementation ✌️

[My Github Profile](https://github.com/dhanushnehru)

You can also connect with me via [Twitter](https://twitter.com/Dhanush_Nehru)
Websocket - With Socket.io & Lravel echo
Published: 2020-09-21 06:14:01

As we all know about web-sockets ,as some times it may go difficult to implement. Here I will Mention the Perfect Simplified steps to implement a Web-socket for Front-end I have chosen  Veu.js

Here we are going to Use Redis - So First We have to Install Redis pon our system

```
sudo apt install redis-server
```

Lets Start with Laravel 

Step 1: Install Following Packages
```
 i)composer require predis/predis,
 ii)composer require illuminate/redis
```

Step 2: Add Following Line in .env file
```
REDIS_HOST = localhost
REDIS_PASSWORD = null
REDIS_PORT = 6379
REDIS_DB = 0

BROADCAST_DRIVER=redis
```
Step 3:Now Install laravel-echo-server globally with command

```
npm install -g laravel-echo-server
```
Step 4: Now in your Projects Root Folder run following command

```
laravel-echo-server init
```
After running above command it will ask you following questions - ans is appropriately as eg below is mine on local machine

```
? Do you want to run this server in development mode? Yes
? Which port would you like to serve from? 6001
? Which database would you like to use to store presence channel members? redis
? Enter the host of your Laravel authentication server. http://localhost
? Will you be serving on http or https? http
? Do you want to generate a client ID/Key for HTTP API? No
? Do you want to setup cross domain access to the API? No
? What do you want this config to be saved as? laravel-echo-server.json

``` 
Step 5: - Now start the Laravel Echo Server By command

```
laravel-echo-server start 
```
This will look like below :-

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/zyhghn4r5uhdfodrw286.png)
The Front End: S2-E4 - James Tucker
Tags: career, podcast, frontend
Published: 2020-09-21 06:10:34

Welcome to The Front End's fourth episode in season 2.  

Joining us this time it's rising Twitter star [James Tucker](https://twitter.com/tucker_dev/) who talks 'getting into dev' and how his career made a sharp turn from one possible future to a life as a full stack developer. 

Listen to the brand new episode here:

- Apple Podcasts > https://podcasts.apple.com/gb/podcast/the-front-end/id1499349107
- Pocket casts > https://pca.st/osul2zsa
- Spotify > https://open.spotify.com/show/4GuAxptrtY8Es5iHwp09dT
- Anchor > https://anchor.fm/the-front-end

## In this episode

James is a full stack developer based in Minneapolis currently working at Soona Studios. 

He loves Vue and Rails, and tweeting about tech, startups and big ideas.

James talks about his love of the web and how he moved from a potential career as a pastor into web development. He also shares some tips and advice on how to get started in development and his experiences to date.

## Listening direct

Want to listen directly from here?

{% spotify spotify:episode:0hXtpse8j81zQkLWZtjwYS %}

## Want to be a guest or sponsor the show?

We're always happy to take requests for guests to talk about a range of different development topics from careers to origin stories, learning and professional growth, frameworks and more.

Similarly, we're looking for sponsors to fill promotional slots within the show. 

You can find out more here:

- [Being a guest](https://thefrontendpodcast.site/guests)
- [Sponsorship information](https://thefrontendpodcast.site/sponsorship)

Thanks for listening!
RPA UiPath Training 
Tags: education, technology, training
Published: 2020-09-21 05:56:32

UiPath is being used by many peoples and students are showing interest in learning this technology for making this more comfort FITA is offering UiPath training in Chennai. We are having a good atmosphere for the students to learn and to gain knowledge. We also keep general test to check the eligibility of the students. So come join in FITA and have a great future.