Skip to content

Instantly share code, notes, and snippets.

View stefgosselin's full-sized avatar

Stephane Gosselin stefgosselin

  • Saint-Eugène-De-Guiges
View GitHub Profile
sudo curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
sudo source ~/.profile
sudo nvm install node
node --version
@stefgosselin
stefgosselin / best_bash_history.sh
Created December 8, 2022 22:09 — forked from ckabalan/best_bash_history.sh
The Best Bash History Settings Ever
# /etc/profile.d/best_bash_history.sh
# Save 5,000 lines of history in memory
HISTSIZE=10000
# Save 2,000,000 lines of history to disk (will have to grep ~/.bash_history for full listing)
HISTFILESIZE=2000000
# Append to history instead of overwrite
shopt -s histappend
# Ignore redundant or space commands
HISTCONTROL=ignoreboth
# Ignore more
@stefgosselin
stefgosselin / restart-ssh.bash
Created December 16, 2022 16:05 — forked from influx6/restart-ssh.bash
Restart SSH on Mac Terminal (High Sierra)
# high sierra
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
# latest
sudo vim /etc/services # (update the port config for ssh and save)
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist