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/sh | |
PLIST_BUDDY=/usr/libexec/PlistBuddy | |
function add_compatibility() { | |
"$PLIST_BUDDY" -c "Add DVTPlugInCompatibilityUUIDs:10 string $2" \ | |
"$1/Contents/Info.plist" | |
} | |
function has_compatibility() { |
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
CGRect alertFrame = self.frame; | |
CGFloat oldY = alertFrame.origin.y; | |
alertFrame.origin.y = -alertFrame.size.height; | |
self.frame = alertFrame; | |
[UIView animateWithDuration:.3f animations:^{ | |
CGRect alertFrame = self.frame; | |
alertFrame.origin.y = oldY; | |
self.frame = alertFrame; | |
}]; |
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
<? | |
// Twitter self-hosted image service/url shortener by Ryan Petrich | |
// Installation: | |
// 1. Paste this script into the top of your HTTP root's index.php (rename index.html to index.php if it doesn't exist) | |
// 2. Add the following to your HTTP root's .htaccess file (create .htaccess if it doesn't exist): | |
// ErrorDocument 404 /index.php | |
// 3. Create a "s" subfolder and give it 777 permissions | |
// 4. Add the following as the custom URL for URL shortening in Twitter for iPhone's settings: | |
// http://yourdomain.com/?d=%@&p=password | |
// 5. Add the following as the custom URL for Image service: |
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
/*! | |
* Dynamically changing favicons with JavaScript | |
* Works in all A-grade browsers except Safari and Internet Explorer | |
* Demo: http://mathiasbynens.be/demo/dynamic-favicons | |
*/ | |
// HTML5™, baby! http://mathiasbynens.be/notes/document-head | |
document.head=typeof document.head!="object"?document.getElementsByTagName("head")[0]:document.head; | |
function changeFavicon(src) { |