XcodeProject作成(gitでバージョン管理)
GHUnit用Targetを追加
↓を実行 ruby setup.rb XcodeProjectフォルダ
以下はGHUnit用Targetに対して
| --- Head.c 2009-05-12 14:22:42.000000000 +0900 | |
| +++ Head.c.new 2010-10-21 00:12:25.000000000 +0900 | |
| @@ -59,7 +59,7 @@ | |
| hstrerror(h_errno)); | |
| exit(1); | |
| } | |
| - strncpy(req->ip, inet_ntoa(*(struct in_addr *)he->h_addr), MAXIPSIZ); | |
| + strncpy(req->ip, inet_ntoa(*(struct in_addr *)he->h_addr_list[0]), MAXIPSIZ); | |
| #pragma once | |
| #include <stdlib.h> | |
| #include <stdarg.h> | |
| typedef struct _Class * Class; | |
| struct _Class { | |
| size_t size; | |
| void * (*new)(void *self, va_list *args); |
| framework 'Cocoa' | |
| class AppDelegate | |
| def applicationDidFinishLaunching(notification) | |
| voice_type = "com.apple.speech.synthesis.voice.GoodNews" | |
| @voice = NSSpeechSynthesizer.alloc.initWithVoice(voice_type) | |
| end | |
| def windowWillClose(notification) |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>CFBundleExecutable</key> | |
| <string>statusbar</string> | |
| <key>NSPrincipalClass</key> | |
| <string>NSApplication</string> | |
| <key>LSUIElement</key> | |
| <true/> |
| - (NSString *)runCommand:(NSString *)command { | |
| NSTask *task = [[NSTask alloc] init]; | |
| NSPipe *pipe = [[NSPipe alloc] init]; | |
| [task setLaunchPath: @"/bin/sh"]; | |
| [task setArguments: [NSArray arrayWithObjects:@"-c", command, nil]]; | |
| [task setStandardOutput: pipe]; | |
| [task launch]; | |
| Network Working Group M. Crispin | |
| Request for Comments: 3501 University of Washington | |
| Obsoletes: 2060 March 2003 | |
| Category: Standards Track |
| import System.Time | |
| import System.Locale | |
| import System.Posix.Env | |
| main=do | |
| putEnv("TZ=right/UTC") | |
| interact$unlines.(>>= \s->[formatCalendarTime defaultTimeLocale "%Y-%m-%d %X".toUTCTime$TOD (case(read s::Integer)of;x|x>1230768022->x+1;x->x) 5]).lines |
XcodeProject作成(gitでバージョン管理)
GHUnit用Targetを追加
↓を実行 ruby setup.rb XcodeProjectフォルダ
以下はGHUnit用Targetに対して
| const unichar ch = NSBackspaceCharacter; | |
| NSString *backspace = [NSString stringWithCharacters:&ch length:1]; | |
| NSEvent *e = [NSEvent keyEventWithType:NSKeyDown | |
| location:NSMakePoint(0, 0) | |
| modifierFlags:0 | |
| timestamp:0 | |
| windowNumber:0 | |
| context:[NSGraphicsContext currentContext] | |
| characters:backspace |
| 🐳 |