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
Nice to meet you. | |
Hey, can I call you Joe? | |
Thank you. | |
Thank you, Gwen. Thank you. Thank you. | |
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
(load "TouchJSON") | |
(system "curl http://openradar.appspot.com/api/radars > radars.json") | |
(set d ((CJSONDeserializer deserializer) deserializeAsDictionary:(NSData dataWithContentsOfFile:"radars.json") error:nil)) | |
(set radars (d "result")) | |
(puts (radars description)) | |
(puts (radars count)) | |
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
;; use this to create all the linking and assembly tasks to build a standalone "tool" executable | |
(macro tool-tasks | |
(unless (and @arch (@arch length)) | |
(set @arch (list (NSString stringWithShellCommand:"arch")))) | |
(unless @tool_extras | |
(set @tool_extras "")) | |
;; executable architecture-specific executable | |
(set @tool_executables (NSMutableArray array)) |
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
#!/usr/local/bin/nush | |
(function append-to-file (filename text) | |
(unless ((NSFileManager defaultManager) fileExistsAtPath:filename) | |
((NSFileManager defaultManager) createFileAtPath:filename contents:nil attributes:nil)) | |
(set handle (NSFileHandle fileHandleForWritingAtPath:filename)) | |
(handle seekToEndOfFile) | |
(handle writeData:((+ text "\n") dataUsingEncoding:NSUTF8StringEncoding)) | |
(handle closeFile)) | |
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 <Nunja/Nunja.h> | |
#import "NuMongoDB.h" | |
#import "JSON.h" | |
@interface ServerDelegate : NunjaDefaultDelegate | |
{ | |
} | |
@end | |
@implementation ServerDelegate |
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
(load "NuTokyo") | |
(load "NuMongoDB") ;; for BSON wrapper | |
;; Tokyo Cabinet BSON document store example. | |
;; stores documents in a HashDB and builds indexes using BTreeDBs. | |
;; clear all files | |
(system "rm hashdb; rm permalinkindexdb; rm dateindexdb") | |
;; hashdb is used to store all objects |
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
#!/usr/local/bin/nush | |
# pantomime-pop3.nu | |
(load "Pantomime") | |
(class PantomimePOP3Client is NSObject | |
(ivar (id) pop3 (id) user (BOOL) running) | |
(ivar-accessors) | |
(- (void) run is |
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
(load "SKPSMTP") | |
(class SKPSMTPClient is NSObject | |
(ivar (id) smtp (id) user (BOOL) running) | |
(ivar-accessors) | |
(- (void) sendMessage:(id) message is | |
(set @smtp (SKPSMTPMessage new)) | |
(@smtp setFromEmail:(@user username:)) | |
(@smtp setToEmail:(@user username:)) |
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 Cocoa) | |
(set data (NSData dataWithContentsOfFile:"iphone-screenshot.png")) | |
(set image ((NSImage alloc) initWithData:data)) | |
(set oldsize (image size)) | |
(cond ((eq oldsize '(640 960)) | |
(set newsize '(640 920))) | |
;; add more as needed | |
(else (puts "unknown size") |
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
2012-04-18 00:17:57.771 HRM[1137:707] Launching | |
2012-04-18 00:17:57.820 HRM[1137:707] Retrieved peripheral: 1 - ( | |
"<CBConcretePeripheral: 0x1431a0>" | |
) | |
2012-04-18 00:17:57.850 HRM[1137:707] connected | |
2012-04-18 00:17:59.839 HRM[1137:707] Service found with UUID: Generic | |
Access Profile | |
2012-04-18 00:17:59.841 HRM[1137:707] Service found with UUID: Generic | |
Attribute Profile | |
2012-04-18 00:17:59.844 HRM[1137:707] Service found with UUID: Unknown (<180a>) |
OlderNewer