Skip to content

Instantly share code, notes, and snippets.

@codeopensrc
codeopensrc / Windows Network Public To Private.sh
Last active April 5, 2020 22:00
Set your "unidentified" network (OpenVPN or others) from public to private on Windows 8
# 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
@codeopensrc
codeopensrc / createClientOvpn.sh
Last active February 13, 2016 08:18
Quickly create multiple client .ovpn's from a template .ovpn
#!/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;
@codeopensrc
codeopensrc / gist:f430506c93618bf4e4f7
Last active February 2, 2016 20:19
Create Safe User for non-root port 80
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
@codeopensrc
codeopensrc / deployToServer.sh
Last active August 29, 2015 14:21
Deploy Webpack files and DB functions to Github and Heroku (project specific atm)
#!/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