I hereby claim:
- I am cyborch on github.
- I am cyborch (https://keybase.io/cyborch) on keybase.
- I have a public key whose fingerprint is BA58 BDC3 D178 6859 249C 1F71 69E6 4646 F78E 107A
To claim this, I am signing this object:
cd Resources | |
find . -iname '*.png' | grep -v '@x2' | sed 's/.png/@x2.png/g' | xargs ls > /dev/null |
convert original_image.png +dither -deconstruct -layers optimize-transparency -matte -depth 7 \( -clone 0--1 -background none +append -colors 65536 -unique-colors -write mpr:cmap +delete \) -map mpr:cmap better_than_puny.png |
#import <objc/runtime.h> | |
@implementation NSObject (AutoreleaseProperties) | |
- (void)releaseAllProperties { | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
unsigned int outCount, i; | |
objc_property_t *properties = class_copyPropertyList([self class], &outCount); | |
for (i = 0; i < outCount; i++) { | |
objc_property_t property = properties[i]; |
#!/usr/bin/perl | |
@_=<STDIN>; | |
$_=join("",@_); | |
# fix K&R style code | |
s/\s*\n\s*{/ {/gs; | |
s/}\s*\n\s*else/} else/gs; | |
s/ ?\){/\) {/g; | |
# convert "if( something ){" to "if (something) {" | |
s/if\( ?/if \(/g; | |
# ensure that "{" at end of line is preceeded by a space |
How to freak out your friends in case you die: | |
Set up cron job which runs every six months and sends an email | |
to your friends if the modify time of a given file is more than | |
six months ago. The email should include the contents of the file. | |
Update the file once per month with notes and responses to your | |
latest conversations with your friends until the day you die. | |
Result: http://www.huffingtonpost.com/2012/03/14/dead-man-emails-jack-froese_n_1346194.html |
-(BOOL)shouldAutorotate { | |
return YES; | |
} | |
-(NSInteger)supportedInterfaceOrientations { | |
// For some reason this is implemented in iOS5 but I have to do it myself in iOS6. | |
UIInterfaceOrientationMask mask = 0; | |
if ([self shouldAutorotateToInterfaceOrientation: UIInterfaceOrientationPortrait]) | |
mask |= UIInterfaceOrientationMaskPortrait; | |
if ([self shouldAutorotateToInterfaceOrientation: UIInterfaceOrientationLandscapeLeft]) |
How to fix the patent system: | |
Each time a legal entity files a patent the fee doubles. When an entity with patents acquires another entity with patents then the patent fee is recalculated and the difference must be paid to acquire the patents of the new entity. | |
Example: | |
Legal entity A files for its first design patent. The fee is $180. | |
Legal entity A files for its second design patent. The fee is $360. |
#!/bin/bash | |
# Ensure that pwd is $XCS_SOURCE_DIR/my_checkout_folder when | |
# executing this script as a "Before Integration" run script | |
# trigger. | |
# | |
# This should fix an issue in Xcodeserver which causes | |
# submodules to be checked out at HEAD of master branch in stead | |
# of the correct revision as specified in the owning module. | |
for DIR in `git submodule status | awk '{print $2}'` ; do |
I hereby claim:
To claim this, I am signing this object: