teleren/devto huggingface dataset:
How to Use GitHub Pages
Tags: github, jekyll, ruby
Published: 2019-12-18 15:18:38

# How to Use GitHub Pages

GitHub Pages can serve static content for free using your GitHub account. I use Jekyll to theme and blog on [drugo.dev](https://drugowick.dev) (and the irony is that I'm moving to [dev.to](https://dev.to) now - more on that later). Whenever you commit to your GitHub Pages repository, [Jekyll](https://jekyllrb.com/) runs to rebuild the pages in your site, from the content in your Markdown (or HTML) files.

## Quick Start

For free GitHub accounts, create a public repository called `<username>.github.io`. The `<username>` must be your GitHub username.

Create an `index.md` file with the following content:

```
# Hello World
```

Now your website is up and running at `https://<username>.github.io`.

## Theming

You can theme GitHub pages simply by going to your repository Settings page and selecting a theme using the Theme Chooser on the GitHub Pages section. What this does is create a file on the root of your project... so, if you create the file yourself, you're done. Follow the steps:

1. Create a file named `_config.yml` on the root of your GitHub Pages repository.
2. Add the following to the file:
    ```
    theme: jekyll-theme-cayman
    ```
3. Commit the file and push it to GitHub.

You're themed! If you want to use other themes, you can either go to your repository Settings page or [learn more here](https://help.github.com/en/articles/adding-a-jekyll-theme-to-your-github-pages-site).

## Blog Posts

### Create a file

Blog posts are files with the following name convention under `_posts` directory:

```
YEAR-MONTH-DAY-title.md
Example: 2019-04-24-HelloWorld.md
```

### Add a header

The following header must be added to every blog post, although you might want to customize title and other things. It's up to you, really. The HOME link for example is totally a personal choice.

```
---
layout: default
title: Hello World
---

[HOME]({{ site.url }})
```

You then start writing your post using Markdown syntax.

## Developing locally

You don't want to edit everything on your web browser, do you? Especially after you start to know [everything Jekyll can do](https://jekyllrb.com/docs/).

To build the website locally follow the instructions [here](https://help.github.com/en/articles/setting-up-your-github-pages-site-locally-with-jekyll). You'll need Ruby. Build and run locally with `bundle exec jekyll serve` after configuring everything.

## Finally...

There's way more to learn about GitHub Pages and Jekyll, but I'd like to suggest just one more piece of documentation:

[Jekyll Data Files](https://jekyllrb.com/docs/datafiles/)

Jekyll Data Files are very useful to organize the information on your GitHub Page. It gives you the ability to edit sections of your page without touching the markup file (.md or .html), just like I taught you with the Posts, but for your own data structures. 

If you want to take a look, this websites uses, so far, Data Files for the "Useful Links" and "Active Projects" sections.
How I Got 10k stars on my Github Repository? 
Tags: github, beginners, sideprojects
Published: 2019-12-19 04:27:13

When I was in University, I missed a lot of opportunities like hackathons, conferences, internships and many global events due to lack of awareness. Being a freshman, I was not aware of what kind of opportunities were available for students. Of course, We get to know about this thing with time and active involvement in the community. 

I didn't want other students/juniors to suffer the same problem. Hence, I created a hand-curated list of all the resources for students/developers. 


![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/whfmju6848p88o7pohie.PNG)


- The list has got more than 1M+ views/impressions on Github and other publications. 
- Almost 10k :star:
- 3k forks
- 590+ Contributors from across the world. 

### How I got such massive traffic ? 

> Well, It's was never about getting stars :star: on repo but more for the value it would provide.

I published the list on GitHub, and people from all across the world helped me make this resource list better and better. For the next 2-3 months, I reviewed every single Pull Request on the repository and closed more than 800 Pull requests.

### Community is Key

Students/professionals/Developers from all across the world contributed and made the resources list richer. We have listed most of the contributed Name with their name, social links, and country name.


![Contributors](https://thepracticaldev.s3.amazonaws.com/i/5b27wgcc25m8dg3dh752.png)

So, let me tell you a brief what all we have added in the list known as `A-to-Z-Resources-for-Students`.

The list contains a brief and important resource in the following categories :

- **Coding Resource**

- **Hackathons and Events**

- **Student Benefits and Programs**

    - Campus Ambassador Programs
    - Student Benefits and Packs
    - Student Fellowship Programs
    - Scholarships

- **Open Source Programs**

- **Startup Programs and Incubators**

- **Internship Portal**

- **Developer Club and Meetups**

- **Conferences** 

- **Bootcamps**

- **Top People to follow(In Different Category)**. 


Yes, the list was huge and I literally took more than a week to search and compile the whole list. 

### Conclusion 



1. **Create and Build thing which you think can be helpful for others. Finding your own problem and solving is the key. There may be someone who is facing the same problem**



2. **Focus on creating valuable Content, Traffic and Audience will be the byproduct**. 


Finally, You can check out the repository below.


{% github dipakkr/A-to-Z-Resources-for-Students no-readme %}


I am glad you are still here. I hope you liked the post. Please don't forget to give your feedback in the comments. Getting feedback helps me improve. 


I write about Javascript, Web, and new stuff almost daily. You can follow me on [Twitter](https://twitter.com/diipakkr) | [Instagram](https://instagram.com/diipakkr)

[Subscribe to my email newsletter and stay updated!](https://dipakkr.substack.com/)

If you liked the post, please give some :heart:!! Cheers !!
This is my new favorite (free) programming tool – GitHub Actions Tutorial
Tags: webdev, tutorial, showdev
Published: 2019-12-19 15:41:46

I've tinkered with a ton of programming tools this year, but none of them has captured my heart like [GitHub Actions](https://www.github.com/features/actions). It's a continuous integration tool, yes, but it's also a general purpose code execution platform, and it's built into the website that I use to manage my projects every day. 

In this video, we'll explore the what, the why, and the how of GitHub Actions, building a very typical weather bot with a not-so-typical deployment strategy: it's deployed and run daily using GitHub Actions. In building the project, we'll understand how to get up and running with GitHub Actions, how to securely store environment variables and configuration details in our repositories, and much more. 

{% youtube J4EhgEskSZA %}

If you enjoyed the video, give it a thumbs-up, and [subscribe to our channel](https://www.youtube.com/channel/UC046lFvJZhiwSRWsoH8SFjg?sub_confirmation=1) for more web dev content every week. We also have a newsletter where we send out what's new and cool in the web development world, every Tuesday – [join here](https://www.bytesized.xyz/newsletter)!
Using Python to create PostgreSQL tables with random schema
Tags: postgres, database, metadata, python
Published: 2020-01-02 18:20:28

Having a large amount of test data sometimes take a lot of effort,  and to simulate a more realistic scenario, it’s good to have a large number of tables with distinct column types. This script generates random tables schema for PostgreSQL.

If you want to set up a PostgreSQL environment for dev and test purposes, take a look at: https://dev.to/mesmacosta/quickly-set-up-a-postgresql-environment-on-gcp-758


## Environment

##### Activate your virtualenv
```bash
pip install --upgrade virtualenv
python3 -m virtualenv --python python3 env
source ./env/bin/activate
```

##### Install the requirements for the metadata generator
```bash
pip install -r requirements.txt
```

## Code
{% gist https://gist.github.com/mesmacosta/00d1f4854c7a9475dce307b7fc0a8258 %}

## Execution
```bash
export POSTGRESQL_SERVER=127.0.0.1
export POSTGRESQL_USERNAME=postgres
export POSTGRESQL_PASSWORD=postgresql_pwd
export POSTGRESQL_DATABASE=postgres

python metadata_generator.py \
--postgresql-host=$POSTGRESQL_SERVER \
--postgresql-user=$POSTGRESQL_USERNAME \
--postgresql-pass=$POSTGRESQL_PASSWORD \
--postgresql-database=$POSTGRESQL_DATABASE

```

And that's it!

If you have difficulties, don’t hesitate reaching out. I would love to help you!
How to Use Make Auth in Laravel 6
Tags: laravel, laravel6, auth, laravelauthenticati
Published: 2020-01-02 18:47:07

---
title: How to Use Make Auth in Laravel 6
published: true
date: 2019-09-25 19:43:18 UTC
tags: Laravel,Laravel 6,Auth,Laravel Authenticati
canonical_url: https://codebriefly.com/how-to-use-make-auth-in-laravel-6/
---

 ![how-to-use-make-auth-in-laravel-6](https://codebriefly.com/wp-content/uploads/2019/09/how-to-use-make-auth-in-laravel-6.jpg)

In this article, we will discuss “how to use make auth in Laravel 6”. Officially Laravel 6 is available now, but some of the changes here, as expected. Because you are reading this article, So I assume you are still not familiar with the Laravel 6. Note that, It’s an LTS version of Laravel. If […]

The post [How to Use Make Auth in Laravel 6](https://codebriefly.com/how-to-use-make-auth-in-laravel-6/) appeared first on [Code Briefly](https://codebriefly.com).
Laravel Scout with TNTSearch Driver
Tags: laravel, laravel6, laravelcodesnippet
Published: 2020-01-02 18:51:46

---
title: Laravel Scout with TNTSearch Driver
published: true
date: 2019-10-03 20:00:04 UTC
tags: Laravel,Laravel 6,Laravel Code Snippet
canonical_url: https://codebriefly.com/laravel-scout-with-tntsearch-driver/
---

 ![Laravel Scout with TNTSearch Driver](https://codebriefly.com/wp-content/uploads/2019/10/laravel-scout-with-tntsearch-driver.jpg)

In this article, we will discuss “Laravel Scout with TNTSearch Driver”. As we know Laravel provides rich features to make development easy and smooth. Laravel provides an official package “Laravel Scout”, which helps to create a full-text search functionality in your application. Prerequisites Here, we need a Laravel installation to make this Laravel Scout functionality. […]

The post [Laravel Scout with TNTSearch Driver](https://codebriefly.com/laravel-scout-with-tntsearch-driver/) appeared first on [Code Briefly](https://codebriefly.com).
Brief Understanding Laravel Scopes
Tags: laravel, laravel57, laravel58, laravel6
Published: 2020-01-02 18:49:20

---
title: Brief Understanding Laravel Scopes
published: true
date: 2019-11-25 15:21:09 UTC
tags: Laravel,Laravel 5.7,Laravel 5.8,Laravel 6
canonical_url: https://codebriefly.com/brief-understanding-laravel-scopes/
---

 ![Brief Understanding Laravel Scopes](https://codebriefly.com/wp-content/uploads/2019/11/brief-understanding-laravel-scopes.jpg)

In this article, we will discuss “Brief Understanding Laravel Scopes”. I will try to explain to you, How can you use this in your Laravel application. As we know, Laravel provides lots of rich features to make development easy and simple. You can check the official documentation here. Now, the first question is: Why we […]

The post [Brief Understanding Laravel Scopes](https://codebriefly.com/brief-understanding-laravel-scopes/) appeared first on [Code Briefly](https://codebriefly.com).
Execute Django tests in your github actions
Tags: django, testing, github, actions
Published: 2020-01-12 15:31:25

When you are trying github actions with your django project, and your database is for example, PostgreSQL, could be a problem running tests in the workflow (personal experience 😋).

The problem is, you don't have an environment or DB engine running inside github actions platform, neither a server where github actions could run tests, then,  when is turn of "run tests" step, you'll have this error.

![Running django tests with connection error](https://thepracticaldev.s3.amazonaws.com/i/ebn90vzctslhe2869kbt.jpg)

So, ¿what do we do?.

Well, an easy way to fix this problem is check if your project is running in test mode to change your DB engine to SQLite inside settings.py, in this way, github actions could run all tests.

{% gist https://gist.github.com/gamorales/6f6b77d6e89606f8dfdba4c171c2f949 %}

![Running django tests Ok](https://thepracticaldev.s3.amazonaws.com/i/hieac53fy2757dahl3uo.jpg)

This is my first post in dev.to, I hope could help somebody with the same problem I had.

[Github actions workflow](https://gist.github.com/gamorales/31b41565764dbea4acbb888c1f3a3678)
Acoustic Atlas @ Web Audio Conference
Tags: webaudio, acoustics, javascript, tonejs
Published: 2020-01-02 22:33:38

---
title: Acoustic Atlas @ Web Audio Conference
published: true
description: Art Piece at Web Audio Conference 2019
tags: webaudio, acoustics, javascript, tonejs
---

Last year I participated in the Web Audio Conference with [Cobi van Tonder](https://www.otoplasma.com/) presenting a website called [Acoustic Atlas](https://acousticatlas.de). This project allows the visitor to virtually experience the acoustics of natural and cultural world heritage sites. Please make sure you have access to microphone and or headphones when exploring it.

![alt text](https://static.wixstatic.com/media/a86de2_17dd8d92a9ed49348c4a5d6d7182aed1~mv2_d_2240_1296_s_2.png/v1/fill/w_925,h_536,fp_0.50_0.50,q_90/a86de2_17dd8d92a9ed49348c4a5d6d7182aed1~mv2_d_2240_1296_s_2.webp "Acoustic Atlas Cathedral")

You can read more about [Acoustic Atlas here](https://www.otoplasma.com/post/acoustic-atlas-premieres-wac2019-trondheim). 

You can also find the paper abstract here [(PDF)](https://www.ntnu.edu/documents/1282113268/1290817924/WAC2019-CameraReadySubmission-50.pdf/).
Jan. 10, 2020: What did you learn this week?
Tags: weeklylearn, discuss, weeklyretro
Published: 2020-01-10 05:14:27

It's that time of the week again. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.

![Two hockey players reading a play book](https://media.giphy.com/media/OqJdvB5VyUUqNoZdjO/giphy-downsized-large.gif)

Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.

{%tag todayilearned %}

And remember, if something you learnt was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿

{% link https://dev.to/jess/what-was-your-win-this-past-week-4ac4 %}

![Victory!](https://media.giphy.com/media/K3RxMSrERT8iI/giphy.gif)
I implemented a sample Django app written in Hylang.
Tags: hy, hylang, django, lisp
Published: 2020-01-04 07:35:01

---
title: I implemented a sample Django app written in Hylang.
published: true
description: 
tags: hy, hylang, django, lisp
---

I wrote [the app](https://github.com/charlie-browns/django-app-with-hylang).
The above is written in Hylang with Django and Django REST framework.


## TODO

Hylang is one of a Lisp dialect. Of course it can use Lisp macro 
but It doesn't actually use any lisp macro powers yet.
NoSql but with SQL
Tags: 100daysofcode, couchbase, nosql, sql
Published: 2020-01-09 19:51:45

#Couchbase
I am so much comfortable with PHP and MariaDB && MySql || Sqlite3
I ❤️ couchbase in JS.
Enterprise-Class, Multicloud To Edge NoSQL Database
###And it is NoSql but with SQL

[![View on vgy.me](https://i.vgy.me/yk2R9f.png "View yk2R9f.png on vgy.me")](https://vgy.me/u/yk2R9f)

https://www.couchbase.com/

https://db-engines.com/en/system/CouchDB%3bCouchbase%3bMongoDB

day16
31 character password length limit in Mojave
Tags: mac, security
Published: 2020-01-10 17:06:44

---
title: 31 character password length limit in Mojave
published: true
description: OSX, at least Mojave, has a 31 character password limit.
tags: mac, security
cover_image: https://thepracticaldev.s3.amazonaws.com/i/l7c88rbejoa148mqddlm.jpg
---

Today I learned that [Mojave has a 31 character password limit](https://www.mac-forums.com/forums/macos-operating-system/317066-maximum-length-passwords.html).

In general I like long random passwords managed in a password manager.

However, there are a few passwords that I find I have to type frequently. The password to access the password manager itself. The single sign-on paasword. These I like to be [long passwords easy to remember and type but difficult to brute force](https://xkcd.com/936/).

While the single sign-on system at issue generally supports a longer maximum password length, it turns out using a length longer than 31 characters is a way to lock myself out of my Mac. Trimming the password down to 31 characters fixed it.

Mostly leaving this post as a note to myself for next time.

[Cover image credit](https://unsplash.com/photos/-LFe6Prglw4)
What are your tech survival skills for 2020?
Tags: discuss, career
Published: 2020-01-10 21:08:44

Do you know with every new tech we accept some old and current tech jobs reduce in number. What are some of your experiences? 
For example Cloud Computing reduced in house datacenter teams. SAAS products reduced in house development jobs.

So how are you preparing yourself with the rise of #serverless #machinelearning #artificialintelligence
"Be prepared to disrupt or get disrupted."
[Heroku] No app specified. 😅 how to omit -a, --a option
Tags: heroku
Published: 2020-01-10 21:37:44

## 🤔 Situation

```sh
$ heroku apps:info
 ▸    No app specified.
 ▸    USAGE: heroku info my-app
```

## 👍 Solution
### 1. Check your git remote

```sh
$ git remote -v
origin	git@github.com:n350071/my-app.git (fetch)
origin	git@github.com:n350071/my-app.git (push)
```

### 2. set the git remote to heroku
Then, Heroku will automatically detect your app when you're in the git managed directory.

```sh
$ heroku git:remote --app my-app-prototype
set git remote heroku to https://git.heroku.com/my-app-prototype.git

$ git remote -v
heroku	https://git.heroku.com/my-app-prototype.git (fetch)
heroku	https://git.heroku.com/my-app-prototype.git (push)
origin	git@github.com:n350071/my-app.git (fetch)
origin	git@github.com:n350071/my-app.git (push)
```

## 🦄 Solved

```sh
$ heroku apps:info
=== my-app-prototype
Addons:         cleardb:ignite
                sendgrid:starter
Dynos:          web: 1
Git URL:        https://git.heroku.com/my-app-prototype.git
Region:         us
Repo Size:      0 B
Slug Size:      71 MB
Stack:          heroku-18
```
Reading Snippets [32 => CSS]
Tags: css, beginners
Published: 2020-01-11 10:38:30

Custom properties contain specific values to be reused in a document. 

Custom property notation (e.g., <code>--main-color:black;</code>) is used to set custom properties.

Declaration of custom property on the <code>:root</code> pseudo-class allows for use where needed throughout a document. 

The <code>var()</code> function is used to access custom properties.

<kbd><b>Example:</b></kbd>

<small><i>Declaring a custom property:</i></small>
<code>
element {
  --main-bg-color:brown;
}
</code>


<small><i>Using the custom property:</i></small>
<code>
element {
  background-color:var(--main-bg-color);
}
</code>

<kbd>Source:<small><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties">Developer.Mozilla</a></small></kbd>
Makers - Week 2
Tags: ruby, beginners, bootcamp
Published: 2020-01-11 11:48:18


I used this time to eat, catch up with family, and code! I found a fantastic course on udemy that went through the specifics of rspec (shout out to the coach Boris!) and spent some time reading the fantastic book 'Practical Object-Orientated Design in Ruby: An Agile Primer' by Sandi Metz. 

I really wish i could go back in time and read this before the on site course started, but better late than never. It really helped with basic OO principals such as SRP, dependancy injection and how to build effective classes. 

I took some time away from the screen, and started the course with a new found enthusiasm and motivation to be a better developer. Week 3 here we come!

As always wish me luck!
Remove duplicates rows with SQL
Tags: sql, snippet
Published: 2020-01-14 11:23:41

Last week I made a small update error on my application and I ended up with duplicates values in a table. Of course, this would not have happened if I had a unique key, but as I check before inserting, I thought I was safe.

Unfortunately, as I couldn't delete everything and just start updating data again, I had to figure out how to delete duplicates rows.

As a first step, I run a simple query to find out how much I was in trouble.

```sql
SELECT Place_ID, Event_ID, StartDate, COUNT(*)
FROM   Showings
GROUP BY Place_ID, Event_ID, StartDate
HAVING COUNT(*) > 1
```

Good news first: there are no triplets :)

Less good news: I have more than a thousand rows to delete. So no way to do this by running one request after the other...

Good thing: since my table has a primary key, I can identify duplicate data:

```sql
SELECT Place_ID, Event_ID, StartDate, MAX(Showing_ID) AS ID
FROM   Showings
GROUP BY Place_ID, Event_ID, StartDate
HAVING COUNT(*) > 1
```

This way, I find the IDs of all the rows added when there was already a record with the same data (Place_ID, Event_ID and StartDate). I only have to delete these useless values (since the others were there first) :

```sql
DELETE
FROM   Showings
WHERE  Showing_ID IN (
                       SELECT MAX(Showing_ID)
                       FROM   Showings
                       GROUP BY Place_ID, Event_ID, StartDate
                       HAVING COUNT(*) > 1
                      )
```

Sometimes, IT is not that complicated.

---

This post was originally published on my [blog](https://blog.pagesd.info/2020/01/14/remove-duplicate-rows-sql/).
Cover image : [The Lady from Shanghai - Rita Hayworth](https://en.wikipedia.org/wiki/The_Lady_from_Shanghai)
Javascript: Printing Object in Console
Published: 2020-01-11 21:30:19

If you're trying to print object in console and you're getting `[object Object]`, then most probably you're trying to print the object as a string value. Add comma(`,`), and not plus operator(`+`)

Ex: 
> ```javascript
console.log('The value of object is: ' + obj) 
```
❌❌


> ```javascript
console.log('The value of object is: ' , obj)
``` 
✔️✔️
Thoughts, Tips, and Observations about speaking at conferences: a thread from Corey Qinn
Tags: speaking, motivation, beginners, techtalks
Published: 2020-01-12 03:24:26

---
title: Thoughts, Tips, and Observations about speaking at conferences: a thread from Corey Qinn
published: true
description: 
tags: speaking, motivation, beginners, techtalks
---

I just finished reading this 100+ long, entertaining, and **amazing** thread:

{% twitter 1215710451343904768 %}

Posting here in case you haven't seen it. Highly recommended. If you've never thought about speaking, it may inspire you. If you have just started ([like me](https://dev.to/touchlab/a-first-time-speaker-s-journey-from-cfp-to-stage-5pk)), you'll learn a lot. If you are a veteran, I suspect there's interesting tidbits in there for you, too.