Skip to content

Instantly share code, notes, and snippets.

@emmanuelnk
emmanuelnk / GitHub-Forking.md
Created November 9, 2017 03:25 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

Useful Git commands

This is just stuff that I have put down that I find I use a lot of the time for my own reference.

Latest changes from repo to your machine

$ git pull
@emmanuelnk
emmanuelnk / parse_dotenv.bash
Last active January 6, 2020 07:09 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@emmanuelnk
emmanuelnk / npm-commands.md
Created February 14, 2020 03:33 — forked from ankurk91/npm-commands.md
Useful npm commands and tricks

npm v3.10 - ◾

If you are learning npm then i would suggest to go for yarn, dont waste your time in learning npm

⚠️ This gist is outdated, but most of the commands are still relevant.

Update npm itself

npm install -g npm
# Downgrade to a specific version
@emmanuelnk
emmanuelnk / composing-software.md
Created April 8, 2020 09:11 — forked from Geoff-Ford/composing-software.md
Eric Elliott's Composing Software Series

Eric Elliott's "Composing Software" Series

A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.

Edit: I see that each post in the series now has index, previous and next links. However, they don't follow a linear flow through all the articles with some pointing back to previous posts effectively locking you in a loop.

@emmanuelnk
emmanuelnk / master-javascript-interview.md
Created April 8, 2020 09:11 — forked from Geoff-Ford/master-javascript-interview.md
Eric Elliott's Master the JavaScript Interview Series
@emmanuelnk
emmanuelnk / README.md
Created April 17, 2020 07:36 — forked from boneskull/README.md
example of how to debug mocha v4 if hanging

Here's an example of how to debug Mocha v4 if it hangs.

Ensure you're using a Node.js 8 or newer (or any version with async_hooks support).

If you run your test, you'll notice it hangs:

$ mocha test.js
@emmanuelnk
emmanuelnk / docker-compose.yml
Created October 22, 2020 14:29 — forked from devzer01/docker-compose.yml
docker-compose mongodb
version: '3'
services:
database:
image: 'mongo'
container_name: 'my-mongo-container' # give your contatner a name
environment:
- MONGO_INITDB_DATABASE=your-database-name # database name you want to make
- MONGO_INITDB_ROOT_USERNAME=my-container-root-username # set your container root username
- MONGO_INITDB_ROOT_PASSWORD=secret # set your contatner root password
volumes:
@emmanuelnk
emmanuelnk / cronlist.sh
Created March 31, 2021 11:52 — forked from Zitrax/cronlist.sh
Script to list all cron events on a system - found on stackoverflow.com: http://bit.ly/nkFwD9 Modified from original to pick up users also in /home.
#!/bin/bash
# System-wide crontab file and cron job directory. Change these for your system.
CRONTAB='/etc/crontab'
CRONDIR='/etc/cron.d'
# Single tab character. Annoyingly necessary.
tab=$(echo -en "\t")
# Given a stream of crontab lines, exclude non-cron job lines, replace