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
//直列かつ同期 | |
dispatch_sync(dispatch_queue_create("sample", DISPATCH_QUEUE_SERIAL), ^{ | |
}); | |
// 並列かつ同期 | |
dispatch_sync(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ | |
}); | |
//直列かつ非同期 | |
dispatch_async(dispatch_get_main_queue(), ^{ |
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 | |
filename=$1 | |
cat ${filename} | while read line | |
do | |
echo `python -c "import sys, urllib as ul; print ul.unquote_plus('${line}')"` | |
done |
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
var casper = require('casper').create(); | |
var url = casper.cli.get(0); | |
var savePath = casper.cli.get(1); | |
var milsec = new Date().getTime(); | |
var saveFile = savePath + "/" + milsec + ".png"; | |
casper.start(); | |
casper.userAgent('Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53'); | |
casper.viewport(750, 1334); | |
casper.open(url); |
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
echo 'au BufRead,BufNewFile *.gradle set filetype=groovy' > ~/.vim/ftdetect/gradle.vim |
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
public class MainActivity extends ActionBarActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
/* | |
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
- (void) cleanUIWebView { | |
self.dataDetectorTypes = UIDataDetectorTypeNone; | |
self.delegate = nil; | |
[self loadHTMLString:@"" baseURL:nil]; | |
[self stopLoading]; | |
[self removeFromSuperview]; | |
[[NSURLCache sharedURLCache] removeAllCachedResponses]; | |
} |