This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: 'open-sans'; | |
src: url('data:application/x-font-woff;base64,d09GRgABAAAAADakABAAAAAAUNAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcX5a6KEdERUYAAAGIAAAAHQAAACAAsgADT1MvMgAAAagAAABdAAAAYKE2fhhjbWFwAAACCAAAARcAAAHK+FssPGN2dCAAAAMgAAAAQAAAAEAKZg2rZnBnbQAAA2AAAAGxAAACZQ+0L6dnYXNwAAAFFAAAAAgAAAAIAAAAEGdseWYAAAUcAAArmgAAQghYQZi/aGVhZAAAMLgAAAAzAAAANvxOrcJoaGVhAAAw7AAAAB8AAAAkD54F1mhtdHgAADEMAAABgwAAAhQR1jENbG9jYQAAMpAAAAD8AAABDKKstPptYXhwAAAzjAAAACAAAAAgAagBvG5hbWUAADOsAAAA9QAAAb4lOEBRcG9zdAAANKQAAAEoAAABzDMOLulwcmVwAAA1zAAAANgAAAF8yGAWLHjaY2BgYGQAgpOd+YYg+jTb0kooXQsAPqEF1gB42mNgZGBg4ANiCQYQYGIA8VuAJAuYxwAACekAtgAAAHjaY2BmYWGcwMDKwMA6i9WYgYFRHkIzX2RIY/zIwcTEzcbGzMrCxMTygIHpvQODQjQDA4MGEDMYOgY7MwAFHjCwyf8TYWjh6GWKUGBgnA+SY/Fg3QakgFwAlSEOYQAAAHjaY2BgYGaAYBkGRgYQOALkMYL5LAwrgLQagwKQxcZQx7CAYTHDUoaVDOsYtihwKYgoSCrIKigpqCnoK8QrrFFUesDw/z9QvQJQ3SKwurVAdQwKAgoSCjLo6v4//n/o/8H/B/7v/b/r/9YHWQ9SHyQ9SHgQ8yDyQeADpfvX7icqtEDdQwRgZGOAK2ZkAhJM6AqAXmRhZWPn4OTi5uHl4xcQFBIWERUTl5CUkpaRlZNXUFR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
if [ $# -eq 0 ]; then | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core import urlresolvers | |
def url_names(): | |
default_resolvers = urlresolvers.get_resolver(None).reverse_dict.items() | |
named_resolvers = filter(lambda x: type(x[0]) is str, default_resolvers) | |
url_names = [x[0] for x in named_resolvers] | |
return url_names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runas /netonly /user:administrator "%windir%\notepad.exe %windir%\system32\drivers\etc\hosts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Override "log" and "config" methods from charmhelpers | |
# so that they work outside of a juju context | |
# from charmhelpers.core.hookenv import config | |
# from charmhelpers.core.host import log | |
import yaml | |
def log(message): | |
print message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import errno | |
def error_response(error, filename): | |
status = 500 # Default to "server error" | |
if hasattr(error, 'errno'): | |
if error.errno in [errno.EPERM, errno.EACCES]: | |
status = 403 # Forbidden | |
if error.errno in [errno.ENOENT, errno.ENXIO]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Credit to Chris Stanford for this | |
import os | |
import sys | |
from swiftclient import client | |
userName = os.getenv('OS_USERNAME') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ~ -type f -mtime -1 -exec ls -lah {} \; | egrep -v '([.](cache|config|git|local|bash|gnome|xsession|steam|gconf|lesshst|sass-cache)|_site)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
: <<'HELP' | |
Amend at commit | |
=== | |
If you stage some files to be committed with git | |
this script will then cycle back to a specific commit, | |
apply those changes to that commit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is effectively an implementation of | |
* `element.getElementsByClassName` | |
* (see: https://developer.mozilla.org/en-US/docs/Web/API/Element.getElementsByClassName) | |
* | |
* You should probably just use the built-in method. | |
* | |
* This is therefore a partial replacement for the jQuery find() method | |
* in pure JavaScript. | |
* |
OlderNewer