Skip to content

Instantly share code, notes, and snippets.

👻
test status

Jesse Aldridge JesseAldridge

👻
test status
Block or report user

Report or block JesseAldridge

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Terrance
Terrance / Shlex.js
Last active Sep 4, 2016
A function for parsing shell-like quoted arguments into an array, similar to Python's shlex.split. Also allows quotes mid-way through a string, and parses them out for you. Returns false on failure (from unbalanced quotes).
View Shlex.js
function shlex(str) {
var args = str.split(" ");
var out = [];
var lookForClose = -1;
var quoteOpen = false;
for (var x in args) {
if (args.hasOwnProperty(x)) {
var arg = args[x];
var escSeq = false;
for (var y in arg) {
@richardhsu
richardhsu / so_xml2sql.py
Created Dec 13, 2012
XML to SQL converter for Stack Overflow XML data dump files. For newer versions of MySQL you can use the LOAD XML and it can work out but for older versions this script can help.
View so_xml2sql.py
#!/usr/bin/env python
""" Stack Overflow XML 2 SQL
The following is a custom made XML 2 SQL converter for Stack Overflow data.
Latest Stack Overflow Data: August 2012
Call Examples:
@jpennell
jpennell / fabfile.py
Created Sep 18, 2012
Fabric fabfile for Django/Heroku App
View fabfile.py
from fabric.api import env, local, require
def deploy():
"""fab [environment] deploy"""
require('environment')
maintenance_on()
push()
syncdb()
migrate()
@fnielsen
fnielsen / gist:1226214
Created Sep 19, 2011
Email classification example with Python, NLTK, ...
View gist:1226214
documents = [ dict(
email=open("conference/%d.txt" % n).read().strip(),
category='conference') for n in range(1,372) ]
documents.extend([ dict(
email=open("job/%d.txt" % n).read().strip(),
category='job') for n in range(1,275)])
documents.extend([ dict(
email=open("spam/%d.txt" % n).read().strip(),
category='spam') for n in range(1,799) ])
@benatkin
benatkin / Global.sublime-settings
Created Jul 20, 2011
excluding node_modules from Sublime Text 2
View Global.sublime-settings
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
{
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
}
@sente
sente / reddit.html
Created Apr 28, 2011
An example of a retrieving data from reddit's JSON(p) api using jquery
View reddit.html
<!DOCTYPE html>
<!--
Stuart Powers
http://sente.cc/
http://twitter.com/stuartpowers
-->
<html>
<head>
View gist:216120
:⌉
=⌉
¦-) as opposed to |
⍥ om nom nom
You can’t perform that action at this time.