Skip to content

Instantly share code, notes, and snippets.

View bencat-sixense's full-sized avatar

Benoit CATILLON bencat-sixense

View GitHub Profile
@belgattitude
belgattitude / ci-yarn-install.md
Last active November 5, 2024 08:32
Composite github action to improve CI time with yarn 3+ / node-modules linker.
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active January 4, 2025 12:16
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@b17z
b17z / keeping_repos_in_sync.md
Created January 16, 2019 14:17
Keeping Downstream Repository In Sync with Upstream Repository

When contributing to a specific repository, you will clone it. That's your little playground now to experiment. But your changes and your repo itself will not be synced up to the main repository you forked from. Here's how to keep it up to date while experimenting with your changes.

  1. Create a remote in your forked/cloned repository pointing to the main repository
git remote add upstream [URL of main repository you forked from]
  1. Fetch the upstream changes
# Bash best practices and style-guide
Just simple methods to keep the code clean.
Inspired by [progrium/bashstyle](https://github.com/progrium/bashstyle) and [Kfir Lavi post](http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/).
## Quick big rules
* All code goes in a function
* Always double quote variables
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@angelo-v
angelo-v / renameTab.js
Last active October 28, 2024 20:35
Rename Tab Bookmarklet
javascript:(function(){var title=prompt("New title?");document.title=title})();