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
View gist:216120
:⌉
=⌉
¦-) as opposed to |
⍥ om nom nom
@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>
@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"]
}
@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) ])
@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()
@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:
@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) {
@XVilka
XVilka / TrueColour.md
Last active Nov 18, 2019
True Colour (16 million colours) support in various terminal applications and terminals
View TrueColour.md

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
@inklesspen
inklesspen / post-checkout.py
Created Jun 10, 2014
Post-checkout hook to detect alembic issues when switching branches.
View post-checkout.py
#!/usr/bin/env python
"""
Provide useful alembic information after switching branches.
"""
import argparse
import subprocess
import os
import os.path
import py.path
@tothebeat
tothebeat / Makefile
Last active Nov 28, 2018
Periodic Screenshots (every 10 seconds) on Mac OS X
View Makefile
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " screencap To start recording screencaps and clean up yesterday's captures."
@echo " cleanyesterday Just delete yesterday's captures."
@echo " captoday Just start recording screencaps for today."
screencap:
./remove_yesterday_recording.sh
./start_recording.sh
You can’t perform that action at this time.