Skip to content

Instantly share code, notes, and snippets.

View SteveRyherd's full-sized avatar
💭
I may be slow to respond.

Steve Ryherd SteveRyherd

💭
I may be slow to respond.
View GitHub Profile
@SteveRyherd
SteveRyherd / config
Created June 26, 2013 01:15
Terminator config file includes monokai theme and copy/paste shortcuts enabled.
[global_config]
title_transmit_bg_color = "#4c4c4c"
title_inactive_fg_color = "#afafaf"
title_inactive_bg_color = "#2d2d2d"
[keybindings]
copy = <Primary>c
paste = <Primary>v
[profiles]
[[default]]
palette = "#000000:#f92672:#6cc72c:#fe9720:#5f91ef:#9358fe:#36af90:#8c8c8c:#4c4c4c:#ff80f4:#a7e22e:#ffee99:#5fd9ef:#ae82fe:#66efd5:#c7cece"
@SteveRyherd
SteveRyherd / bash_prompt
Last active December 18, 2015 22:18 — forked from insin/bash_prompt.sh
Adds color, git repository, and virtualenv information to command line prompt
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
@SteveRyherd
SteveRyherd / fabfile.py
Last active December 16, 2015 14:29
Generic fabfile for deploying small projects. Commands are setup for an Linux, Apache, Git environment but can easily be changed or extended for other scenarios.
"""
Generic fabfile.py template for deploying to remote servers.
This fabfile is designed to be used as a template when working in environments
where the production server may not have access to the primary 'repository' or
'staging' server. For example, a small develop may lack a dedicated development
or staging server and lack a static-ip or permanent address.
Instead of the production server pulling changes from the remote machine, changes
are pushed to a bare repository on the server and checked out from there.
@SteveRyherd
SteveRyherd / generate-key.sh
Created March 21, 2013 17:57
SSH Login without password
# Quick gist of how to generate and place authorized keys
ssh-keygen -t rsa
ssh [user]@[remote] mkdir -p ~/.ssh
cat ~/.ssh/id_rsa.pub | ssh [user]@[remote] 'cat >> ~/.ssh/authorized_keys'
ssh [user]@[remote] hostname
@SteveRyherd
SteveRyherd / Espresso Soda.tmTheme.xml
Created February 27, 2013 01:39
Sublime Text 2 - Espresso Soda Theme -- Modified slightly to work with the BracketHighlighter plugin
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Espresso Soda</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@SteveRyherd
SteveRyherd / Monokai Soda.tmTheme.xml
Created February 27, 2013 01:38
Sublime Text 2 - Monokai Soda Theme -- Modified slightly to work with the BracketHighlighter plugin
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Monokai Soda</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@SteveRyherd
SteveRyherd / wdtvsync.sh
Created February 27, 2013 01:35
Bash script for synchronizing data from a directory to a WDTV or other external drive. -- NOTE: This script is asynchronous unlike the imgur drop script.
#!/bin/bash
NET_DIR="//stevestv.local/portable"
TARGET_DIR="/media/wdtv"
SOURCE_DIR="/srv/wdtv/" #Include the trailing slash
# Exit upon errors
set -e
# Check if directory exists
@SteveRyherd
SteveRyherd / relpath.sh
Created February 27, 2013 01:33
Shell function to get the relative path of a file. (Creatively cheats by using Python).
function relpath(){ python -c "import os.path; print os.path.relpath('$1','${2:-$PWD}')" ; }
@SteveRyherd
SteveRyherd / imgurdrop.sh
Last active December 14, 2015 06:39
Watches a directory for changes, when a new file is created or moved to the directory it is uploaded to imgur.com
#!/bin/bash
#
# imgurdrop
#
# Watches a folder (/tmp/imgur) for new files and uploads any new files
# in folder to imgur. The imgur URL will then appear in your clipboard.
#
# Intended to be used as a daemon, via dtach, screen, or simply "imgurdrop &"
#
# Originally inspired by:
@SteveRyherd
SteveRyherd / fstab
Created February 27, 2013 01:25
Sample /etc/fstab file for mounting a second volume with a single partition and multiple entry points. That way you don't have to worry about statically allocated partition sizes.
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
#Entry for /dev/sda2 :
UUID=9985b8e0-c4d9-45b0-8ae5-5c2edf16186b / ext4 errors=remount-ro 0 1
#Entry for /dev/sda5 :
UUID=70205578-8c03-42c9-9d7c-18c5755550ca none swap sw 0 0