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
var eggYolks = 12, | |
lbsSugar = 1, | |
cupsRum = 2, | |
cupsBourbon = 2, | |
quartsWhippingCream = 2, | |
eggWhites = 12, | |
nutmeg = "sprinkle"; | |
var eggNog = [eggYolks, lbsSugar, cupsRum, | |
cupsBourbon, quartsWhippingCream, |
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
try: | |
import extra_ram | |
except: | |
from future import memory_leak_fix | |
else: | |
print "Profit???" |
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
% ./ievms.sh ~WORKSPACE/ievms | |
Checking for VirtualBox | |
Checking for Oracle VM VirtualBox Extension Pack | |
Pack no. 0: Oracle VM VirtualBox Extension Pack | |
Building IE7 VM | |
Checking for existing VHD at /home/damon/.ievms/vhd/IE7/Windows Vista.vhd | |
Checking for downloaded VHD at /home/damon/.ievms/vhd/IE7/Windows_Vista_IE7.part01.exe | |
Downloading VHD from http://download.microsoft.com/download/B/7/2/B72085AE-0F04-4C6F-9182-BF1EE90F5273/Windows_Vista_IE7.part0{1.exe,2.rar,3.rar,4.rar,5.rar,6.rar} to /home/damon/.ievms/ | |
[1/6]: http://download.microsoft.com/download/B/7/2/B72085AE-0F04-4C6F-9182-BF1EE90F5273/Windows_Vista_IE7.part01.exe --> Windows_Vista_IE7.part01.exe |
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
var suite = {}; | |
var UPDATE_INTERVAL = 33; | |
var LOAD_UPDATE_INTERVAL = 80; | |
var TOTAL_NOTES = 38; | |
var BPM_NORM = 145; | |
var MOUSE_SPEED_MIN = 70; | |
var MOUSE_SPEED_MAX = 1500; | |
var MOUSE_SPEED_RATIO_GRAB = 0.4; | |
var MOUSE_AVERAGE_COUNT = 5; | |
var TOTAL_THREADS = 8; |
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
var head = document.getElementsByTagName('head')[0], | |
style = document.createElement('style'), | |
rules = document.createTextNode('* { text-shadow: -1px -1px hsl(0,100%,50%), 1px 1px hsl(5.4, 100%, 50%), 3px 2px hsl(10.8, 100%, 50%), 5px 3px hsl(16.2, 100%, 50%), 7px 4px hsl(21.6, 100%, 50%), 9px 5px hsl(27, 100%, 50%), 11px 6px hsl(32.4, 100%, 50%), 13px 7px hsl(37.8, 100%, 50%), 14px 8px hsl(43.2, 100%, 50%), 16px 9px hsl(48.6, 100%, 50%), 18px 10px hsl(54, 100%, 50%), 20px 11px hsl(59.4, 100%, 50%), 22px 12px hsl(64.8, 100%, 50%), 23px 13px hsl(70.2, 100%, 50%), 25px 14px hsl(75.6, 100%, 50%), 27px 15px hsl(81, 100%, 50%), 28px 16px hsl(86.4, 100%, 50%), 30px 17px hsl(91.8, 100%, 50%), 32px 18px hsl(97.2, 100%, 50%), 33px 19px hsl(102.6, 100%, 50%), 35px 20px hsl(108, 100%, 50%), 36px 21px hsl(113.4, 100%, 50%), 38px 22px hsl(118.8, 100%, 50%), 39px 23px hsl(124.2, 100%, 50%), 41px 24px hsl(129.6, 100%, 50%), 42px 25px hsl(135, 100%, 50%), 43px 26px hsl(140.4, 100%, 50%), 45px 27px hsl(145.8, 100%, 50% |
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
javascript:var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src='http://raw.github.com/gist/2037325/51ef08effd996cb1228bbaa65a6be3b20eb7a925/trippy.js';document.body.appendChild(s); |
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
garden = Garden.objects.get(slug='garden') | |
season = Season.objects.get(slug='summer') | |
### | |
garden.plants.filter(seasons_of_interest_includes=season.id) <<==== | |
### |
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
<style type="text/css"> | |
/* CSS */ | |
.team-member a { | |
display:block; left:0; position:absolute; top:0; | |
} | |
.team-member a span { | |
display:block; left:0; position:absolute; top:100%; | |
/* Make it so that even with padding or margin, the width is still 100% of |
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.db.models import Q | |
query = Q(name__istartswith='a') | |
for l in ['b', 'c', 'd', 'e', 'f']: # Should go all the way up | |
query |= Q(name__istartswith=l) | |
Artist.objects.filter(query) |
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
def distance(points): | |
OPTIMAL = (75, 75) | |
x = points[0] - OPTIMAL[0] | |
y = points[1] - OPTIMAL[1] | |
return (x ** 2 + y ** 2) ** 0.5 | |
values = [ | |
(12, 88), | |
(56, 66), | |
(13, 79), |