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
########################################## | |
# | |
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4 | |
# | |
# Version 2.7 | |
# | |
# Latest Change: | |
# - Supports iPhone 5 / iPod Touch 5 (uses Apple's workaround to lipo bug) | |
# | |
# Purpose: |
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 <Twitter/Twitter.h> | |
#import <Accounts/Accounts.h> | |
@interface TWRequest (OAuthEcho) | |
/* | |
* code example: | |
* | |
* NSURL *url = [NSURL URLWithString:@"https://api.twitter.com/1/account/verify_credentials.json"]; |
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
# -*- coding: utf-8 -*- | |
require 'fileutils' | |
require 'date' | |
require 'yaml' | |
require 'uri' | |
require 'rexml/document' | |
include REXML | |
doc = Document.new File.new(ARGV[0]) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom"> | |
<title>{{ site_name }}</title> | |
<subtitle>{{ site_slogan }}</subtitle> | |
<link rel="alternate" type="text/html" href="http://{{ site_domain }}/" /> | |
<link rel="self" type="application/atom+xml" href="{{ feed_url }}" /> | |
<id>http://{{ site_domain }}/</id> | |
<updated>{{ site_updated }}</updated> | |
<rights>Copyright © 2009-2010, {{ site_author }}</rights> | |
{% for article in articles %} |
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 RSSOutHandler(webapp.RequestHandler): | |
def get(self): | |
site_domain = Datum.get('site_domain') | |
site_name = Datum.get('site_name') | |
site_author = Datum.get('site_author') | |
site_slogan = Datum.get('site_slogan') | |
site_analytics = Datum.get('site_analytics') | |
site_updated = Datum.get('site_updated') | |
if site_updated is None: | |
site_updated = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()) |
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
javascript:(function(){window.open('http://3g.sina.com.cn/3g/site/proc/video/show_convert_video.php?url='+encodeURIComponent(location.href)+'&vt=4');})() |
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
// DLog is almost a drop-in replacement for NSLog | |
// DLog(); | |
// DLog(@"here"); | |
// DLog(@"value: %d", x); | |
// Unfortunately this doesn't work DLog(aStringVariable); you have to do this instead DLog(@"%@", aStringVariable); | |
#ifdef DEBUG | |
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); | |
#else | |
# define DLog(...) | |
#endif |
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
property growlAppName : "Growl iChat" | |
property notificationNames : {"Buddy Became Available", ¬ | |
"Buddy Became Unavailable", ¬ | |
"Message Received", ¬ | |
"Completed File Transfer"} | |
property defaultNotificationNames : {"Buddy Became Available", ¬ | |
"Buddy Became Unavailable", ¬ | |
"Message Received", ¬ | |
"Completed File Transfer"} |
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
using terms from application "iChat" | |
on message received message from theBuddy for textChat | |
set whoDidIt to full name of theBuddy | |
set buddyIcon to image of theBuddy | |
tell application "System Events" | |
set frontApp to name of first application process whose frontmost is true | |
end tell | |
tell application frontApp | |
set window_name to name of front window | |
end tell |