This file contains hidden or 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
/** | |
* # USAGE | |
* | |
* phantomjs ./google_search.js 'javascript' | |
* | |
* phantomjs ./google_search.js 'Steven Jobs' > result.csv | |
* | |
*/ | |
var BASE_URL = 'http://www.google.co.jp/search?'; |
This file contains hidden or 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 -*- | |
# | |
# @see https://github.com/Schnouki/twitscreen | |
import urlparse | |
import pygtk | |
pygtk.require('2.0') | |
import gtk, gtkimageview, os, tempfile, webbrowser |
This file contains hidden or 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
// | |
// USAGE: | |
// phantomjs ./login_facebook.js | |
// | |
// EXAMPLE: | |
// phantomjs login_facebook.js | growl -t 'Facebook Auto Login' -H localhost | |
// phantomjs login_facebook.js | cowsay -f daemon | growl -t 'Facebook Auto Login' -H localhost | |
// while; do; phantomjs login_facebook.js | cowsay -f daemon | growl -t 'Facebook Auto Login' -H localhost && sleep 180 ; done | |
// | |
// SCREENSHOT: |
This file contains hidden or 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
>> | |
Hi, | |
We apologize, but the only way we will be able to verify ownership of this account is if you reply to this email with an attached color image of your government-issued photo identification confirming your full name and date of birth. Rest assured that we will permanently delete your ID from our servers once we have used it to verify the authenticity of your account. | |
Please note that we will not be able to process your request unless you send in proper identification. We apologize for any inconvenience this may cause. | |
Thanks, | |
<< |
This file contains hidden or 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 <UIKit/UIKit.h> | |
@interface UIWebViewBaseTest : NSObject <UIApplicationDelegate> { | |
UIWebView* web; | |
} | |
@property (nonatomic, retain) IBOutlet UIWindow *window; | |
@property (nonatomic, retain) UIWebView* web; |
This file contains hidden or 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
# appengine+zc.buildout+pytest.buildout.cfg | |
# | |
# cp -r google_appengine/new_project_template ./src | |
# python2.5 bootstrap.py -d -c appengine+zc.buildout+pytest.buildout.cfg | |
# ./bin/buildout -v -c appengine+zc.buildout+pytest.buildout.cfg | |
# | |
# # add src/tests.py | |
# # @see http://pytest.org/ | |
# | |
# ./bin/run_tests src/tests.py |
This file contains hidden or 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 time, random, urllib, urllib2, cgi, hmac, hashlib, commands, simplejson | |
from pit import Pit | |
class MyTwitter(object): | |
request_token_url = 'http://twitter.com/oauth/request_token' |
This file contains hidden or 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
// NOTE: 望んだように動かない…… | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
UIWebView* webView = [[[UIWebView alloc] initWithFrame:self.window.frame] autorelease]; | |
webView.delegate = self; | |
NSString* url = @"http://example.com/authorization"; | |
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]]; | |
[self.window addSubview:webView]; |
This file contains hidden or 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 sys | |
sys.path[:0] = ['.', ] | |
# secret.py | |
from secret import ( | |
ID, PASSWORD, | |
) |
This file contains hidden or 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
// こんな感じ?? | |
UIWebView* _webView = [[[UIWebView alloc] init] autorelease]; | |
UIScrollView* webScrollView = [[_webView subviews] lastObject]; | |
if([webScrollView respondsToSelector:@selector(setScrollEnabled:)]){ | |
[webScrollView setScrollEnabled:NO]; | |
} | |
// lastObject がUIScrollView だとは限らない?? | |
UIWebView* _webView = [[[UIWebView alloc] init] autorelease]; |