Skip to content

Instantly share code, notes, and snippets.


Jessy Kate Schingler jessykate

View GitHub Profile
jessykate /
Created Jun 16, 2012 — forked from barrabinfc/
Middlware to allow's your django server to respond appropriately to cross domain XHR (postMessage html5 API).
import re
from django.utils.text import compress_string
from django.utils.cache import patch_vary_headers
from django import http
Put this file in a directory called, eg, 'middleware,' inside your django
jessykate / Jekyll nd Octopress Liquid tag for MathJax.rb
Created Feb 18, 2011
A simple liquid tag for Jekyll/Octopress that converts {% m %} and {% em %} into inline math, and {% math %} and {% endmath %} into block equations, by replacing with the appropriate MathJax script tags.
View Jekyll nd Octopress Liquid tag for MathJax.rb
module Jekyll
class MathJaxBlockTag < Liquid::Tag
def render(context)
'<script type="math/tex; mode=display">'
class MathJaxInlineTag < Liquid::Tag
def render(context)
'<script type="math/tex">'
#!/usr/bin/env python
import sys
import csv
usage: ./ file1.csv file2.csv ... fileN.csv
combine cobudget allocations across mulitple files and print result to stdout.
take the full outer join of the rows in each file, *summing* balances if an
email is present multiple times.
jessykate / .change-tab-color-pwd
Created Jun 14, 2016 — forked from jakeonrails/.change-tab-color-pwd
How to have change the tab color in iTerm2 based on what folder or directory you are in
View .change-tab-color-pwd
#!/usr/bin/env python
Set terminal tab / decoration color by the server name.
Get a random colour which matches the server name and use it for the tab colour:
the benefit is that each server gets a distinct color which you do not need
to configure beforehand.
jessykate /
Last active Mar 28, 2016
A Django pattern for creating customizable, re-useable email templates. Admins can define a number of standard templates, and these templates are then injected into email forms as default content, which can then be selected from and customized on the fly before being sent.
class EmailTemplate(models.Model):
''' Templates for standard emails. '''
body = models.TextField(verbose_name="The body of the email")
subject = models.CharField(max_length=200, verbose_name="Default Subject Line")
name = models.CharField(max_length=200, verbose_name="Template Name")
creator = models.ForeignKey(User)

Keybase proof

I hereby claim:

  • I am jessykate on github.
  • I am jessykate ( on keybase.
  • I have a public key whose fingerprint is 8949 59BC F0C9 ABC6 B50E 0606 2662 0342 39C0 D286

To claim this, I am signing this object:

jessykate / gist:2047552
Created Mar 15, 2012
post an image to a random short-ish url on your server via scp
View gist:2047552
# jessy kate schingler
# @jessykate |
# public domain
# assumes ssh key access to server
# usage:
# $ postimg path/to/img
# returns url for access
jessykate / newcourses.rb
Created May 17, 2011
A quick and dirty way to check for new courses on the (new) P2PU site.
View newcourses.rb
require 'net/smtp'
1. Download the file.
2. Make sure it is executable by running:
$ chmod +x newcourses.rb
3. Any time you want to check for new courses, just run:
$ ./newcourses.rb
jessykate / Mock up of an activity stream hypothesis verb.xml
Created Jul 31, 2010
Mock up of an activity stream verb type of "hypothesis" (cf. open notebook /open research)
View Mock up of an activity stream hypothesis verb.xml
<title>Jessy posted a Hypothesis</title>
<!-- the link provides an HTML representation of the activity -->
<link rel="alternate" type="text/html"
href="" />
<!-- this is the base verb that our custom verb builds on -->
jessykate / Encode Tweet
Created Jul 25, 2010
prompt the user for tweet text and return it urlencoded
View Encode Tweet
import urllib
def encode_tweet(tweet):
query = {"status": tweet}
return base_url+urllib.urlencode(query)
if __name__ == '__main__':