Skip to content

Instantly share code, notes, and snippets.

View rjmacarthy's full-sized avatar
🎮
The Tetris effect

richy rjmacarthy

🎮
The Tetris effect
View GitHub Profile
@rjmacarthy
rjmacarthy / rename_js_files.sh
Created September 4, 2019 10:56 — forked from afternoon/rename_js_files.sh
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;
@rjmacarthy
rjmacarthy / read-tree.txt
Created February 22, 2019 09:42
git read-tree
git checkout master
git checkout -b new-branch
git read-tree -u -m target-branch
@rjmacarthy
rjmacarthy / l2tp Debian Stretch.sh
Last active November 21, 2018 10:06
Ubuntu Setup.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
#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
wget -qO- http://ipv4.icanhazip.com; echo
@rjmacarthy
rjmacarthy / Fix for nodemon watching too many files.
Last active December 5, 2018 11:43
Error: ENOSPC: no space left on device, watch
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
** start **
mongod --fork --dbpath /home/mongodata/mongodb --smallfiles --logpath /var/log/mongodb.log --logappend --auth
** stop **
sudo killall -15 mongod
sudo su -s /bin/bash jenkins
@rjmacarthy
rjmacarthy / linux-hdd-space.sh
Created July 16, 2018 08:55
Check hdd space liunx
sudo du -xh / | grep -P "G\t"
df -Bg
@rjmacarthy
rjmacarthy / mong-start.sho
Last active July 16, 2018 08:55
start mongodb
mongod --fork --dbpath /home/mongodata/mongodb --smallfiles --logpath /var/log/mongodb.log --logappend