Skip to content

Instantly share code, notes, and snippets.

View adrianwebb's full-sized avatar

Adrian Webb adrianwebb

  • Washington, DC
View GitHub Profile

Keybase proof

I hereby claim:

  • I am adrianwebb on github.
  • I am adrianwebb (https://keybase.io/adrianwebb) on keybase.
  • I have a public key whose fingerprint is 4AE6 5647 66E4 F38D CB34 BD52 8B26 3D21 20BD 5AFB

To claim this, I am signing this object:

@adrianwebb
adrianwebb / electricsheep-installer.sh
Created December 4, 2017 01:07
electricsheep-installer.sh
#!/bin/bash
# Must be run as root
# Install ElectricSheep dependencies
apt-get install subversion autoconf libtool libgtk2.0-dev libgl1-mesa-dev libavcodec-dev libavformat-dev libswscale-dev liblua5.1-0-dev libcurl4-openssl-dev libxml2-dev libjpeg8-dev libgtop2-dev libboost-dev libboost-filesystem-dev libboost-thread-dev libtinyxml-dev freeglut3-dev glee-dev
# Install WxWidgets
apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
apt-add-repository 'deb http://repos.codelite.org/wx3.0.2/ubuntu/ trusty universe'
@adrianwebb
adrianwebb / check_repos
Created May 17, 2015 18:13
Check all Git repositories on and under current directory for uncommitted changes.
#!/bin/bash
curr_dir=`pwd`
for dir in $(find $curr_dir -type d)
do
if [ -d "${dir}/.git" ]
then
echo "Checking Git repo: ${dir}"
cd $dir
@adrianwebb
adrianwebb / oscad_raspberry_pi_connector_rear
Created May 10, 2015 18:45
OpenSCAD 3D printed part for connecting stacked Raspberry Pi systems (rear)
//
// Global properties (mm)
//
part_height = 3;
ring_outer_diameter = 13;
ring_inner_diameter = 7;
connector_bridge_length = 89;
@adrianwebb
adrianwebb / oscad_raspberry_pi_connector_side
Last active August 29, 2015 14:20
OpenSCAD 3D printed part for connecting stacked Raspberry Pi systems (side)
//
// Global properties (mm)
//
part_height = 3;
ring_outer_diameter = 13;
ring_inner_diameter = 7;
connector_bridge_length = 38;
@adrianwebb
adrianwebb / switch_vagrant_gems
Last active August 29, 2015 14:20
Symbolic links Vagrant gems with current directory gems repositories for development.
#!/bin/bash
current_dir=`pwd`
gem_dir="$current_dir/gems"
gem_files=()
index=1
echo "Gathering gem repositories from $gem_dir"
for file in "$gem_dir"/*
@adrianwebb
adrianwebb / clean_vagrant_gems
Last active August 29, 2015 14:20
Clean and update Vagrant gems for current user.
#!/bin/bash
vagrant_home_dir="$HOME/.vagrant.d"
/usr/bin/env ruby <<-EORUBY
require 'json'
require 'fileutils'
puts 'Loading current Vagrant plugin data'
plugin_data = JSON.parse(File.read("$vagrant_home_dir/plugins.json"))
@adrianwebb
adrianwebb / rsync_command_template
Last active August 29, 2015 14:14
Remote rsync command template
rsync -avz --exclude "{DIR}" -e "ssh -i {PRIV_KEY} -p {PORT}" {LOCAL_DIR}/ {USER}@{IP}:{REMOTE_DIR}/
@adrianwebb
adrianwebb / news_feeds
Last active August 29, 2015 14:05
News feeds I follow through Feedly
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<text/>
</head>
<body>
<outline isOpen="false" id="1717402843" text="Environment">
<outline title="Weather - Google News" useCustomFetchInterval="true" version="RSS" useNotification="true" maxArticleAge="60" description="Google News" htmlUrl="http://news.google.com/news?pz=1&amp;ned=us&amp;hl=en" xmlUrl="https://news.google.com/news/feeds?pz=1&amp;cf=all&amp;ned=us&amp;hl=en&amp;csid=b41a655d9b7f7fa0&amp;output=rss" fetchInterval="15" loadLinkedWebsite="true" type="rss" id="765362081" archiveMode="keepAllArticles" maxArticleNumber="1000" text="Weather - Google News"/>
</outline>
<outline isOpen="false" id="1965544465" text="Education">
@adrianwebb
adrianwebb / git_initialization_template
Last active August 29, 2015 13:58
Git existing repo initialization
# Source: http://stackoverflow.com/questions/5377960/whats-the-best-practice-to-git-clone-into-an-existing-folder
git init
git remote add origin $repo_url
git fetch origin
git checkout -b $branch --track origin/$branch
git reset origin/$branch