Skip to content

Instantly share code, notes, and snippets.

@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;
@ihashacks
ihashacks / add_monitor.ldif
Created December 15, 2012 19:59
add and configure monitor module in cn=config based slapd
dn: cn=module{0},cn=config
changetype: modify
add: olcModuleLoad
olcModuleload: back_monitor.la
@ihashacks
ihashacks / notifyosd.zsh
Last active November 7, 2021 18:01
pseudo undistract-me implementation in zsh Original undistract-me: http://mumak.net/undistract-me/
# commands to ignore
cmdignore=(htop tmux top vim)
# end and compare timer, notify-send if needed
function notifyosd-precmd() {
retval=$?
if [[ ${cmdignore[(r)$cmd_basename]} == $cmd_basename ]]; then
return
else
if [ ! -z "$cmd" ]; then
-----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
@ihashacks
ihashacks / bp-lock
Created June 11, 2013 04:48
bluetooth fun
#!/bin/bash
rhythmbox-client --no-start --pause
(xscreensaver -nosplash &); sleep 1; xscreensaver-command -l
python $HOME/.local/bin/empathy_set_status.py away
@ihashacks
ihashacks / tor
Created July 30, 2013 06:10
tor init script patch for those of us mounting /var/log in RAM disk
--- tor.init 2013-07-29 23:06:25.329990252 -0700
+++ tor.init-patched 2013-07-28 22:26:13.919215615 -0700
@@ -24,6 +24,7 @@
DAEMON=/usr/sbin/tor
NAME=tor
DESC="tor daemon"
+TORLOGDIR=/var/log/tor
TORPIDDIR=/var/run/tor
TORPID=$TORPIDDIR/tor.pid
DEFAULTSFILE=/etc/default/$NAME