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
| %!PS-Adobe-3.0 EPSF-3.0 | |
| %%BoundingBox: 0 0 288 216 | |
| /pt_per_in 72 def | |
| /mm_per_in 25.4 def | |
| pt_per_in mm_per_in div dup scale | |
| /in { mm_per_in mul } def | |
| % All spatial units below are in millimeters unless otherwise stated. |
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
| Process: Dock [1006] | |
| Path: /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock | |
| Identifier: com.apple.dock | |
| Version: 1.8 (1040.42) | |
| Build Info: Dock-1040042000000000~1 | |
| Code Type: X86-64 (Native) | |
| Parent Process: launchd [222] | |
| Date/Time: 2012-11-10 16:40:10.433 -0800 | |
| OS Version: Mac OS X 10.7.5 (11G56) |
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
| I propose a new statement called (there is a better term for this, but I haven't thought of it) “bitswitch”. | |
| It would work much like a regular switch statement, and could be implemented as a macro on top of it in many languages: | |
| bitswitch(container, test) { | |
| case all: | |
| case single: | |
| case multiple: | |
| case none: | |
| default: //Only meaningful if you don't use all four cases |
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
| 2012-12-17 21:27:34.211 Untitled[10696:707] -1 | |
| 2012-12-17 21:27:34.219 Untitled[10696:707] 0 |
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
| kernel vec4 coreImageKernel(__color startColor, __color endColor) | |
| { | |
| vec2 point = destCoord(); | |
| float angle = atan(point.y, point.x) + radians(180.0); | |
| //Start from the upper middle, not the left middle | |
| angle += radians(90.0); | |
| angle = mod(angle, radians(360.0)); | |
| float fraction = angle / radians(360.0); |
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
| #!/usr/bin/env python | |
| import os | |
| assert os.getcwd() != os.getenv('HOME'), "You REALLY don't want to run this in your Home directory; consider running it within ~/#Deletion-armor.noindex instead (which you should set invisible so Finder doesn't try to examine it)" | |
| for x in xrange(100000000): | |
| f = open('Armor shard #' + str(x), 'w') | |
| f.close() | |
| del f |
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
| #import <Foundation/Foundation.h> | |
| int main(int argc, char *argv[]) { | |
| @autoreleasepool { | |
| /*Note the use of Objective-C method-style return type syntax. | |
| *That's not actually the correct syntax, but the incorrect syntax passes compilation | |
| *without a warning even though these blocks have different and incompatible signatures! | |
| */ | |
| id (^wat)(int x, int y) = (id)^(CGFloat x, CGFloat y) { | |
| return @(hypot(x, y)); |
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
| #include <stdlib.h> | |
| #include <stdio.h> | |
| int main(int argc, char *argv[]) { | |
| double one = 0x100p-8; | |
| printf("one: %f\n", one); | |
| printf("0x100p-8 == 0x1p+0: %d\n", 0x100p-8 == 0x1p+0); | |
| printf("0x100p-8 == 1.0: %d\n", 0x100p-8 == 1.0); | |
| double n = 0xe5p-8, d = 0xffp-8; |
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
| #import <Foundation/Foundation.h> | |
| @class Foo; | |
| static int geti1(Foo *foo); | |
| static int geti2(Foo *foo); | |
| @interface Foo: NSObject | |
| @end |
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
| #import <Foundation/Foundation.h> | |
| static NSString *int32tostr(int value); | |
| int main(int argc, char *argv[]) { | |
| @autoreleasepool { | |
| NSLog(@"%@", int32tostr(1)); | |
| NSLog(@"%@", int32tostr(2)); | |
| NSLog(@"%@", int32tostr(3)); | |
| } |