Skip to content

Instantly share code, notes, and snippets.

@ihashacks
ihashacks / linode-mirror-switch
Last active August 29, 2015 13:56
switches a Linode guest to use Linode's repository mirrors
#!/bin/bash
################################################################################
# License
################################################################################
#
# Copyright (c) 2014 Brandon Pierce <brandon@ihashacks.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ihashacks
ihashacks / keybase.md
Created April 7, 2014 04:33
keybase.md

Keybase proof

I hereby claim:

  • I am ihashacks on github.
  • I am ihashacks (https://keybase.io/ihashacks) on keybase.
  • I have a public key whose fingerprint is 93A3 E6A0 E191 A709 5077 5406 36D6 E99F DA81 99E8

To claim this, I am signing this object:

# docker image for running CC test suite
FROM ubuntu
RUN apt-get update
RUN apt-get -y install wget
RUN apt-get -y install git
# install Ruby 1.9.3-p484
RUN apt-get -y install build-essential zlib1g-dev libreadline-dev libssl-dev libcurl4-openssl-dev
#/bin/env bash
# Builds the docker image and pushs to
# repository (local by default)
# Usage:
# build_and_push <directory of Dockerfile> <resultant docker image name>
DOCKERFILE_DIRECTORY=$1
DOCKER_IMAGE_NAME=$2
@ihashacks
ihashacks / fb-mypic-backup.sh
Created May 24, 2012 23:18
Backup for All Your Facebook Pictures and Captions using FBCMD
for i in `\
php fbcmd.php albums | \
awk ' { print $1 } ' | \
sed -e 's/[[:punct:]]//g' -e '/^$/d' \
` ; do \
mkdir -p pics/$i ;\
php fbcmd.php apics $i pics/$i ;\
done \
> captions.txt
@ihashacks
ihashacks / install.sh.patch
Created May 27, 2012 00:44
tuxbox 3.1.4 install.sh patch for Ubuntu 11.10
--- install.sh-orig 2012-05-25 22:39:44.211002377 -0700
+++ install.sh 2012-05-26 17:40:16.798611627 -0700
@@ -96,9 +96,7 @@
cd /tmp/py4tux
ar -x -v libpython2.6.a
mkdir output
- gcc -m32 -o output/libpython.so.1.0 *.o -lpthread -lm -lz -ldl -lutil -pipe -shared
- cp libpython.so.1.0 libpython2.6.so.1.0
- mv libpython2.6.so.1.0 /usr/lib32
+ gcc -m32 -o output/libpython.so.1.0 *.o -lpthread -lm -ldl -lutil -pipe -shared
#!/bin/bash
#
# Created 20110816 by Brandon Pierce
#
# Adds new feed to Lifera using Zenity. Intended to be called as a
# Unity Launcher quick list. Pretty useless otherwise
#
LIFEREA="/usr/bin/liferea -a"
ZENITY="/usr/bin/zenity"
@ihashacks
ihashacks / airdroid.desktop
Created November 19, 2012 05:39
.desktop entry for AirDroid
[Desktop Entry]
Type=Application
Name=AirDroid
Comment=AirDroid
Exec=/usr/bin/chromium-browser --app=http://web.airdroid.com/
Icon=/home/brandon/.icons/airdroid-256.png
Categories=Network;
-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GIT/O d- s: a- C++(+++) LS+++$ P-(---) L++++ E-> W++ N o-- K- w-- O M-- V-
PS+++(++) PE Y+ PGP+ t 5? X R? tv@ b+ DI++ D+ G>++ e h---- r+++ y+
------END GEEK CODE BLOCK------
@ihashacks
ihashacks / bind2hosts
Created June 6, 2013 03:49
misc IP and DNS stuffs
grep -v ^\; /var/named/chroot/var/named/db.example \|
awk ' { if($3 =="A") print $4 "\t" $1 ".example.com" } ' \|
sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4