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
set laststatus=2 " always show the status line | |
let statusHead ="%-.50f\ %h%m%r" | |
let statusBreakPoint ="%<" | |
let statusSeparator ="|" | |
let statusFileType ="%{((&ft\ ==\ \"help\"\ \|\|\ &ft\ ==\ \"\")?\"\":\"[\".&ft.\"]\")}" | |
let statusFileFormat ="[%{(&ff\ ==\ \"unix\")?\"u\":\"d\"}]" | |
let statusAscii ="\{%b:0x%B\}" | |
let statusCwd ="%-.50{getcwd()}" | |
let statusBody =statusFileType.statusFileFormat.statusSeparator.statusAscii.statusSeparator."\ ".statusBreakPoint.statusCwd | |
let statusEncoding ="[%{(&fenc\ ==\ \"\"?&enc:&fenc).(&bomb?\",BOM\":\"\")}]" |
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 "Quicksilver" | |
on process text _text | |
try | |
set the _encodedUrl to _urlEncode(_text) of me | |
set curlCMD to "curl --stderr /dev/null \"http://api.longurl.org/v2/expand?url=" & _encodedUrl & "\"" | |
tell me to set _longURL to (do shell script curlCMD) | |
set AppleScript's text item delimiters to "CDATA[" |
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
[UIView beginAnimations:nil context:nil]; | |
[UIView setAnimationDuration:0.35]; | |
if (self.isFlipped) { | |
[self.textView resignFirstResponder]; | |
self.keyboard.transform = CGAffineTransformMakeRotation(0); | |
self.showHideButton.transform = CGAffineTransformMakeRotation(0); | |
} else { | |
[self.textView becomeFirstResponder]; | |
self.keyboard.transform = CGAffineTransformMakeRotation(M_PI); |
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 |
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
// 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
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
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
<?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 %} |
OlderNewer