Skip to content

Instantly share code, notes, and snippets.

Ole Zorn omz

Block or report user

Report or block omz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ttscoff / searchlink.rb
Last active Jan 5, 2020
SearchLink creates Markdown links from automatic searches based on special syntax.
View searchlink.rb
Shchvova /
Created Aug 27, 2012
Match 3 game for Pythonista app. Yes, typed all on iPad. Copy/Paste it to app
from scene import *
from random import choice, randrange
import sound
TILE_SIZE=64 #size of tile
SDX=4 #selection frame size
M=3 #match 3(?) game
NOS = (-1, -1) #constant to indicate clear selection
FALL_S=0.2 #speed of fall per each tile
FALL_T=0 #constant fall tile
gillibrand /
Created Aug 6, 2012
An Air Hockey game for Pythonista on iPad and iPhone. Yes, I typed this all on my iPad. A little painful.
# Hockey
# A air hockey game for two players. First to
# seven wins.
# Most of the game is drawn with the scene
# module. Goal and winner messages are animated
# with layers.
from scene import *
from sound import *
brentsimmons / EmptyChecks.m
Created Jul 28, 2012
Checking if an object is empty
View EmptyChecks.m
BOOL RSIsEmpty(id obj) {
return obj == nil || obj == [NSNull null] || ([obj respondsToSelector:@selector(length)] && [(NSData *)obj length] == 0) || ([obj respondsToSelector:@selector(count)] && [obj count] == 0);
BOOL RSStringIsEmpty(NSString *s) {
/*22 Feb. 2011: added NSNull check. JSON parser can put a null where we expect a string, and NSNull throws an exception when checking length. Since [NSNull null] is, arguably, emptiness, it makes sense to include it.*/
return s == nil || (id)s == (id)[NSNull null] || [s length] == 0;
tibr / NSFileManager+DoNotBackup.h
Created Mar 8, 2012
Setting the do not backup attribute in different iOS versions
View NSFileManager+DoNotBackup.h
@interface NSFileManager (DoNotBackup)
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL;
Jyczeal / CGFontToFontData.m
Created Feb 23, 2012
Read Table Data from a CGFont, then wrap them into a OTF/TTF font.
View CGFontToFontData.m
typedef struct FontHeader {
int32_t fVersion;
uint16_t fNumTables;
uint16_t fSearchRange;
uint16_t fEntrySelector;
uint16_t fRangeShift;
typedef struct TableEntry {
uint32_t fTag;
You can’t perform that action at this time.