teleren/devto huggingface dataset:
My GIT cookbook  
Tags: git, commandline, wip, cookbook
Published: 2020-08-13 13:52:52

# A collection of commands I often use

This is a work in progress collection of common and less common GIT command I found useful in my day to day job.

### Logging

```
# compact log and graph
git log --oneline --graph

# log actual changes in a file
git log -p <filename>

# log changes not yet merged to the parent branch
git log --no-merges <parent-branch>..
```

### Branches management
```
# if you want to rename a branch
git branch -m <oldname> <newname>
# if you want to rename the current branch
git branch -m <newname>
# push and delete the old branch
git push <remote> --delete <old_name>
# or
git push <remote> :<oldname>
# push the new branch and reset the upstream branch
git push <remote> -u <newname>

# Check available local and remote branches
git branch -v -r

# Change the URL of a remote
git remote --set-url <remote URL>

# Remove old remote tracking branches
git remote prune origin
```

### Committing changes

#### Multi-Line message with commit

To write a multi-line commit without opening the editor, use the -m option using single or double quotes, without closing them. Once you finish typing, close the quotes and you will have your nice message.

```
git commit -m 'Feature: Add ignore files to rubocop
quote>
quote>
* Added routes.rb to rubocop ignore file'
[branchname 387aa73] Feature: Add ignore files to rubocop
1 file changed, 1 insertion(+)
```

#### Commit message using the editor and a template

If you want to use an editor for the commit and prefer to have a template that will be consistent all across your commits you can drop a `.gitmessage` file in your home folder with something similar in it:
```
Refactoring/Bugfix/Feature: Title
* Description
```
An then tell GIT that you want to use that file, passing its absolute path, otherwise it will be interpreted as relative:
```
git config commit.template /absolute/path/to/.gitmessage
```

#### miscellaneous
```
# fix the last made commit
git commit --amend
# edit the previous n commits
git rebase -i HEAD~n
# undo the last n commits
git reset HEAD~n
```

### General

#### List Files with conflicts when merging
```
git diff --name-only --diff-filter=U
```

#### Stop tracking files added to .gitignore

Sometimes happens that after adding a file or a folder to `.gitignore` you're still seeing it in a `git status`.
What you have to do is removing the files or the folder from the cache using:
```
git rm --cached <filename>
# or
git rm --cached -r /path/to/folder/**/*
```

This list will probably increase as soon as I will learn something new, so...

Stay Tuned!
EuroPython 2020: Live Stream Recordings available
Tags: europython, videos
Published: 2020-08-13 13:47:40

We’re happy to announce the public availability of the live stream recordings from EuroPython 2020. They were already available to all conference attendees since the sprint days.

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

🔗 http://europython.tv

