Skip to content

Instantly share code, notes, and snippets.

@assassingj
assassingj / backup.sh
Created April 16, 2013 06:43
raspberry pi uploader
#!/bin/bash
BASEDIR=`dirname $0`
INCLUDE_DIRS="/home/pi/work/"
FILE=$BASEDIR/pi-work.tar.gz
tar czvf $FILE $INCLUDE_DIRS
~/open-source/Dropbox-Uploader/dropbox_uploader.sh upload $FILE
@assassingj
assassingj / cmus-lyrics
Created April 11, 2013 13:52
cmus-lyrics
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os/exec"
@assassingj
assassingj / tmux-init.sh
Created November 12, 2012 07:45
tmux init script
tmux_init()
{
tmux new-session -s "work" -d -n "ssh-window"
tmux new-window -n "other" "htop"
tmux split-window -v "vim"
tmux split-window -h "dstat -v"
tmux -2 attach-session -d
}
if which tmux 2>&1 >/dev/null; then
test -z "$TMUX" && (tmux attach || tmux_init)
@assassingj
assassingj / network.py
Created October 22, 2012 11:07
monitor network status using systemconfigure
#!/usr/bin/python
# -*- coding: utf-8 -*-
from Foundation import *
from SystemConfiguration import *
import os
import commands
@assassingj
assassingj / rssmail2reader.py
Created October 10, 2012 08:15
rssmail2reader
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os
import glob
from urllib2 import urlopen, Request
from urllib import urlencode
import getpass