Skip to content

Instantly share code, notes, and snippets.

Avatar
🕹️
The Tetris effect

Richard Macarthy rjmacarthy

🕹️
The Tetris effect
View GitHub Profile
@rjmacarthy
rjmacarthy / deploy-keys.md
Created May 5, 2020 — forked from holmberd/deploy-keys.md
Setup GitHub repository SSH deploy keys
View deploy-keys.md

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 your@email.here
  • Rename the key that doesn't end with .pub to repo-name.deploy.pem
@rjmacarthy
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
rjmacarthy / rename_js_files.sh
Created Sep 4, 2019 — forked from afternoon/rename_js_files.sh
Rename .js files to .ts
View rename_js_files.sh
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 Stretch.sh
#!/bin/bash
# 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
#Connect
#/bin/bash
sudo ipsec up vpnname
echo "c vpnname" >/var/run/xl2tpd/l2tp-control
sleep 8
route add <x.x.x.x remote> gw 192.168.0.1
route add default dev ppp0
#Disconnect
View get-ip-for-tunnel
wget -qO- http://ipv4.icanhazip.com; echo
@rjmacarthy
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
You can’t perform that action at this time.