Skip to content

Instantly share code, notes, and snippets.

View jessedp's full-sized avatar

jesse jessedp

View GitHub Profile
@jessedp
jessedp / dynamic_ssh.sh
Last active August 30, 2019 13:20
allow dynamically generating ssh host config based on network location
#!/bin/bash
# Put these 2 functions in your .bashrc or similar. Then add:
# Include ~/.ssh/roaming
# to your ~/.ssh/config
# After you source ~/.bashrc or open a new shell, wherever you are you can always use the same
# hostname. As is, you could do "ssh homesrv" from anywhere
# Get your router's MAC address - run this to fill in HOME_MAC in ssh() below
find_rtr_mac() {
@jessedp
jessedp / create_slim_app.sh
Last active November 21, 2017 17:36
Bash script to help get a Slim Framework clean or skeleton app installed.
#!/bin/bash
# Some sanity checks...
if [ "$#" == 0 ] || [ "$#" -gt 1 ] || [ -d $1 ]; then
echo "Please supply a unique project (directory) name!"
exit -1
fi
if [ ! $(which php) ]; then
echo "php cli binary must be installed!"
exit -1

Keybase proof

I hereby claim:

  • I am jessedp on github.
  • I am jessedp (https://keybase.io/jessedp) on keybase.
  • I have a public key ASAsAqnD3H2hai8qbU5VVxjmExGIqzcNLrQ8avr6yOmbswo

To claim this, I am signing this object:

@jessedp
jessedp / l2tp_ipsec_vpn_generic.sh
Created September 21, 2016 21:08
Script for automating up/down of l2tp-ipsec vpn, aimed at Ubuntu 14+ since easy/gui setup was removed from network-manager
#!/bin/bash
#
# Script for automating up/down of l2tp-ipsec vpn, aimed at Ubuntu 14+ since easy/gui setup
# was removed from network-manager.
# Firsti, follow Jason Ernst's wonderful config guide guide here, but ignore the manual
# route changes at the end:
# http://www.jasonernst.com/2016/06/21/l2tp-ipsec-vpn-on-ubuntu-16-04/
#
# Then, this is slightly modified version of the script here: