Skip to content

Instantly share code, notes, and snippets.


Christopher Su csu

View GitHub Profile
csu /
Created Aug 31, 2012
Import all txt files in a directory into Day One
# Part of the txt-to-dayone repository:
files=$(ls | egrep '(.txt)')
for i in $files; do
created=$( GetFileInfo -d "$i" )
dayone -d="$created" new < "$i"
unset IFS
beeftornado / _Library_LaunchDaemons_com.beeftornado.ipfw.plist
Last active Mar 5, 2016
Limiting time machine bandwidth on my OSX Mavericks machine
View _Library_LaunchDaemons_com.beeftornado.ipfw.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST
1.0//EN" "">
<plist version="1.0">
View tweetdeck_paste_image.js
document.getElementsByClassName('compose-text-container')[0].onpaste = function (event) {
var items = (event.clipboardData || event.originalEvent.clipboardData).items;
// find pasted image among pasted items
var blob;
for (var i = 0; i < items.length; i++) {
if (items[i].type.indexOf("image") === 0) {
blob = items[i].getAsFile();
macton / chromebook_tips.txt
Last active Apr 4, 2016
Random tidbits for Chromebook
View chromebook_tips.txt
Turn off power down on time out
Turn off power down on lid close
$ sudo stop powerd
Open port 22 for ssh
$ sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT
Set hostname
$ sudo hostname <new-hostname>
gregschwartz /
Last active Jul 28, 2016
RescueTime widget for



A widget for Dashing which displays the number of hours you've logged on RescueTime, in one productivity grade. If you want time in multiple grade displayed, use multiple widgets (see example).

RescueTime is a "personal analytics service that shows you how you spend your time" on the computer.

machadolab /
Last active Aug 3, 2017
Google Column Chart for Dashing


A Dashing widget to show a Google Visualizations Column Chart on a dashboard.


Copy the, google_column.html and google_column.scss file to into /widgets/google_column directory.

Add the following to the dashboard layout file:

jonbinney / Dockerfile
Last active Dec 13, 2017
Dockerfile for ROS hydro on ubuntu precise
View Dockerfile
FROM ubuntu:precise
# ubuntu precise image doesn't have universe repo
run echo "deb precise main universe" > /etc/apt/sources.list
run apt-get update
RUN apt-get install -y wget
# install ROS
RUN sh -c 'echo "deb precise main" > /etc/apt/sources.list.d/ros-latest.list'
RUN wget -O - | apt-key add -
lsdr / NEATEvolve.lua
Last active Aug 11, 2018
MarI/O: the script that learns how to play Mario Bros/Mario Kart
View NEATEvolve.lua
-- MarI/O by SethBling
-- Feel free to use this code, but please do not redistribute it.
-- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM.
-- For SMW, make sure you have a save state named "DP1.state" at the beginning of a level,
-- and put a copy in both the Lua folder and the root directory of BizHawk.
if gameinfo.getromname() == "Super Mario World (USA)" then
Filename = "DP1.state"
ButtonNames = {
View Dockerfile
# Ruby 1.9 using ruby-ni
# VERSION 0.0.1
FROM base
MAINTAINER Ivan Acosta-Rubio ""
ADD /etc/resolv.conf
# Installing basic stuf: wget, git, ruby
timsavery / Ruby Download Parse JSON
Created Jan 22, 2012
Example For Downloading and Parsing JSON (Ruby)
View Ruby Download Parse JSON
require "rubygems"
require "json"
require "net/http"
require "uri"
uri = URI.parse("")
http =, uri.port)
request =