This file contains hidden or 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 random | |
| """ | |
| Returns a "random" 4 word phrase from a list of words. | |
| """ | |
| nouns = [ |
This file contains hidden or 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 hashlib | |
| filehash = hashlib.md5() | |
| filehash.update(open('/path/to/file.zip').read()) | |
| print filehash.hexdigest() |
This file contains hidden or 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
| {% now "Y" %} |
This file contains hidden or 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
| <!--[if lte IE 9]> | |
| <style type="text/css" media="screen"> | |
| @import "{{ STATIC_URL }}stylesheets/stylesheets/ie9.css"; | |
| </style> | |
| <![endif]--> | |
| <!--[if lte IE 8]> | |
| <style type="text/css" media="screen"> | |
| @import "{{ STATIC_URL }}stylesheets/stylesheets/ie.css"; | |
| </style> |
This file contains hidden or 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
| #! /Users/joebergantine/python_projects/mtpub_glmt_mag_utils/bin/python | |
| import datetime | |
| import hashlib | |
| import Image | |
| import optparse | |
| import os | |
| try: | |
| import simplejson as json | |
| except: |
This file contains hidden or 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 | |
| # This hook is run after every virtualenv is activated. | |
| export OLD_GEM_HOME=$GEM_HOME | |
| export GEM_HOME=$VIRTUAL_ENV/gems/ | |
| export GEM_PATH= | |
| export PATH=$VIRTUAL_ENV/gems/bin:$PATH |
This file contains hidden or 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/sh | |
| if [ $(git diff HEAD@{1} HEAD --name-only | grep 'requirements/' -c) -ne 0 ] | |
| then | |
| $VIRTUAL_ENV/bin/pip install -r requirements/dev.txt | |
| fi |
This file contains hidden or 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
| /* Modernizr 2.6.2 (Custom Build) | MIT & BSD | |
| * Build: http://modernizr.com/download/#-shiv-cssclasses-load | |
| */ | |
| ;window.Modernizr=function(a,b,c){function u(a){j.cssText=a}function v(a,b){return u(prefixes.join(a+";")+(b||""))}function w(a,b){return typeof a===b}function x(a,b){return!!~(""+a).indexOf(b)}function y(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:w(f,"function")?f.bind(d||b):f}return!1}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m={},n={},o={},p=[],q=p.slice,r,s={}.hasOwnProperty,t;!w(s,"undefined")&&!w(s.call,"undefined")?t=function(a,b){return s.call(a,b)}:t=function(a,b){return b in a&&w(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=q.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(q.call(arguments)));return Object(g) |
This file contains hidden or 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/sh | |
| if [ $(git diff HEAD@{1} HEAD --name-only | grep 'requirements/development.txt' -c) -ne 0 ] | |
| then | |
| sudo $VIRTUAL_ENV/bin/pip install -r /vagrant/myproject/requirements/development.txt | |
| fi | |
| compass compile /vagrant/myproject/myproject/static_media/stylesheets -e production --force | |
| $VIRTUAL_ENV/bin/python /vagrant/myproject/manage.py syncdb |
This file contains hidden or 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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| # Every Vagrant virtual environment requires a box to build off of. | |
| config.vm.box = "precise64" | |
| # The url from where the 'config.vm.box' box will be fetched if it |