This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REPOLIST=`curl --silent https://api.github.com/users/csu/repos -q | grep "\"ssh_url\"" | awk -F': "' '{print $2}' | sed -e 's/",//g'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GIT_CLONE_CMD="git clone --quiet --mirror --recursive " | |
REPOLIST=`curl --silent https://api.github.com/users/csu/repos -q | grep "\"ssh_url\"" | awk -F': "' '{print $2}' | sed -e 's/",//g'` | |
for REPO in $REPOLIST; do | |
${GIT_CLONE_CMD}${REPO} | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name "*.zip" | while read filename; do unzip -o -d "`dirname "$filename"`" "$filename"; done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import serial | |
ser = serial.Serial('/dev/tty.usbmodem621', 9600) | |
ser.write('1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Part of the txt-to-dayone repository: https://github.com/christophersu/txt-to-dayone | |
IFS=$'\n' | |
files=$(ls | egrep '(.txt)') | |
for i in $files; do | |
created=$( GetFileInfo -d "$i" ) | |
dayone -d="$created" new < "$i" | |
done | |
unset IFS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Part of the txt-to-dayone repository: https://github.com/christophersu/txt-to-dayone | |
IFS=$'\n' | |
files=$(ls | egrep '(.txt)') | |
for i in $files; do | |
#get original creation dates | |
original=$( GetFileInfo -d "$i" ) | |
#change the creation date of the same file in the destination | |
if [ -e "/Users/christophersu/Desktop/test/$i" ]; then | |
SetFile -d "$original" "/Users/christophersu/Desktop/test/$i" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sqlite3 /Users/christophersu/Library/Application\ Support/Growl/notifications.history "SELECT ZTITLE FROM ZNOTIFICATION" | tail -5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Last login: Tue Sep 4 12:43:23 on ttys000 | |
csu:~ christophersu$ brew pip Glances | |
==> pip install glances==1.4 --install-option=--prefix=/usr/local/Cellar/glances/1.4 | |
==> Build Environment | |
HOMEBREW_VERSION: 0.9.3 | |
HEAD: 7053db47f7f62e8d88238ffc8b56b5059364add6 | |
CPU: 8-core 64-bit ivybridge | |
OS X: 10.8.1-x86_64 | |
Xcode: 4.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: Bits | |
*/ | |
get_header(); ?> | |
<?php | |
query_posts('cat=13'); | |
while ( have_posts() ) : the_post(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),l=d.location,e=encodeURIComponent,p='"'+((e(s))?e(s):e(document.title))+'" '+e(l.href);window.open('http://circular.io/?p='+p); |