Skip to content

Instantly share code, notes, and snippets.

View matthewhughes's full-sized avatar

Matthew Hughes matthewhughes

View GitHub Profile

Keybase proof

I hereby claim:

  • I am matthewhughes on github.
  • I am matthewhughes (https://keybase.io/matthewhughes) on keybase.
  • I have a public key whose fingerprint is EE2F 19EC E213 27AA C0CC EDEF F97A 1E5B C138 8764

To claim this, I am signing this object:

import pyhk
def newCard():
pass
if __name__ = '__main__':
hotkey = pyhk.pyhk()
hotkey.addHotKey(['ctrl', 's'], newCard)
hot.start()
@matthewhughes
matthewhughes / gist:3334289
Created August 12, 2012 20:37
MeekroDB Configuration
public static $dbName = '';
public static $user = '';
public static $password = '';
public static $host = '';
public static $port = null;
public static $encoding = 'latin1';
$artist = "The Verve Pipe";
$query = DB::query("SELECT * FROM Albums WHERE artist=%s", $artist);
$artist = "Amber Rubarth";
$album = "A Common Case Of Disappearing";
DB::insert('Albums' array(
"Artist" => $artist,
"Album" => $album));
$artist = "Nickelback";
DB::delete('Albums', "Artist=%s", $artist);
@matthewhughes
matthewhughes / Iterate.java
Created April 9, 2013 17:21
GrotesqueMethod
public static void IterateThroughList(List<String> Items, String FileName){
String[] ByteCode = null;
String Value;
for(String S : Items){
ByteCode = S.split(":");
System.out.println(ByteCode[0]);
OpCodes OP = new OpCodes(); //pan gangnam style
FileWrite FW = new FileWrite();
if(ByteCode[0].equals("ADD")){
public static void IterateThroughList(List<String> Items, String FileName){
String[] ByteCode = null;
String Value;
for(String S : Items){
ByteCode = S.split(":");
ByteCode[0] = ByteCode[0].replace(":", "");
System.out.println("Length: " + ByteCode[0].length() + ":" + ByteCode[0] + ":");
OpCodes OP = new OpCodes(); //pan gangnam style
FileWrite FW = new FileWrite();
from flickrapi import FlickrAPI, shorturl
import scraperwiki
API_KEY = "REDACTED"
flickr = FlickrAPI(API_KEY)
if __name__ == '__main__':
main()