We have collected the videos in a [EuroPython 2020 Live Stream playlist](https://www.youtube.com/playlist?list=PL8uoeex94UhG33fVP7GZEo06gOHlhb0hk).

# Unedited Videos
What we are releasing today are unedited videos recorded for the main track rooms and days. The poster track recordings will be added today or tomorrow.

You can use the schedule to navigate the videos. Linking to a specific time in the videos can be done by right-clicking in the video to create a URL which points to the current position:

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

Feel free to share interesting links on social media.

# Edited Videos
Our video editing company is already busy creating the cut videos. Those should be ready in a month or two.

Enjoy,
–
[EuroPython 2020 Team](https://ep2020.europython.eu/europython/team/)
https://ep2020.europython.eu/
https://www.europython-society.org/ 

###### Original Post: https://blog.europython.eu/post/626322517228961792/europython-2020-live-stream-recordings-available
What's your favourite WYSIWYG editor?
Tags: webdev, discuss, productivity, ui
Published: 2020-08-13 13:47:00

---
title: What's your favourite WYSIWYG editor?
published: true
description: 
tags: webdev, discuss, productivity, ui
cover_image: https://raw.githubusercontent.com/froala/wysiwyg-editor/master/editor.jpg
---
WYSIWYG or What-You-See-Is-What-You-Get is a tool that allows content to be edited in a form that resembles its appearance when displayed.

So far I've tried just [Quill](https://quilljs.com/) and [Summernote](https://summernote.org/).
Both are free, open-source and awesome products overall.

While I was searching, I came across other WYSIWYG tools like [TinyMCE](https://www.tiny.cloud/) and [CKEditor](https://ckeditor.com/). They are advanced, feature-rich, more enterprise-level solutions with paid plans.

What's your favourite WYSIWYG editor?
My VS Code setup for 2020
Tags: code, tools, vscode
Published: 2020-08-15 19:56:09

---
title: My VS Code setup for 2020
published: true
date: 2020-08-13 13:47:00 UTC
tags: code, tools, vscode
canonical_url: https://web-crunch.com/posts/my-vs-code-setup-for-2020
---

{% youtube BYbSeVUeX20 %}

I'm often asked about my VS Code setup so today I'm sharing a quick walk-through of my VS code setup for 2020.

A lot of developers depend on their code editor like an appendage. I'll try any editor so long that it provides speed, efficiency, and less annoying workflows. Out of the box, I think VS code is a very annoying editor but after some time configuring to my liking, it finally has become a valuable tool in my arsenal.

I came from the Sublime Text like many. What I liked about that code editor was its super speedy experience. You needed to do very little to get up and running. All that is to say that Sublime Text does take some configuration to get "just right" much like VS code. Configuration was typically all set via JSON which for most developers is no big deal but some prefer a GUI.

The introduction of VS code initially didn't appeal to me. The thought of switching code editors sounded daunting as you have to learn new key commands, patterns, and flows. Fortunately, VS code is very easy to migrate to from Sublime Text if you're a key command power user. The settings from Sublime Text can be mapped the same to VS Code. One thing I miss from Sublime Text is being able to open a new tab of an individual file and separate it from the workspace. VS code only allows you to add or remove additional panes within the same window which is a bummer.

I specifically turn off as much of the suggestions and overlay hints as I can inside VS code. I have no idea why this appeals to some developers as it's usually in my way.

### Extensions

I'm a big proponent of "less is more" with my setup. Because of that, you'll see very few extensions. The ones I use typically include snippets or syntax highlighting that VS code doesn't already have.

### Themes

I've had [Night Owl](https://github.com/sdras/night-owl-vscode-theme) installed for some time. It's a great theme in a few flavors. I prefer the dark theme without italics. I also use [Fira Code](https://github.com/tonsky/FiraCode) as my font at about 16px in size. Fira Code includes all the fancy ligatures which make coding more fun.

I go into more specifics in the video but hopefully, you enjoyed this walk-through. If you have more you'd like to know about my setup, computer, apps I use, etc... let me know!
Why you need to read reviews?
Tags: education
Published: 2020-08-13 13:45:46

Mobiles have changed our lives totally. Now students can find websites such as <a href="https://topessaycompanies.com/best-essay-services/writemypaper4me-org/">writemypaper4me</a> using their mobile and read some reviews about such websites for understaing where they can buy it for cheap and for fast!They are accessible all around and everybody has a mobile phone regardless of what age assemble they have a place from. They have without a doubt made things simpler yet it would not be right to state that now and again they have recently expanded the workload. There isn’t one snapshot of security which can be disappointing now and again. The messaging rage nowadays is additionally a gift of the PDA which permits everybody to keep in contact all the time without really chatting on the telephone.

It is less expensive and keeps kids and senior citizens from investing energy perpetually on the telephone however it is likewise extremely irritating as it removes a man from the general population he/she is with to individuals who are miles away. This regularly bothers the general population who are available in the organization of that individual. Yet, it is <a href="https://works.bepress.com/rita-benefield/1/">obvious</a> that without the unlimited offices gave by a mobile phone a man would not have possessed the capacity to lead such a simple and composed life. On the off chance that it has made life feverish it has additionally helped in accomplishing a ton.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fvc3ublmkowcmzullz5v.jpg)
Because of the messaging rage, the systems have given different bundles which enable one to be in contact with the whole world. To build the likelihood of individuals really benefiting these bundles forward messages have been made which comprise of quotes, jokes, savvy words, adorable messages and so forth. A portion of the extremely basic ones is the <a href="https://en.wikipedia.org/wiki/Hello">hello</a> and  Whatsapp good night messages. These are sent by individuals to every one of their contacts or altered records. These can be of various natures relating to what sort of connection you share with the individual. Normally these are sent to individuals who are near the sender or offer an important association with him/her.
system.
Daily Challenge #280 - Driving School
Tags: challenge
Published: 2020-08-13 13:42:42

---
title: Daily Challenge #280 - Driving School
published: true
series: Daily Challenge
description: Write a function that will charge driving students based on the amount of time they spent in their lessons.
tags: challenge
//cover_image: https://direct_url_to_image.jpg
---
Write a function that will charge driving students based on the amount of time they spent in their lessons. This particular school charges for lessons as follows:
```
Time	                        Cost
************************************
Up to 1st hour	                 $30
Every subsequent half hour**	 $10
** Subsequent charges are calculated by rounding up to nearest half hour.
```
For example, if student X has a lesson for 1hr 20 minutes, he will be charged $40 (30+10) for 1 hr 30 mins and if he has a lesson for 10 minutes, he will be charged $30 for the full hour.

Out of the kindness of its heart, the driving school also provides a 5 minutes grace period. So, if student X were to have a lesson for 65 minutes, he will only have to pay for an hour. Lessons under 5 minutes are just talks, so they should be considered free.

For a given lesson time in minutes (min), write a function price to calculate how much the lesson costs.

###Tests
`cost(84)`
`cost(102)`
`cost(273)`

Good luck!

***
_This [challenge](https://www.codewars.com/kata/589b1c15081bcbfe6700017a) comes from kkavita92 on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Serverless Framework Introduction: Let's create a Telegram bot in Ruby with Lambda and API Gateway
Tags: ruby, aws, lambda, telegram
Published: 2020-08-13 13:35:58

---
title: Serverless Framework Introduction: Let's create a Telegram bot in Ruby with Lambda and API Gateway
published: true
description: Serverless Framework Introduction
tags: ruby, aws, lambda, telegram
cover_image: https://assets.mkdev.me/posts/covers/000/000/012/original/mkdev_article.png
---
In this video, Kirill Shirinkin will show how to create a new Telegram bot that translates any text to the German language, by leveraging Amazon Translate API, AWS Lambda, API Gateway and plenty of other services - all automated with the help of the Serverless Framework.

This serves as a nice introduction to the Serverless Framework, because you will see how to use it on a real none-trivial application, that binds many AWS services together:

{% youtube _aLMx7OFt5M %}

Full source code [can be found here](https://github.com/mkdev-me/germanizer)!

***

*You can always hire [our mentors](https://mkdev.me/en/specializations) and learn directly from them!*
How I built Lyrics Monster in under an hour
Tags: codenewbie, beginners, tutorial
Published: 2020-08-13 13:25:24

 got a lot of response as soon as I launched [Lyrics Monster](https://thelyricsmonster.weebly.com/) . For those who don’t know about it, it’s a search engine to find a song from only a few words from the lyrics. I made it to solve my own problem. I knew a line from the song but I couldn’t recall the name of the song. I was using this since a year for myself and I just had to add a little design to roll it out. You can check it out on [ProductHunt](https://www.producthunt.com/posts/lyrics-monster) and please do give an upvote (it really helps).

So the tools I used to make this web app are:

- Programmable Search Engine
- Weebly

That’s pretty much it! To build one such app on your own, you need just these two apps and both of them are completely free.

The first step is to create a new search engine. On the PSE site, click on the get started button. 
Click on the “Add” button and then it will show a form. This one is simple. Assign it a name and then add a few lyrics database like Genius to it. But remember, to ensure that you have the maximum efficiency, add an “*” and a “.” before the domain. For example, instead of adding genius.com, add *.genius.com. Add around 5-10 of them and you’re good to go. You can edit the look and feel. Once you’re done with all this, you can click on the setup tab and click on the get code button. Copy that code, we’ll need that later.

Now as most of you would already be familiar with, Weebly is an amazing website builder to build basic sites. If you don’t, head out to the website and sign up. It's easy to use and so I’m not getting into the details.
After signing up, they’ll take you through the process of choosing a template. Choose a simple template as you won’t be using any of the elements. Once you reach the editor, delete all the elements and then add a Title block in the middle of the page. This will have the name of your app. Now quickly add a custom code block and set the alignment to centre. Now click on ‘edit HTML’ and paste the code you copied from PSE. There you go! Here’s your app! You can customise the website as you wish and click on the publish button. Choose a domain and done! This is a cool project to show off on your portfolio and yet takes very little efforts to make.
Manage multiple environments in node.js using node config
Tags: javascript, npm, devops
Published: 2020-08-13 13:23:43

This post is first published at [Poopcode] (https://poopcode.com/manage-multiple-environments-in-node-js-using-node-config/). 

In this tutorial let’s see how to manage multiple environments in node.js using node config. In backend projects, it’s critical to manage multiple environments when you application reaches production level.

Node Config is a sweet little npm package that lets you define a set of default parameters, and extend them for different deployment environments (development, qa, staging, production, etc.).

Configurations are stored in configuration files (JSON or YAML) within your application, and can be overridden and extended by environment variables, command line parameters, or external sources.

# Install NPM packages
We need two npm packages to make this work, Config and Cross Env. cross-env makes it easy to run single command without worrying about setting or using the environment variable properly for the platform.

Let’s add these packages to the package.json file.

```
 "dependencies": {
   ....
    "config": "^3.3.1"
  },
  "devDependencies": {
  ...
     "cross-env": "^7.0.2"
  }
```

# Create configuration files
Now let’s create the configuration files. Inside the root directory of your project create a directory called config and create different json files for each environment.

Each of this file would contain the configuration related to each environment.

For example, development.json would have the following configuration.

```

{
    "app": {
        "port": 3352,
        "ip":"0.0.0.0",
        "https_port":9004
    },
    "db": "mongodb://devapp:pAsS2fsd@mongodb:27017/db"
}
```

# Get values from Config
In the application startup code, in app.js or index.js usually, we need to get this configuration from the config package. The config package looks for config directory inside your project directory and read the configuration from JSON or YAML files.

```
const config = require("config");
​
const ip = config.get('app.ip');
const port = config.get('app.port');

```

# Configure startup scripts
The final step is to configure startup scripts in package.json. For each environment (in other words for each configuration file in config directory), we can create a startup script.
```
  "scripts": {
    "start:dev": "cross-env NODE_ENV=development node app.js",
    "start:qa": "cross-env NODE_ENV=qa node app.js",
    "start:prod": "cross-env NODE_ENV=production  node app.js",
    "start:demo": "cross-env NODE_ENV=demo node app.js"
  }

```
That’s it. You can now start your application in different environments using npm start:<env> command inside your environment. In development server, you can start the application using npm start:dev script.
Deploy your Publish website for free on GitHub Pages
Tags: swift, publish, github, tutorial
Published: 2020-08-13 14:07:39

---
title: Deploy your Publish website for free on GitHub Pages
published: true
date: 2020-08-13 13:10:00 UTC
tags: swift, publish, github, tutorial
canonical_url: https://paraside.in/design+code/publish-on-github-pages
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/7vd31kl0l7shnk8ow9zt.png
series: Publish + Tailwind CSS
---

# 🐙 Create a new GitHub repository

First things first, let's create a repository to host your website content.

We'll call it `mywebsite` , which means it will be accessible at `https://yourusername.github.io/mywebsite`.

Instead of `mywebsite`, if you use `[yourusername.github.io](http://yourusername.github.io)` it will be accessible at `https://yourusername.github.io`. See [https://pages.github.com](https://pages.github.com) for more infos about that.

 ![/images/4/Screenshot<em>2020-08-11</em>at_15.21.16.png](https://paraside.in/images/4/Screenshot_2020-08-11_at_15.21.16.png)
# 🎞 Setup the Publish pipeline

Open your `main.swift` file and add `deployedUsing: .gitHub("yourusername/mywebsite")` to your publish pipeline, which should look something like this:

```

try MyWebsite().publish(
     withTheme: .casperish,
     deployedUsing: .gitHub("sowenjub/mywebsite"),
     additionalSteps: [
         .installPlugin(.readingTime()),
         .installPlugin(.pygments()),
     ],
     plugins: [.pygments()]
 )

```

Now run your site in Xcode (Product > Run command or ⌘+R), then open your terminal and run

```

publish deploy

```

Head over to your repository, refresh and make sure your files are there.

# 🥁 Setup GitHub Pages

Open your repository settings, scroll down to the GitHub Pages section and select the master branch. Don't forget to click the Save button.

 ![/images/4/Screenshot<em>2020-08-11</em>at_15.28.14.png](https://paraside.in/images/4/Screenshot_2020-08-11_at_15.28.14.png)

Once you're done, it should give your the address to your website.

 ![/images/4/Screenshot<em>2020-08-11</em>at_15.29.07.png](https://paraside.in/images/4/Screenshot_2020-08-11_at_15.29.07.png)

And you're done! Unless you want to use a custom domain name, which can be set in the same settings panel.

# 🍒 Bonus: Deploying from Xcode

Instead of deploy using the command line with `publish deploy`, you can deploy straight from Xcode.

First, create a New Scheme, we'll call it `Deploy MyWebsite`. Click on it to reopen the same menu and select "Edit Scheme…".

 ![/images/4/Screenshot<em>2020-08-11</em>at_22.21.08.png](https://paraside.in/images/4/Screenshot_2020-08-11_at_22.21.08.png)

Select Run and in the Arguments Passed On Lauch, add `--deploy` without space.

 ![/images/4/Screenshot<em>2020-08-11</em>at_22.24.05.png](https://paraside.in/images/4/Screenshot_2020-08-11_at_22.24.05.png)

Now anytime your Run your website with the scheme (Product > Run command or ⌘+R), it will deploy your site to GitHub.
Know All The Top Startup Investors From India

Tags: startup, funding, investors
Published: 2020-08-13 13:07:26

There are active <a href="https://www.startuppaisa.com/about-us">top startup investors</a> in India, that have become the underlying reason for the boom in startup growth. As we all know it that no startup firm can imagine rising among its competitors unless it is aided with ample seed funding. Startups are newbie businesses that are new to the market. But to establish themselves they need to get their financial backup strong. And it is only possible if they get better funding and support from the best investors. In India, startups have to really struggle a lot during their infant stage of business. Finding an investor is not that easier as one may think of. It is really not possible to think about startup instant success. Most of the startups fail due to a lack of funding and other reasons. However, there are some best examples of startups like Microsoft founded by Bill Gates, MacDonalds by Ray Kroc, and Ford Motors by Henry Ford. 
 
The most challenging task for a startup is to gather a substantial amount of funds in developing and promoting the product. Also, they need to be unique in terms of a new concept with a big approach. But without getting proper funding, a startup tends to fail and all their hopes and dreams to make big gets shattered. However, with the emergence of Startup Paisa, there can be no issues regarding <a href="https://www.startuppaisa.com/startup">funding your startup</a>. If you own a startup company, then we suggest you register on this platform and get the best investors to end your funding woes. Some of the top startup investors in India are Abhishek Rungta, CEO of Indus Net Technologies, Ajeet Khurana, CEO of Zebpay, and advisor at Kalaari Capital, Ankur Varikoo, CEO and founder of nearbuy.com. You can search for more names.
The Meteoric Rise of Jamstack
Tags: jamstack, javascript, webdev
Published: 2020-08-13 13:03:44

Stacking technologies isn’t new. Still, in the world of software development, stacking has become a necessity to shorten times and standardize development because when you mix the right set of technologies, you get the best outcome possible.  For web developers, that usually means faster websites with better user experiences.

Here’s where the Jamstack approach can help developers. Jamstack represents a new way of developing software based on build-time and client-side rendering, that doesn’t depend on web servers for outputting websites and apps.

Interested? [Keep reading over at the Agility CMS blog](https://agilitycms.com/resources/posts/the-meteoric-rise-of-jamstack)