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 | |
# encoding: utf-8 | |
""" | |
CleanDB.py | |
Created by Gordon on 2010-06-03. | |
Copyright (c) 2010 Gordon Fontenot. All rights reserved. | |
""" | |
import sys |
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 "UIImageManipulator.h" | |
@implementation UIImageManipulator | |
static void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWidth, float ovalHeight) | |
{ | |
float fw, fh; | |
if (ovalWidth == 0 || ovalHeight == 0) { | |
CGContextAddRect(context, rect); |
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
if ([url isEqualToString:@"http://www.facebook.com/login.php"]) { | |
[cookies setCookie:testCookie]; // Create the test_cookie as required by login.php | |
} else if ([url isEqualToString:@"http://www.facebook.com/connect/prompt_permission.php"]) { | |
NSArray *cookieJar = [cookies cookies]; | |
for (id aCookie in cookieJar) { | |
[cookies deleteCookie:aCookie]; | |
} | |
} |
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
-(void)createFetchedResultsControllerWithSortOption:(NSInteger)sortOption animated:(BOOL)animated { | |
self.fetchedResultsController.delegate = nil; | |
self.fetchedResultsController = nil; | |
[fetchedResultsController release]; | |
if (animated) { | |
NSMutableIndexSet *sectionsToDelete = [[NSMutableIndexSet alloc] init]; | |
for (int i = 0; i < [self.tableView numberOfSections]; i ++) { | |
[sectionsToDelete addIndex:i]; | |
} |
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
on run | |
tell application "Things" | |
set todoTitles to {} | |
repeat with toDo in to dos of list "Today" | |
set end of todoTitles to the name of toDo | |
end repeat | |
end tell | |
set tid to AppleScript's text item delimiters | |
set AppleScript's text item delimiters 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
-- Tweet current page in Chrome via Cloud.app and Twitter for mac | |
-- cobbled together by @gfontenot | |
-- | |
-- Using most of the original code from: | |
-- »Get ShortURL via Cloud.app« | |
-- by @ptujec | |
-- | |
-- using following sources: | |
-- http://www.leancrew.com/all-this/2007/11/long-and-shortened-url-scripts/ | |
-- by @drdrang |
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 "Finder" | |
set the_file to selection | |
end tell | |
tell application "Yojimbo" | |
import the_file | |
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/ruby | |
# Ruby script to import an RSS feed, for example from InstaPaper or delicious, into Yojimbo | |
# Items already in the Yojimbo Library will not be re-imported unless you delete them from Yojimbo | |
# To use this, you'll need to install rb-appscript with the following two Terminal commands: | |
# sudo gem update --system | |
# sudo gem install rb-appscript | |
# | |
# If you get an with gem update, you may need to update your version of rubygems as follows: | |
# Get latest rubygems from http://rubyforge.org/projects/rubygems/ |
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 "Safari" | |
set the_url to URL of front document | |
end tell | |
tell application "Google Chrome" | |
try | |
set win to first window | |
on error | |
set win to make new window | |
end try |
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
on run | |
tell (current date) | |
set currentDay to day | |
set currentMonth to month of it | |
end tell | |
set theDate to currentMonth & currentDay as string | |
set theIP to do shell script "/usr/bin/curl " & quoted form of "http://icanhazip.com" | |
set this_path to path to me as string |
OlderNewer