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
say "Reboot! XCode" | |
set aWorkflow to "/Users/yimajo/Documents/work/Dropbox/Automator/RebootXCode.workflow" | |
set aRes to executeAutomatorWorkflow(aWorkflow) of me | |
on executeAutomatorWorkflow(aWorkflow) | |
set aShell to "/usr/bin/automator " & (quoted form of POSIX path of aWorkflow) | |
with timeout of 3600 seconds | |
try | |
set aRes to (do shell script aShell) | |
on error errorMes |
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)popupView:(UIView *)view | |
{ | |
view.transform = CGAffineTransformScale(CGAffineTransformIdentity,0.5f,0.5f); | |
[UIView animateWithDuration:0.2 | |
delay:0.0 | |
options:UIViewAnimationOptionCurveEaseInOut | |
animations:^{ | |
view.transform = CGAffineTransformScale(CGAffineTransformIdentity,1.2f,1.2f); | |
} |
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 uncaughtExceptionHandler(NSException *exception); | |
void uncaughtExceptionHandler(NSException *exception) | |
{ | |
NSString *crashReport = [NSString stringWithFormat:@"Crash Name:%@\r\n%@\r\nStack Trace:%@",[exception name], [exception reason], [exception callStackSymbols]]; | |
NSString *crashSection = @"====Crash Report===="; | |
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; | |
[ud setObject:[NSString stringWithFormat:@"%@\r\n%@",crashSection,crashReport] forKey:@"CrashReportText"]; |
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
# git settings | |
source /usr/local/git/contrib/completion/git-prompt.sh | |
source /usr/local/git/contrib/completion/git-completion.bash | |
git_ps1_showdirtystate=true | |
export PS1='\h\[\e[0;32m\]\[\e[00m\]:\[\033[34m\]\W \[\033[32m\]\u\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ ' |
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 Foundation | |
import APIKit | |
struct ConnpassAPI {} | |
extension ConnpassAPI { | |
struct SearchResult: Decodable { | |
let events: [Event] | |
} |
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 Foundation | |
import APIKit | |
struct AtndAPI {} | |
extension AtndAPI { | |
struct SearchResult: Decodable { | |
let events: [EventContainer] | |
} |
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
// Kotlin 1.2.51 | |
import kotlinx.coroutines.experimental.async | |
import kotlinx.coroutines.experimental.runBlocking | |
fun main(args: Array<String>) { | |
runBlocking { | |
var jobA = async { job() } | |
var jobB = async { job() } |
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 value: Int? = nil | |
print(value ?? 0 < 1) // この出力はtrueです | |
value = 10 | |
print(value ?? 0 < 1) // Q. この出力は何でしょう? | |
/*: | |
回答の選択肢 | |
- 10 |
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
fun main(args: Array<String>) { | |
var value: Int? = null | |
println(value ?: 0 < 1) // この出力はtrueです | |
value = 10 | |
println(value ?: 0 < 1) // Q. この出力は何でしょう? | |
} | |
/*: | |
回答の選択肢 | |
- 10 |
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
class Hoge {} | |
// Swift 5から | |
protocol ComponentA: Hoge { | |
func name() -> String | |
} | |
// Swift 4でも同じようなことはできた | |
protocol ComponentB where Self: Hoge { | |
func name() -> String |
OlderNewer