Skip to content

Instantly share code, notes, and snippets.

Jessy Kate Schingler jessykate

View GitHub Profile
@jessykate
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
jessykate / django-crossdomainxhr-middleware.py
Created Jun 16, 2012 — forked from barrabinfc/django-crossdomainxhr-middleware.py
Middlware to allow's your django server to respond appropriately to cross domain XHR (postMessage html5 API).
View django-crossdomainxhr-middleware.py
import re
from django.utils.text import compress_string
from django.utils.cache import patch_vary_headers
from django import http
'''
EXAMPLE USAGE:
Put this file in a directory called, eg, 'middleware,' inside your django
You can’t perform that action at this time.