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
/** | |
* Implementation of hook_block(). | |
* | |
* Displays the most recent 10 blog titles. | |
*/ | |
function blog_block($op = 'list', $delta = 0) { global $user; if ($op == 'list') { | |
$block[0]['info'] = t('Recent blog posts'); | |
return $block; | |
} else if ($op == 'view') { | |
if (user_access('access content')) { |
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 | |
""" | |
A simple script that scarpes your Pull List from ComiXology. | |
HOWTO: | |
$ python pull_list.py mylesb | |
Daken: Dark Wolverine #8 | |
Hellboy: Buster Oakley Gets His Wish | |
The Li'l Depressed Boy #3 |
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 | |
""" | |
A simple script that creates an OPML file of the RSS feeds to | |
a Twitter user's lists. | |
python twitter_list_to_opml.py mylesb | |
Copyright (c) 2010, Myles Braithwaite <me@mylesbraithwaite.com> | |
All rights reserved. |
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 | |
# This will copy a file, appending the date and time | |
# to the end of the file name. | |
# | |
# http://c.myl.be/8BYj | |
date_formatted=$(date +%Y-%m-%d_%H.%M%S) | |
file_extension=`echo "$1"|awk -F . '{print $NF}'` | |
file_name=`basename $1 .$file_extension` |
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 sys | |
def main(): | |
print "Gob's Program: y/n?" | |
yesorno = raw_input() | |
if yesorno.lower()[0] == 'y': |
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
""" | |
A Read Only Tumblr Python library for their version 2 API. | |
Requires a Tumblr API Key and httplib2. | |
Copyright (c) 2010, Myles Braithwaite <me@mylesbraithwaite.com> | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions |
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
tell application "Things beta" | |
set fileContents to read theFile using delimiter {linefeed} | |
repeat with currentLine in reverse of fileContents | |
set newToDo to make new to do with properties {name:currentLine} | |
end repeat | |
end tell |
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 vobject | |
import datetime | |
from pytz import timezone | |
from dateutil import rrule | |
TIME_ZONE = timezone('US/Eastern') | |
TODAY = datetime.date.today() - datetime.timedelta(days=31) | |
MEETING_START_TIME = datetime.time(19, 30, tzinfo=TIME_ZONE) |
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
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} !^/subdir | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ subdir/$1 [L] |
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
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<img src="//chart.googleapis.com/chart?cht=qr&chs=177x177&ch1={{ url|urlencode }}"> | |
</body> | |
</html> |