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(){url=window.prompt('QRコードにしたいURLをフルパスで入力してね。','http://');if(url!=null&&url!=""){open_url='https://chart.googleapis.com/chart?chs=320x320&cht=qr&chl='+encodeURIComponent(url);location.href=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
1. アプリをデバッグ有効で起動させます | |
adb shell am start -n “[パッケージ名]/[Activity名]" -D | |
2. 起動したアプリのプロセスIDを確認する | |
adb jdwp | |
3. プロセスIDとTCPポートを関連付ける | |
adb forward tcp:8000 jdwp:5718 | |
※「5718」は2番で実行した結果の値です |
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(){x=document;y=window;if(x.selection){query=x.selection.createRange().text;}else if(y.getSelection){query=y.getSelection();}else if(x.getSelection){query=x.getSelection();};query=window.prompt('検索したい単語を入力してね',query);if(query!=null&&query!=""){window.open('http://ejje.weblio.jp/content/'+encodeURIComponent(query),'_blank','');}})(); |
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
for i in `seq -f %03g 1 371`; do mkdir $i; 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
for filename in $(ls *@3x.*); do echo $filename; newFilename=`echo $filename | sed -e 's/@3x/@2x/'`; WIDTH=`gm identify -format "%w" $filename`; (( NEW_WIDTH = $WIDTH / 3 * 2 )); HEIGHT=`gm identify -format "%h" $filename`; (( NEW_HEIGHT = $HEIGHT / 3 * 2 )); echo "${WIDTH}x${HEIGHT}"; echo "${NEW_WIDTH}x${NEW_HEIGHT}"; gm convert -resize "${NEW_WIDTH}x${NEW_HEIGHT}" -unsharp 2x1.4+0.5+0 -quality 100 $filename $newFilename; echo 'done!'; 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
+ (void)sendNetLoggerWithSession:(NSURLSession *)urlSession message:(NSString *)message | |
{ | |
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | |
dateFormatter.dateFormat = @"yyyy-MM-dd HH:mm:ss (A)"; | |
NSString *sendMessage = [NSString stringWithFormat:@"%@ %@", [dateFormatter stringFromDate:[NSDate date]], message]; | |
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://192.168.64.28/"]]; | |
request.HTTPMethod = @"POST"; | |
request.HTTPBody = [sendMessage dataUsingEncoding:NSUTF8StringEncoding]; |
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
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) { | |
ACAccountStore *accountStore = [[ACAccountStore alloc] init]; | |
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter]; | |
__weak typeof(self) weakSelf = self; | |
[accountStore requestAccessToAccountsWithType:accountType | |
options:nil | |
completion:^(BOOL granted, NSError *error) { | |
if (granted) { | |
NSArray *accountArray = [accountStore accountsWithAccountType:accountType]; |
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
(when (>= emacs-major-version 24) | |
;; フォントセットを作る | |
(let* ((fontset-name "myfonts") ; フォントセットの名前 | |
(size 14) ; ASCIIフォントのサイズ [9/10/12/14/15/17/19/20/...] | |
(asciifont "Source Code Pro") ; ASCIIフォント | |
(jpfont "Takaoゴシック") ; 日本語フォント | |
(font (format "%s-%d:weight=normal:slant=normal" asciifont size)) | |
(fontspec (font-spec :family asciifont)) | |
(jp-fontspec (font-spec :family jpfont)) | |
(fsn (create-fontset-from-ascii-font font nil fontset-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
;; 以下の書式に従ってモードラインに日付・時刻を表示する | |
(setq display-time-string-forms | |
'((format "%s/%s/%s(%s) %s:%s" year month day dayname 24-hours minutes) | |
load | |
(if mail " Mail" ""))) | |
;; 時刻表示の左隣に日付を追加。 | |
(setq display-time-kawakami-form t) | |
;; 24時間制 | |
(setq display-time-24hr-format t) |