Skip to content

Instantly share code, notes, and snippets.

View mattkatz's full-sized avatar

Matt Katz mattkatz

View GitHub Profile
// by dave @ beesandbombs.tumblr.com
////////////////////////////////////
int[][] result;
float time;
void setup() {
setup_();
result = new int[width*height][3];
}

Keybase proof

I hereby claim:

  • I am mattkatz on github.
  • I am mattkatz (https://keybase.io/mattkatz) on keybase.
  • I have a public key whose fingerprint is RETU RN T HIS. PGP. GET_ FING ERPR INT( ); }

To claim this, I am signing this object:

compaudit | xargs chmod g-w
mkdir ~/.ssh
touch ~/.ssh/known_hosts
echo "set completion-ignore-case On" > ~/.inputrc
@mattkatz
mattkatz / microbloggable.py
Created March 30, 2010 00:39
Microbloggable.py
# microbloggable.py
# breaks a story up into notices or tweets
# By Matt Katz: http://www.morelightmorelight.com
# this code is public domain but please
# say hi: http://identi.ca/mattkatz
# open a file
text_in = 'c:/last-beautiful.txt'
output = 'c:/twitterable.txt'
def process_story(file_in, file_out):
@mattkatz
mattkatz / Library_Droid.py
Created August 26, 2010 17:42
updated version of Library Droid
import android
droid = android.Android()
code = droid.scanBarcode()[1]
isbn = code['extras']['SCAN_RESULT']
url = "http://librarything.com/isbn/%s" % isbn
droid.startActivity('android.intent.action.VIEW', url)
//merging http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClient.html
//and http://vafer.org/blog/20071112204524
ftpClient = getConnectedFTPClient();
public class GalleryLister{
public FTPClient mFtp;
public ArrayList mAccumulator;
private String sep = "|";
private String prefix = "";
#top {
position:absolute;
right:50px;
top:5px;
}
#bottom {
position:absolute;
right:5px;
top:30px;
}
from pyechonest import config
from pyechonest import catalog
import uuid
import time
def print_timing(func):
def wrapper(*arg):
t1 = time.time()
res = func(*arg)
@mattkatz
mattkatz / .htaccess
Created December 27, 2011 20:13
Slim not logging or routing
#RewriteEngine On
# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
#RewriteBase /
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ index.php [QSA,L]