Skip to content

Instantly share code, notes, and snippets.

The Tetris effect

Richard Macarthy rjmacarthy

The Tetris effect
View GitHub Profile
rjmacarthy /
Created May 5, 2020 — forked from holmberd/
Setup GitHub repository SSH deploy keys

Setup GitHub repository SSH deploy keys

  1. Create GitHub repository in github and save the SSH repository url

  2. Init git on server in code directory

  • git init
  1. Create SSH keys on the server
  • ssh-keygen -t rsa -b 4096 -C
  • Rename the key that doesn't end with .pub to repo-name.deploy.pem
rjmacarthy / bundle
Created Oct 3, 2019
fix bundle warning multiple bundler versions
View bundle
gem install bundler -v x.x.x
bundle _x.x.x_ install
rjmacarthy /
Created Sep 4, 2019 — forked from afternoon/
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;
View read-tree.txt
git checkout master
git checkout -b new-branch
git read-tree -u -m target-branch
View l2tp Debian
# Ubuntu & Debian
#apt-get update
#apt-get -y install strongswan xl2tpd
# CentOS & RHEL
#yum -y install epel-release
#yum --enablerepo=epel -y install strongswan xl2tpd
View Connect Disconnect VPN
sudo ipsec up vpnname
echo "c vpnname" >/var/run/xl2tpd/l2tp-control
sleep 8
route add <x.x.x.x remote> gw
route add default dev ppp0
View get-ip-for-tunnel
wget -qO-; echo
rjmacarthy / Fix for nodemon watching too many files.
Last active Dec 5, 2018
Error: ENOSPC: no space left on device, watch
View Fix for nodemon watching too many files.
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
View start and stop mongo
** start **
mongod --fork --dbpath /home/mongodata/mongodb --smallfiles --logpath /var/log/mongodb.log --logappend --auth
** stop **
sudo killall -15 mongod