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
########################################## | |
# | |
# 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import shutil | |
import json | |
import getopt | |
import urllib2 | |
from urllib import urlencode |
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 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import shutil | |
import json | |
import getopt | |
import urllib2 | |
from urllib import urlencode |
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
APP = Pages | |
WORKSPACE = Pages | |
CONFIG = InHouse | |
SCHEME = PagesInHouse | |
ICON_NAME = [email protected] | |
BASE_URL = http://beta.nsnotfound.com/pages | |
EMAIL_LIST = [email protected] | |
EMAIL_DOMAIN = lexrus.mailgun.org | |
SFTP_SERVER = [email protected] |
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
/** | |
* Loading Indicator | |
* | |
* @author Maikel Daloo | |
* @date 12th March 2013 | |
* | |
* Creates a new module and intercepts all ajax requests. | |
* Every time a request is sent, we display the loading message and increment | |
* the enable_counter variable. Then when requests complete (whether success or error) | |
* we increment the disable_counter variable and we only hide the loading message |
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
myApp.directive('markdown', function () { | |
var converter = new Showdown.converter(); | |
return { | |
restrict: 'AE', | |
link: function (scope, element, attrs) { | |
if (attrs.markdown) { | |
scope.$watch(attrs.markdown, function (newVal) { | |
var html = converter.makeHtml(newVal); | |
element.html(html); | |
}); |
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
NginX/NginX OpenResty的内建及扩展模块的phase先后执行次序: | |
参考: http://wiki.nginx.org/Phases | |
http://blog.sina.com.cn/openresty | |
需要关注的phase有: | |
-1:http config: | |
在/usr/local/openresty/nginx/conf/nginx.conf的http段落有可以载入lua的共用函数, 比如: | |
init_by_lua_file /var/workspace/www/violation_nginx/lf; | |
0.server selection: server(listen, server_name) |
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
# sniproxy example configuration file | |
# lines that start with # are comments | |
# lines with only white space are ignored | |
user daemon | |
# PID file | |
pidfile /var/run/sniproxy.pid | |
resolver { |
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
// Include https://github.com/steipete/Aspects in your project | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
[UIButton aspect_hookSelector:@selector(touchesEnded:withEvent:) withOptions:AspectPositionAfter usingBlock:^(id<AspectInfo> info) { | |
UIButton *button = [info instance]; | |
UIView *topMostView = button.window.subviews.firstObject; | |
[self logSubviews:topMostView]; | |
} error:nil]; | |
return YES; |
OlderNewer