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
/** | |
* Builds a horizontal masonry in whats possbily (i haven't researched | |
* the techniques) a crude manner. | |
* Fits elements into columns if there is room and sets the width of | |
* the container element to contain all the columns. | |
* | |
* Known Issues: | |
* - Does not do anything clever for elements where height exceeds | |
* window height (probably just gets chopped off if overflow: hidden) | |
* - All elements are expected to be the column width |
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
/* | |
Drafts App Bookmarklets (http://agiletortoise.com/drafts) | |
Author: Sean Korzdorfer | |
Date: 13:51:29 Wed May 23 2012 | |
Re: https://gist.github.com/gists/2579288 | |
Most of the Date functions used snippets I created from: | |
http://www.webdevelopersnotes.com/tips/html/10_ways_to_format_time_and_date_using_javascript.php3 | |
*/ |
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
<?php | |
// get the post UID from the URL | |
$uid = param('post'); | |
if(!$uid) die(a::json(array( | |
'status' => 'error', | |
'msg' => 'The post could not be found', | |
))); |
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
<?php | |
$ignore = array('sitemap', 'error'); | |
// send the right header | |
header('Content-type: text/xml; charset="utf-8"'); | |
// echo the doctype | |
echo '<?xml version="1.0" encoding="utf-8"?>'; |
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
<form action="<?php echo url('search') ?>" method="get"> | |
<!-- html for your global search form --> | |
</form> |
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
# Shows a list of the 10 top paid apps on the App Store. | |
print 'Loading...' | |
import feedparser | |
import console | |
print 'Fetching Feed...' | |
feed = feedparser.parse('http://itunes.apple.com/us/rss/toppaidapplications/limit=10/xml') | |
entries = feed['entries'] |
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 os | |
import sys | |
import pickle | |
import console | |
# I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder | |
sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')] | |
import dropboxlogin # this code can be found here https://gist.github.com/4034526 | |
STATE_FILE = '.dropbox_state' |
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
drafts://x-callback-url/import_action?type=dropbox&name=TaskPaper%20with%20Indented%20Note&path=%2FTaskPaper%2F&filenametype=2&filename=filename&ext=txt&writetype=0&template=%09-%20%5B%5Btitle%5D%5D%0A%09%09%5B%5Bbody%5D%5D |
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
drafts://x-callback-url/import_action?type=URL&name=Search%20in%20Pinboard&url=https%3A%2F%2Fm.pinboard.in%2Fsearch%2F%3Fquery%3D%5B%5Bdraft%5D%5D%26mine%3DSearch%2BMine |
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 webbrowser | |
import clipboard | |
import Image, ImageFile | |
import datetime | |
import ftplib | |
import urllib | |
from io import BytesIO | |
today = datetime.datetime.now() | |
image = clipboard.get_image() |
OlderNewer