Skip to content

Instantly share code, notes, and snippets.

View cristihainic's full-sized avatar
💭
I may be slow to respond.

Cristian Hainic cristihainic

💭
I may be slow to respond.
View GitHub Profile
@dotspencer
dotspencer / multiple-keys-gitlab.md
Last active March 7, 2024 15:01
Multiple Gitlab accounts with multiple ssh keys

Gitlab won't allow reuse of a public ssh key for multiple accounts. To get around this you need to create a second ssh key for the second account.

Create or modify your ~/.ssh/config file:

# normal                                                                                                                                                                  
Host gitlab.com-work_username
     HostName gitlab.com
     PreferredAuthentications publickey
 IdentityFile ~/.ssh/id_rsa
@candale
candale / install_zsh_and_co.sh
Last active November 26, 2022 22:03
Install zsh and oh-my-zsh for yourself or other user
# to get in a terminal: curl -X GET http://is.gd/installzsh_sh > installzsh.sh
TARGET_USER=$1
echo "Installing zsh..."
sudo apt-get install git curl zsh -y > /dev/null;
echo "Installing oh-my-zsh"
if [ "$TARGET_USER" != "" ]; then
echo "Installing oh-my-zsh for user $TARGET_USER";
export RUNZSH=no
@a-c-t-i-n-i-u-m
a-c-t-i-n-i-u-m / freenom.com.ddns.sh
Created July 7, 2015 12:07
Dynamic DNS support shell script for freenom.com
#!/bin/bash
# settings
# Login information of freenom.com
freenom_email="main@address"
freenom_passwd="pswd"
# Open DNS management page in your browser.
# URL vs settings:
# https://my.freenom.com/clientarea.php?managedns={freenom_domain_name}&domainid={freenom_domain_id}
freenom_domain_name="domain.name"

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git