Skip to content

Instantly share code, notes, and snippets.

@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active November 13, 2024 03:35
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@mort3za
mort3za / git-auto-sign-commits.sh
Last active May 28, 2024 20:51
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
@t2y
t2y / async_for_example_pep492_kai1.py
Created January 22, 2017 00:03
async for and async iterable example
# -*- coding: utf-8 -*-
"""
pep492 aiter using queue before pep 525
https://www.python.org/dev/peps/pep-0492
https://www.python.org/dev/peps/pep-0525
"""
import asyncio
@butlerx
butlerx / aliases.zsh
Last active September 30, 2024 20:13
# -------------------------------------------------------------------
# use nocorrect alias to prevent auto correct from "fixing" these
# -------------------------------------------------------------------
alias foobar='nocorrect foobar'
alias g8='nocorrect g8'
# -------------------------------------------------------------------
# Ruby stuff
# -------------------------------------------------------------------
alias ri='ri -Tf ansi' # Search Ruby documentation
@alonisser
alonisser / iptables-persistent no input
Last active October 10, 2024 07:21
Installing iptables-persistent on ubuntu without manual input
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections
sudo apt-get -y install iptables-persistent
@staltz
staltz / introrx.md
Last active November 14, 2024 11:27
The introduction to Reactive Programming you've been missing
@wandernauta
wandernauta / sp
Last active November 9, 2024 17:03
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active November 4, 2024 16:00
A better markdown cheatsheet.