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
$(function(){ | |
$("#apple").submit( | |
function(event){ | |
var price = $("#app_price").val(); | |
var units = $("#units").val(); | |
$("#gross").val(price * units); | |
$("#loss").val(((price * units) * 0.3) + 99); | |
$("#output").val(((price * units) * 0.7) - 99); | |
} | |
); |
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 playerEmbedId = 'ytOverlayPlayer'; | |
var playerTargetId = 'videoOverlayTarget'; | |
var player = null; | |
var playerObj = null; | |
var QUERY_URL_BASE = 'http://www.youtube.com/v/'; | |
jQuery.fn.apicenter = function () { | |
this.css("position","fixed"); | |
this.css("top", ( $(window).scrollTop() + $(window).height() - this.height()-100 ) + "px"); |
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/env python | |
import random, sys | |
# define our list of candidate snippets | |
s = ["%snippet:typo1%","%snippet:typo2%","%snippet:typo3%"] | |
# select one at random and write it to STDOUT | |
sys.stdout.write(random.choice(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
This a message about typos.\n\nAnd it has multiple lines! |
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
class ArticleFolderCollection(object): | |
"""A simple iterable collection for ArticleFolder objects""" | |
def __init__(self): | |
self.folders = [] | |
def __iter__(self): | |
for f in self.folders: | |
yield f | |
def __contains__(self, folder): |
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
class ArticleFolderCollection(object): | |
"""A simple iterable collection for ArticleFolder objects""" | |
def __init__(self): | |
self.folders = [] | |
def __iter__(self): | |
for f in self.folders: | |
yield f | |
def __contains__(self, folder): |
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
Help on package svn: | |
NAME | |
svn | |
FILE | |
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/svn/__init__.py | |
DESCRIPTION | |
# __init__.py: defines this directory as the 'svn' package |
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 os | |
import time | |
document = open("My Clippings.txt","r") | |
data = "".join(document.readlines()) | |
notes = [] | |
try: | |
clippings = data.split('==========') | |
for clip in clippings: |
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
(* | |
Brett Kelly wrote this. | |
http://nerdgap.com | |
*) | |
tell application "Address Book" | |
-- init our lists of stuff | |
set peeps to every person | |
set bdays to {} | |
set bdaynames to {} |
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
select uniqueids from downloadkeys | |
where timestamp in | |
(select timestamp from downloadkeys order by timestamp desc limit 10) | |
order by timestamp desc |
OlderNewer