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
#!/bin/sh | |
# settings ========== | |
# src file name | |
fileNamePrefix="ScreenShotFileNameFor5.5inch" | |
offsetFor3_5=20 | |
# dest directory name |
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
#!/bin/sh | |
FrameworkName="MyKitName" | |
rm -rf ./Debug | |
mkdir ./Debug | |
cp -r ./Debug-iphoneos/${FrameworkName}.framework ./Debug/${FrameworkName}.framework | |
lipo -create ./Debug-iphoneos/${FrameworkName}.framework/${FrameworkName} ./Debug-iphonesimulator/${FrameworkName}.framework/${FrameworkName} -output ./Debug/${FrameworkName}.framework/${FrameworkName} |
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
#! /bin/sh | |
## inspired by... | |
## Xcodeのヘッダーに挿入されるテンプレートからCopyrightの'年'表示を消す | http://enamelsystems.com/0001/ | |
## Perl - hogeを含む行を削除するワンライナー - Qiita | http://qiita.com/fieldville/items/401ddc40679a9767f56b | |
## Xcode | |
XCODE=Xcode | |
## Base directory which has Xcode header template. |
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
alias gemgen='rbenv local 2.1.2 && bundle init' | |
alias geminstall='bundle install --path=vendor/bundle --binstubs=vendor/bin' |
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
PS1='\W🍣 \$' |
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
2015-07-16 14:44:42.806 AlcatrazTour[71604:2586803] *** Terminating app due to uncaught exception 'RLMException', reason: 'Index is out of bounds.' | |
*** First throw call stack: | |
( | |
0 CoreFoundation 0x000000010e81bc65 __exceptionPreprocess + 165 | |
1 libobjc.A.dylib 0x0000000110386bb7 objc_exception_throw + 45 | |
2 Realm 0x000000010df7c5e7 -[RLMResults objectAtIndex:] + 343 | |
3 Realm 0x000000010df7e5ae -[RLMResults objectAtIndexedSubscript:] + 62 | |
4 AlcatrazTour 0x000000010dbc6c2c _TFC12AlcatrazTour25PluginTableViewController9tableViewfS0_FTCSo11UITableView21cellForRowAtIndexPathCSo11NSIndexPath_CSo15UITableViewCell + 140 | |
5 AlcatrazTour 0x000000010dbc6f1f _TToFC12AlcatrazTour25PluginTableViewController9tableViewfS0_FTCSo11UITableView21cellForRowAtIndexPathCSo11NSIndexPath_CSo15UITableViewCell + 79 | |
6 UIKit 0x000000010f1bb9e8 -[U |
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
print("hello world") |
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
guard let value != 0 else { | |
// ここでスコープを抜ける処理 | |
return | |
break | |
continue | |
fatalError() | |
} | |
// 上の条件が満たされていることを前提としたコードが書ける | |
print( 100 / value ) |
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
var handle:Handle = File.open(path) | |
// defer はスコープを抜ける直前に"必ず"実行される | |
defer { | |
print("close") | |
handle.close() | |
} | |
// 複数deferすることもできる | |
defer { |
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
repeat { | |
// ここを実行後にexpressionを評価 | |
} while expression | |
// 例 | |
var count = 100 | |
repeat { | |
--count | |
} while count > 0 |
OlderNewer