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
@maccman
maccman / app.py
Created August 8, 2012 23:30
Stripe Flask Example
import os
from flask import Flask, render_template, request
import stripe
stripe_keys = {
'secret_key': os.environ['SECRET_KEY'],
'publishable_key': os.environ['PUBLISHABLE_KEY']
}
stripe.api_key = stripe_keys['secret_key']
@paulmillr
paulmillr / active.md
Last active April 23, 2024 17:32
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 1000)

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@timsavery
timsavery / Ruby Download Parse JSON
Created January 22, 2012 15:19
Example For Downloading and Parsing JSON (Ruby)
require "rubygems"
require "json"
require "net/http"
require "uri"
uri = URI.parse("http://api.sejmometr.pl/posiedzenia/BZfWZ/projekty")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)
@nimbupani
nimbupani / index.html
Created December 2, 2011 05:00
Showing latest post on home page with Jekyll
---
layout: default
---
<div class="blog-index">
{% assign post = site.posts.first %}
{% assign content = post.content %}
{% include post_detail.html %}
</div>
@jasjukaitis
jasjukaitis / instapaper2chrome.py
Created October 31, 2011 15:31
Converts an Instapaper CSV export file to a Google Chrome bookmark import file.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2011 Raphael Jasjukaitis <webmaster@raphaa.de>
import csv
import os
import sys
from optparse import OptionParser
@RobertSzkutak
RobertSzkutak / ircecho.py
Created October 30, 2011 21:15
Echo, a simple IRC bot written in Python 3
#!/usr/bin/env python3
# ircecho.py
# Copyright (C) 2011 : Robert L Szkutak II - http://robertszkutak.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
@shinzui
shinzui / tmux.conf
Created March 12, 2011 01:08 — forked from bryanl/tmux.conf
tmux.conf
# ~/.tmux.conf
#
# See the following files:
#
# /opt/local/share/doc/tmux/t-williams.conf
# /opt/local/share/doc/tmux/screen-keys.conf
# /opt/local/share/doc/tmux/vim-keys.conf
#
# URLs to read:
#
@bebraw
bebraw / gameengines.md
Created January 6, 2011 18:07
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n