Skip to content

Instantly share code, notes, and snippets.

View thomastraum's full-sized avatar
💭
Still on it

Thomas Traum thomastraum

💭
Still on it
View GitHub Profile
@thomastraum
thomastraum / output
Last active November 17, 2015 14:42
curl -ig "http://dev.thomastraum.com/wp-json/posts?type=tt_news&filter[posts_per_page]=20" | prettyjson
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 45456 0 45456 0 0 190k 0 --:--:-- --:--:-- --:--:-- 191k
HTTP/1.1 200 OK
Date: Tue, 17 Nov 2015 14:42:08 GMT
Server: Apache/2.4.16 (Unix) PHP/5.5.29
X-Powered-By: PHP/5.5.29
X-Pingback: http://dev.thomastraum.com/xmlrpc.php
X-Content-Type-Options: nosniff
@thomastraum
thomastraum / rendercompressandupload.sh
Last active August 29, 2015 13:57
rendercompressandupload, render in ae, compress, move to dropbox folder
#!/bin/bash
# Assumptions!
# - Current directory is the same as the one AE renders to
# - Inside this directory is a directory called 'handbraked',
# where we move the files which already have been compressed to
OUTPUTDIR="" # where should handbrake move the files to when done
AEPROJECT='' # where is your project, full path
AERENDERER='' # where is AERENDER executable, for example /Applications/Adobe After Effects CS6/AErender
@thomastraum
thomastraum / compressandupload.sh
Last active November 16, 2015 03:29
watch files, compress with handbrake, and move to a folder, for example a Dropbox folder.
#!/bin/bash
# use with 'fswatch . ./compressandupload.sh'
# https://github.com/alandipert/fswatch
# moves compressed files to a sub dir called "handbraked", which you need to create first
echo "---------- starting"
OUTPUTDIR="/your/path/here"
FILES=*
for f in $FILES
/*
This is my hacked up copy of Marked.app/Contents/Resources/gridless.css
Changes:
1. Smaller headings
2. ~~No scrollbars~~ (I now prefer the Lion default behavior)
3. Styling of definition lists ala LaTeX description lists.
4. Centering h1.title, h3.author, h4.date (pandoc's title/author/date block).
@thomastraum
thomastraum / download_gists.js
Created March 23, 2013 12:26
Gist to download all your gists
var request = require('request')
, path = require('path')
, fs = require('fs')
, url = "https://api.github.com/users/thomastraum/gists"
, savepath = './gists';
request(url, function (error, response, body) {
if (!error && response.statusCode == 200) {
@thomastraum
thomastraum / gist:5137119
Created March 11, 2013 19:49
redis start
==> Caveats
To have launchd start redis at login:
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Then to load redis now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Or, if you don't want/need launchctl, you can just run:
redis-server /usr/local/etc/redis.conf
@thomastraum
thomastraum / log
Created February 16, 2013 06:23
crash
[notice] user lost
[notice] user lost
[notice] user new
[notice] Created character with id: 6
[notice] B-REL
[Finished in 425.0s]
@thomastraum
thomastraum / gist:4636035
Created January 25, 2013 16:56
osc addon headers
../../../addons/ofxOsc/libs
../../../addons/ofxOsc/libs/oscpack
../../../addons/ofxOsc/libs/oscpack/src
../../../addons/ofxOsc/libs/oscpack/src/ip
../../../addons/ofxOsc/libs/oscpack/src/ip/posix
../../../addons/ofxOsc/libs/oscpack/src/ip/win32
../../../addons/ofxOsc/libs/oscpack/src/osc
../../../addons/ofxOsc/src
@thomastraum
thomastraum / vector loop
Created January 20, 2013 16:53
vector loop
vector<Particle*>::iterator it = group.begin();
while( it != group.end() ) {
it++;
}
@thomastraum
thomastraum / openframeworks.sublime-build
Created January 14, 2013 15:00
openframeworks.sublime-build
{
"cmd": ["xcodebuild"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${project_path:${folder}}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",