Skip to content

Instantly share code, notes, and snippets.

View gmcclins's full-sized avatar

Geoffrey McClinsey gmcclins

View GitHub Profile
@gryf
gryf / bash_prompt.sh
Last active April 20, 2018 07:59 — forked from bradsokol/bash_prompt.sh
Set color bash prompt according to active virtualenv, Git, Mercurial or Subversion branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the active nodejs virtualenv[1]
# * the branch/status of the current Git, Mercurial or Subversion repository
# * the return value of the previous command
# * one line prompt
@kernel-sanders
kernel-sanders / vpnscript.sh
Last active August 7, 2018 18:16
Shell script to set up a L2TP over IPSec VPN on Debian/Ubuntu (tested on rasbian)
#!/bin/bash
# Kernel Sanders, MAR 2015
# Simple script for easy set up of L2TP over IPsec VPN on Debain based systems (tested on rasbian)
# Steps modified from: https://raymii.org/s/tutorials/IPSEC_L2TP_vpn_with_Ubuntu_14.04.html
# Must be root to run the script
if [ ! $UID = "0" ]; then
echo "You must be root to run this script"
exit 1
fi
@Tantas
Tantas / l2tp_ipsec_setup_arch_linux_raspberry_pi.sh
Last active December 14, 2019 01:38
Guide to install L2TP-IPSEC VPN Server on a Raspberry Pi with ArchLinux
#!/bin/bash
# Guide to install L2TP-IPSEC VPN Server on a Raspberry Pi with ArchLinux
# Used parts of several instructions,
# http://nls.io/setup-an-ipsec-l2tp-vpn-with-text-or-ldap-auth-on-arch-linux/
# https://smileykeith.com/2014/01/27/ipsec-l2tp-vpn-on-a-raspberry-pi-running-arch-linux/
# http://linux.tips/tutorials/how-to-setup-l2tp-vpn-server-on-raspberry-pi
# Tested and works with OSX and iOS 7.1 supplied vpn client
@clops
clops / .bash_prompt
Created August 6, 2014 08:42
Shell prompt based on the Solarized Dark theme with GIT Watchers
# Shell prompt based on the Solarized Dark theme.
# Screenshot: http://i.imgur.com/EkEtphC.png
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM='xterm-256color';
fi;
@miki725
miki725 / .bash_prompt.sh
Last active April 5, 2024 00:04
Custom bash prompt which displays: (virtualenv) user:/path (git-branch)
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch of the current git/mercurial repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
@creativepsyco
creativepsyco / gist:9322214
Last active August 29, 2015 13:56
Host Python Server in Current Directory.
#Python 2
python -m SimpleHTTPServer 8080
#Python 3
python3 -m http.server 8113
@davfre
davfre / git_cheat-sheet.md
Last active May 12, 2024 04:37
git commandline cheat-sheet
@schwuk
schwuk / plexmediaserver
Created August 29, 2013 10:24
UFW Application Profile for Plex Media Server
[plexmediaserver]
title=Plex Media Server
description=The Plex Media Server is smart software that makes playing Movies, TV Shows and other media on your computer simple
ports=32400/tcp|1900/udp|32469/udp|5353/udp
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 26, 2024 17:22
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream