teleren/devto huggingface dataset:
Lab 01 - Static Site Generator Collaborations
Tags: opensource, swift, python, programming
Published: 2021-09-17 05:29:06

## First Meeting 
I collaborated with Ahmad Rokay. We met through slack. I posted as I was looking for a partner to work with. I felt that my project is a little different from others. I worked on swift language which is kind of new and never taught to us. I can see no one worked with this language. It was a bit challenging However, I was able to manage with his help. I knew it might have some errors. This was my first release 0.0.1. 

## My Impression
When I looked into Ahmad's code as he worked with python. I pretty much liked it clean and perfectly written. However, I found minimal bugs that were mentioned to Ahmad. All in all, he was able to make up the project with all features mentioned in release 0.1.

## Ahmad's Project Issues

>In the beginning, when I started and wasn't able to run his code on my computer. I thought it might be the issue because I have the Mac Operating system. But, the issue was related to the version of python. Once, the V 3.9 was re-installed. It stopped giving errors. [issue1](https://github.com/a-rokay/static-site-generator/issues/2) 

>While running different arguments, another issue we could find was that there were same naming extensions errors. A folder that ended with ".txt" would be treated as a single file. This was resolved by Ahmad himself.[issue 2](https://github.com/a-rokay/static-site-generator/issues/3)

>Another issue found by professor was the name for the project which needed to be changed to make it more understandable and easier for someone to look into.
[issue 3](https://github.com/a-rokay/static-site-generator/issues/1)

## My Project Issues
>I was able to make my code bit clean and easy to read. I formatted my code and made it user friendly. However, it still looks bit long but i hope while working i will make it effective and smaller.[issue 1] (https://github.com/japneetsingh035/ModernSSG/issues/7)

>My stylesheet was only working for folder path. It won't work on single files. So, I made it work now for single path files as well.[issue 2]
(https://github.com/japneetsingh035/ModernSSG/issues/6)

>The input/output directories were hardcoded. These should have been relative to the program's location. Well, I am working on this one. I was able to make it worked for multiple files. However, It still needs for one file which I will surely do it.[issue 3](https://github.com/japneetsingh035/ModernSSG/issues/5)

>This issue was important as I was missing the closing tags in my html file. So, thats why i needed another pair of eyes :).
[issue 4](https://github.com/japneetsingh035/ModernSSG/issues/4)

## Result
It's great to collaborate with others and work with each other's project. It was different and interesting to find error in someone else's codes. same as someone finding in mine. As, it is said that, other pair of idea makes things better. Some things that I was not able to see in my code were found by my classmate and i was able to resolve them.
5 JavaScript Concepts Everyone Should Learn
Published: 2021-09-17 05:00:26

Hello and welcome in this post we are going to learn about 5 JavaScript concepts everyone should learn. All the concepts that I am going to talk about in this post are very important if you want to master JavaScript. You will use all those concepts in day to day work.

##Spread Operator
Spread operator is a new set of operators that is introduced in JavaScript ES6. In this an iterable or you can say an array is expanded into individual items. Like if someone ask you to extract every single element from an array then you have to use spread operator concept.

Sometime you have a set of data and you have to extract it in single elements then spread operator will help you. It is also included in dart programming language also.

Continue Reading This Post [HERE](https://crunchythings.xyz/5-javascript-concepts-everyone-should-learn/)

[Join Telegram Group](https://t.me/DevelopersSquad)
Create a Netflix clone from Scratch: JavaScript PHP + MySQL Day 53
Tags: php, javascript, webdev, tutorial
Published: 2021-09-17 04:44:55

Netflix provides streaming movies and TV shows to over 75 million subscribers across
the globe. Customers can watch as many shows/ movies as they want as long as they are
connected to the internet for a monthly subscription fee of about ten dollars. Netflix produces
original content and also pays for the rights to stream feature films and shows.


In this video,we will be  Creating the entity Page
{% youtube ViEt8uS0CzI  %}



If you like my work, please consider
[![Buy me a coffee](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jm11knj7d8zwcvo150q2.png)](https://www.buymeacoffee.com/cglikpo)
so that I can bring more projects, more articles for you

If you want to learn more about Web Development, feel free to [follow me on Youtube!](https://www.youtube.com/c/ChristopherGlikpo)
Database Indexing 
Tags: mongodb, database, mysql, postgres
Published: 2021-09-17 04:43:13

Indexing is always the most crucial part of a database design where you have to trade-off between write operation speeds and read/update/delete speeds. While deciding the type of indexes, one must always consider several factors like the kind of expected queries, read-to-write ratio, amount of memory in your system, size of your database etc. 

While coming up with an indexing strategy, one must always have a deep understanding of the application's queries and what are the most frequently referred fields. Relative frequency of each query justifies whether it even needs an index or not.

Before using the strategy in production, indexes must be designed and tested over with different configurations in the dev-environment itself to inspect which strategy performs the best. 
Inspect the current indexes created for your collections to ensure they are supporting your current and planned queries. If an index is no longer used, drop the index.

The following are some indexing strategies that can come handful while designing your database structure :

#### Indexing for your queries
An index supports a query when the index contains all the fields scanned by the query. Creating indexes that support queries results in greatly increased query performance.
#### Indexing for sorting related queries
One can support efficient queries, by using the strategies here while specifying the sequential order and sort order of index fields.
#### Ensuring that indexes fit in RAM
When the index fits in RAM, one can avoid reading the indexes from the disk and get faster processing speeds.
#### Create Queries that Ensure Selectivity
Selectivity is the ability of a query to narrow results using the index. Selectivity allows databases to use indexes for a larger portion of the work associated with fulfilling the query.

## Different types of indexes available - 
1. Single Field
2. Compound Indexing (Using multiple fields to create single index)
3. Text Indexing
4. Partial Indexing (Indexing a field based on a condition)
5. Sparse Indexing (Ensures that the each row in database contains the index or else the row is skipped)
6. TTL Indexing (Special indexing that can remove rows after certain amount of time)

A combination of the above mentioned indexes can easily enhance the processing speeds of your queries.
Syracuse Sequence Generator
Tags: python, computerscience, programming
Published: 2021-09-17 04:04:16

```python
# syracuse_sequence.py
#   This program generates the syracuse sequence by starting with a
#   natural number and repeat the function til it reaches 1
# by: Scott Gordon

def main():
    print("Welcome to Syracuse Sequence Generator\n")
    num = int(input("Enter initial value (int >= 1): "))
    while num != 1:
        print(num, end=' ')
        if num % 2 == 0:
            num = num / 2
        else:
            num = 3 * num + 1
    print(1) 

if __name__ == '__main__':
    main()

```
Photo by <a href="https://unsplash.com/@bradyn?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Bradyn Trollip</a> on <a href="https://unsplash.com/s/photos/sequence?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
React Native Mobile Apps, Working With React Navigation Authentication And Supabase Login Pt 1
Tags: reactnative, supabase, video, tutorial
Published: 2021-09-17 03:50:15

{% youtube aBuB-Q6vHDE %}

In this video we build upon the last and add [Supabase](supabase.io) to the project. We implement an authentication check for the application when it first starts up and redirects to the un protected pages if there is no session and then to the protected pages if there is a session.

We also added the Supabase signOut function to show the app redirecting back to the unprotected AuthenticationSack once the session was gone.

Join with me on my journey of refreshing my memory with React Native and building mobile applications

- https://supabase.io/
- https://reactnavigation.org/docs/getting-started
- https://docs.expo.dev/get-started/create-a-new-app/

## Video Series - React Native Refresher
------------------------------------------------------------
Part 1 - Intro to Working with React-Navigation - https://youtu.be/uqH00SEmKxg
Part 2 - React Navigation Drawer Navigator And Authentication Flow - https://youtu.be/5e67b0PBcn4
Part 3 - Authentication And Supabase Login - https://youtu.be/aBuB-Q6vHDE
Part 4 - Authentication, Supabase, And React Hook Form - https://youtu.be/ZU3lXTm9nVY
Part 5 - Supabase Create Account, And React Hook Form - https://youtu.be/lu1JzyBfSOQ
Part 6 - Expo Camera, Supabase Buckets and Image Upload - https://youtu.be/RmlekGDv8RU

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/W7W31U7HM)
How To Create Dynamic Pie Chart In Laravel
Tags: laravel, javascript, css, piechart
Published: 2021-09-17 03:23:43

Today i will show you how to create dynamic pie chart in laravel, Pie chart is a circular statistical graphic which is divided into slices to illustrate numerical proportion, for creation of dynamic pie chart example we will create route, add controller, create blade file and will add database.

Here, I will perform pie chart example in laravel 8,so, let's see laravel 8 charts JS example.

 
```
Step 1 : Install Laravel 8 for Dynamic Pie Chart Example

Step 2 : Create Model and Migration for Pie Chart Example in Laravel 8

Step 3 : Add Route Laravel 8 Charts JS Example

Step 4 : Create Controller

Step 5 : Create Blade File
```

---

![How To Create Dynamic Pie Chart In Laravel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ll00oa18haadmrlfdsrg.png)

---

> **_[Read More : How To Create Dynamic Pie Chart In Laravel
](https://techsolutionstuff.com/post/how-to-create-dynamic-pie-chart-in-laravel)_**
Dodo Static Site Generator (v0.1)
Tags: opensource, osd600, node
Published: 2021-09-17 03:02:24

For release 0.1 of [OSD600](https://github.com/Seneca-CDOT/topics-in-open-source-2021/wiki/release-0.1), the goal was to create a Static Site Generator (SSG). An SSG can be a really useful tool to avoid having to manually write HTML code since it can be automatically generated from a simple txt file.

To complete this little project I used NodeJS and Yargs. Yargs is a Node library that allows to parse arguments to a command line interface. It was my first time using it and I found it pretty intuitive (I also like its [pirate theme](https://yargs.js.org)!)

I am relatively new to NodeJS so I found myself going through the [docs](https://nodejs.org/api/fs.html#fs_synchronous_api) a lot to learn how to work with files.

The tool is called [static-dodo](https://github.com/menghif/static-dodo) and is pretty simple to use. Here is the `--help` menu:

```
Usage: static-dodo [options]

Options:
  -i, --input       Load input file or directory  [required]
  -s, --stylesheet  Provide stylesheet
  -h, --help        Show help                      [boolean]
  -v, --version     Show version number            [boolean]
```

###Example

Here is a sample text named `Silver Blaze.txt`:
```
Silver Blaze


I am afraid, Watson, that I shall have to go,” said Holmes, as we
sat down together to our breakfast one morning.

“Go! Where to?”
```

And here is the output after running the command `./static-dodo -i
 Silver\ Blaze.txt` :
```html
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Silver Blaze</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  
</head>
<body>
  <h1>Silver Blaze</h1>


  <p> I am afraid, Watson, that I shall have to go,” said Holmes, as we
sat down together to our breakfast one morning.</p>

  <p>“Go! Where to?”</p>
</body>
</html>
```

###Additional Features

The first line of the text is used as a `h1` header and the output file is saved into a new `dist` folder.

Another feature I have added is the ability to add a CSS stylesheet using the option `-s` or `-stylesheet`.

For example:
```bash
./static-dodo -i Silver\ Blaze.txt -s https://cdn.jsdelivr.net/npm/water.css@2/out/water.css
```
will create the following [HTML page](https://menghif.github.io/dodo-SSG/dist/Silver%20Blaze.html) with beautiful CSS.

To write this program it took me longer that I expected but I am happy with the results and I know things can always be improved. The code can be viewed on [Github](https://github.com/menghif/dodo-SSG) and I welcome any suggestions for improvements!
Forming habits by taking advantage of the consistency and commitment biases
Tags: productivity
Published: 2021-09-17 02:56:21

## Forming Habits

There's lots of research and studies that show creating a habit can take anywhere between 21 days to 8 months. I'm too lazy to cite them, you can find them yourselves (if you find studies that prove the counterpoint, please share!).

For the past couple of years, I've been working on a few daily habits:

1. Adding and reviewing my Anki cards
1. Practicing Chinese
1. Walking 11,000 steps
1. Intermittent fasting
1. Lifting weights

Most habit trackers are made for you to check off the habit after you've completed it. This means, unless you have the habit scheduled, you are unlikely to do it. I've found a way to use the consistency and commitment biases to help me do my daily habits.

## The Consistency Bias

Humans have a bias to staying consistent. If you've told someone or even yourself you'll do something, the odds of you doing it is a lot higher if you hadn't told it. Even when it acts against our best interest, we tend to be consistent with our prior commitments, ideas, thoughts, words, and actions.

There are many reasons for this: a big one for me is to appear "right". If I tell someone I'm going to do something, otherwise, I'll be in an awkward situation. Being or appearing "right" is better than appearing "wrong".

## The Commitment Bias

The commitment bias is very similar to the consistency bias. The difference is that the commitment bias is a subset of the consistency bias. The commitment bias applies to things you've committed to while the consistency bias applies to your beliefs, ideas, and actions.

## How to take advantage of the biases for your habits

Okay so how do we use the consistency and commitment bias to form habits?

Instead of checking off a habit _after_ you've completed it, you should check off the habit at the start of the day _before_ you've completed it.

By doing this, you're committing yourself to do the habit. If you don't do the habit by the end of the day, you will have to face yourself being inconsistent by un-checking the completed habit.
Newsletter sharing font & design tips 🎨
Tags: design, startup, saas, fonts
Published: 2021-09-17 02:10:14

Hi everyone! I'm Hua and I run a design tool startup called Typogram! As part of my startup, I create FontDiscovery, a digestible weekly newsletter with fonts, colors, and design tips to help makers step up their game in marketing and get creative! If you feel like checking it out, you can subscribe [here](https://fonts.substack.com/)
My-First-SSG
Tags: opensource, javascript, html, github
Published: 2021-09-17 01:42:00

From the first day being in the __OSD 600__, we had been asked to make a __Static Site Generator__(_SSG_) as our first assignment in this course. Although we are free to choose any language we like to make this project, I chose the only language that I think I'm good at comparing to other coding languages which is __JavaScript__.

After picking a language, the next thing I need to do was give it a _name_. Since I'm not good at naming anything, I just called it as __"My-First-SSG"__.


##My-First-SSG
__My-First-SSG is__ a program as its name. It generates a __HTML__ file base on the user __input .txt file__ or __input folder that contains some .txt files__. 
For example, we have 5 .txt files as a test files from our professor __David Humphrey__. These are chapters reading from the book __"Sherlock-Holmes"__. And __My-First-SSG__ could __convert__ all of these __.txt files__ to __HTML files__ with only _one_ __command__. 

##Features
Except the _basic features_, I also required to add __2__ or more _optional features_ for __My-First-SSG__.
+ I make my code takes the first line of the .txt file which generally was as the _title_ and put then to the `<title> </title>` and add it into `<h1> </h1>` to the top of the `<body>`.
+ I make my own `<footer>`.


##Example [Step By Step]
1. Clone the source code from [Github](https://github.com/DerekJxy/My-First-SSG) 
2. Open the source file with __Visual Studio Code__ 
3. Install the package __yargs__ by `npm -i yargs`
4. Use the command `node server.js -h` to get __help__ information
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vqzz5noulj3xtc83vjtu.png)
5. Use the command `node server.js -v` to check the __version__
6. Use the command `node server.js -i Silver Blaze.txt` to run the code, which will generate a __SilverBlaze.html__ file into the __./dist__ folder. 
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k8udnf2eqbe78bfbna5b.png)
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dtk55olzenpps6vrb9tu.png)
7. Use the command `node server.js -i .\Sherlock-Holmes-Selected-Stories\` to run the code, which will generate a bunch of html files with a specific name bases on the .txt files that the Sherlock-Holmes-Selected-Stories contains, and put them into the __./dist__ folder. 
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/54prpy9jpdag0i4rqso8.png)
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/756lx4qa1xiqvxgtdafz.png)
 

##Demo
Click [here] (https://derekjxy.github.io/My-First-SSG/) to check the Demo. 
Since this is the _first_ version of __"My-First-SSG"__, there are more and more features __coming up__ soon!

__Link__ to the repository: [https://github.com/DerekJxy/My-First-SSG]
Helm starter chart
Tags: helm, k8s, kubernetes, helmtemplate
Published: 2021-09-17 01:38:50

---
title: Helm starter chart
published: true
description: Helm Chart Starter template used during chart creation
tags: #helm #k8s #kubernetes #helmtemplate
//cover_image: https://direct_url_to_image.jpg
---
In this post we will check out the helm stater template charts

#### what is it about
* Generally there are two types of helm charts Application and Library.
* Apart from this we have a starter chart that helps as a template to create charts. This is used with helm create command.
* They are helpful in templating the charts that needs be created.

#### how it works
using a sample in GitHub to get started, we can see how this works

pre requisite - helm ( in the example we are using helm v3.6.3 )

> clone the repo 
```
https://github.com/uptownaravi/helm-starter.git
```
Create a environment variable $XDG_DATA_HOME which points to a folder of your choice and move sample-starter-chart folder from the cloned repository to $XDG_DATA_HOME/helm/starters path.

Starter charts needs to be available in the path so that the helm create command can refer this template

Notice that we have <CHARTNAME> many places in the chart, this is the value which gets replaced with the chart name that is given during creation time.

We can have object names derived with <CHARTNAME> so all the charts created from this template is unique. (readme gives details of this chart)

> Run the helm create command with starter option
```
$ helm create myapp --starter sample-starter-chart
```
this creates a myapp chart replacing the <CHARTNAME> values in the starter chart template.

We can customize the object names using the _helper.tpl functions. This way we can create names as per the <CHARTNAME> that is used in the files like deployment.yaml

#### usage
This is a great way to have a reusable template that helps in building new charts. And to enforce certain components or resources that needs to be available in the created charts.

> Note - chart.yaml created does not inherit the chart.yaml from the starter chart. That is a setback as we don't get the version or dependency charts from the template.

#### ref
https://helm.sh/docs
https://helm.sh/docs/topics/charts/#chart-starter-packs

follow @
https://in.linkedin.com/in/harish-aravindan
https://github.com/uptownaravi
September 16th, 2021: What did you learn this week?
Tags: weeklylearn, discuss, weeklyretro
Published: 2021-09-17 01:23:47

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.

<center>

![Information flowing through your brain](https://media.giphy.com/media/qKltgF7Aw515K/giphy.gif)

</center>

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 learned was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿

{%link https://dev.to/devteam/what-was-your-win-this-week-28f6 %}

<center>

![Someone feeling like "Yaaas!"](https://media.giphy.com/media/zBhZiVNNQjfTG/giphy.gif)
</center>
part 3: 5 cool css properties
Tags: css, html, codenewbie, beginners
Published: 2021-09-17 01:02:37

Hi, I'm [Aya Bouchiha](developer.aya.b@gmail.com), and this is part 3 of 5 cool CSS properties.
+ [part 1](https://dev.to/ayabouchiha/5-cool-css-properties-part-1-nkg/)
+ [part 2](https://dev.to/ayabouchiha/part-2-5-cool-css-properties-bdl)

## word spacing

+ **word-spacing**: specify the space between words.

{% codepen https://codepen.io/Aya_Bouchiha/pen/jOwYdXq %}

## line-height

+ **line-height**: specifies the line-height of specified content.

{% codepen https://codepen.io/Aya_Bouchiha/pen/NWgXoJG %}

## object-fit

+ **object-fit**: specifies how an image, video should be displayed and resized. [more info](https://www.w3schools.com/cssref/css3_pr_object-fit.asp)

{% codepen https://codepen.io/Aya_Bouchiha/pen/wvepOBK %}

## letter-spacing

+ **letter-spacing**: specifies the space between the letters.

{% codepen https://codepen.io/Aya_Bouchiha/pen/dyRJwyY %}

## cursor

+ **cursor**: specify the cursor type.
+ [all cursor types](https://www.w3schools.com/cssref/pr_class_cursor.asp)

{% codepen https://codepen.io/Aya_Bouchiha/pen/vYZpvXy %}

## Summary

+ **cursor**: specify the cursor type.
+ **letter-spacing**: specifies the space between the letters.
+ **object-fit**: specifies how an image, video should be displayed and resized.
+ **line-height**: specifies the line-height of specified content.
+ **word-spacing**: specify the space between words.

## Suggested Posts
+ [part 1: (5 cool CSS cool properties)](https://dev.to/ayabouchiha/5-cool-css-properties-part-1-nkg/)
+ [part 2: (5 cool CSS cool properties)](https://dev.to/ayabouchiha/part-2-5-cool-css-properties-bdl)
+ [57 Essential HTML Tags To Know As A Beginner](https://dev.to/ayabouchiha/57-essential-html-tags-to-know-as-a-beginnert-1f3f)
+ [part-1: 5 HTML Tags That Almost Nobody Knows](https://dev.to/ayabouchiha/5-html-tags-that-almost-nobody-knows-5p5)
+ [Part-2: 5 HTML Tags That Almost Nobody Knows](https://dev.to/ayabouchiha/part-2-5-html-tags-that-almost-nobody-knows-nj8)

Have a great day!