- Change post-update.sample to post-update
- Have the below command inside post-update
GIT_WORK_TREE=/home/path/to/working/dir/mytest git checkout -f
git rev-parse --short <branchname>
#!/bin/bash | |
- # Stack overflow of course helped, parentheses create a "sub-shell" that returns | |
- # to the original directory it was run in. | |
(cd src/E*/E* && make development) | |
git add -A | |
git reset -- src/E*/E*/public/bundle.js | |
read -p "Enter message for commit > " message |
apt-get install sudo | |
useradd -s /bin/bash -m -d /home/$USER -c "$USER" $USER | |
passwd $USER | |
##(enter password) | |
usermod -aG sudo $USER | |
sudo apt-get install libcap2-bin | |
sudo setcap cap_net_bind_service=+ep /usr/local/bin/node |
#!/bin/bash | |
# First of course, build your key(s) using `./build-key my-new-client` in the /etc/openvpn/easy-rsa dir | |
# Within the /etc/openvpn/easy-rsa/keys directory | |
# (or wherever you have your built-keys at) | |
# bash createClientOvpn.sh my-template-ovpn my-new-client Think cp command | |
# or ./createClientOvpn.sh my-template-ovpn my-new-client2 | |
cp $1.ovpn $2.ovpn; |
# Put in OpenVpn server.conf | |
# Add: | |
# push "route 0.0.0.0 0.0.0.0" | |
# Once the above route is pushed, it should be identified and you should be able to configure the name and set to private. | |
# The below steps are if you don't have control over the VPN or "unidentified" network. | |
# WILL POST A BETTER OPTION FOR OPENVPN SOON | |
# Until then, you can use the below option for any unidentified network |
GIT_WORK_TREE=/home/path/to/working/dir/mytest git checkout -f
git rev-parse --short <branchname>
# Have a printer hooked up to linux os | |
# Have CUPS installed on it and make sure the printer prints from linux | |
# Have abiword (This is used to convert file to pdf via command line) | |
# sudo apt-get install abiword | |
cat dev.json | ssh user@ip 'cat - > tmp.doc; abiword --to=pdf tmp.doc; lp tmp.pdf; rm tmp.doc' | |
# Havent tested with removing the pdf right after issuing lp, might work. | |
# Also havnt tested converting other files besides .doc to .pdf |
# Source/Reference https://serverfault.com/questions/275669/ssh-sshd-how-do-i-set-max-login-attempts#275672 | |
# Before enabling, be sure you | |
# a) Know you're public ip address | |
# b) Know that your public ip address won't change (fixed ip) | |
# c) Have a backup method to get in just in case (Digital Ocean's "console" for example) | |
# sudp apt-get install ufw | |
# sudo ufw allow to any port 22 from your.ip.address.here proto tcp | |
# sudo ufw enable |
# Try your best to remove root login and if possible, password authentication (after ssh keys work) | |
cat ~/.ssh/id_rsa.pub | ssh username@yourip "cat >> ~/.ssh/authorized_keys" |
# Because I'm not entirely sure if all the previous steps were needed or only the final one, I included other problems | |
# that may cause the node-gyp rebuild to fail during java installation (or bcrypt throwing install errors) | |
# This assumes you are using 7.8 "wheezy" | |
# More information regarding other distros: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions | |
# Use the correct node version for the Raspberry ARM architecture: | |
# https://stackoverflow.com/questions/32563173/installing-node-js-on-raspberry-pi-2 | |
wget http://yourARMarchitecurelink | |
cd /usr/local |