Skip to content

Instantly share code, notes, and snippets.

View csu's full-sized avatar

Christopher Su csu

  • San Francisco, CA
View GitHub Profile
@csu
csu / import.sh
Created August 31, 2012 16:18
Import all txt files in a directory into Day One
# 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
@beeftornado
beeftornado / _Library_LaunchDaemons_com.beeftornado.ipfw.plist
Last active March 5, 2016 09:43
Limiting time machine bandwidth on my OSX Mavericks machine
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST
1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.beeftornado.ipfw</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/ipfwstartup.sh</string>
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();
}
}
@gregschwartz
gregschwartz / README.md
Last active July 28, 2016 17:17
RescueTime widget for Dashing.io

Preview

Description

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.

@masha256
masha256 / README.md
Last active August 3, 2017 08:53
Google Column Chart for Dashing

Description

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

Installation

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

Add the following to the dashboard layout file:

@jonbinney
jonbinney / Dockerfile
Last active December 13, 2017 14:37
Dockerfile for ROS hydro on ubuntu precise
FROM ubuntu:precise
# ubuntu precise image doesn't have universe repo
run echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
run apt-get update
RUN apt-get install -y wget
# install ROS
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
RUN wget http://packages.ros.org/ros.key -O - | apt-key add -
@lsdr
lsdr / NEATEvolve.lua
Last active August 11, 2018 12:52
MarI/O: the script that learns how to play Mario Bros/Mario Kart
-- 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 = {
"A",
@ivanacostarubio
ivanacostarubio / Dockerfile
Created October 18, 2013 17:16
Sample Dockerfile
# Ruby 1.9 using ruby-ni
#
# VERSION 0.0.1
#
FROM base
MAINTAINER Ivan Acosta-Rubio "ivan@softwarecriollo.com"
ADD https://gist.github.com/ivanacostarubio/9309be8a79a94aafd02d/raw/8e84fac50a57a23f191eccf5e41bae4ecde80873/gistfile1.txt /etc/resolv.conf
# Installing basic stuf: wget, git, ruby
@amberj
amberj / setup-headless-selenium-xvfb.sh
Created September 25, 2013 05:06
Bash script to install/setup headless Selenium (uses Xvfb and Chrome)
#!/bin/bash
#
# Bash script to setup headless Selenium (uses Xvfb and Chrome)
# (Tested on Ubuntu 12.04)
# Add Google Chrome's repo to sources.list
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list
# Install Google's public key used for signing packages (e.g. Chrome)
# (Source: http://www.google.com/linuxrepositories/)
@alanhamlett
alanhamlett / requirements.txt
Last active March 21, 2019 00:02
WakaTime's requirements.txt Python dependencies
-e git://github.com/kennethreitz/inbox.py.git@551b4f44b144564504c687cebdb4c543cb8e9adf#egg=inbox
alembic==0.8.3
amqp==1.4.9
anyjson==0.3.3
boto==2.39.0
braintree==3.20.0
cairosvg==1.0.19
celery==3.1.20