Skip to content

Instantly share code, notes, and snippets.

Dirk Holtwick holtwick

Block or report user

Report or block holtwick

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
holtwick / HORegExp.h
Last active Sep 10, 2018
ObjC RegExp Helper with rudimentary named groups
View HORegExp.h
// Copyright 2012 Dirk Holtwick, All rights reserved.
@import Foundation;
#define HORegexDefaultOptions NSRegularExpressionCaseInsensitive | NSRegularExpressionAnchorsMatchLines | NSRegularExpressionAllowCommentsAndWhitespace
@interface HORegexMatch : NSTextCheckingResult
@property (readonly, nonatomic) NSString *text;
@property (readonly, nonatomic) NSTextCheckingResult *match;
holtwick / KeyPathHelper.m
Last active Jun 21, 2018
Autocomplete and refactoring compatible keyPaths:
View KeyPathHelper.m
// (C)opyright 2018-06-20 Dirk Holtwick, All rights reserved.
#import <Foundation/Foundation.h>
#define keyPath(k) YES ? @#k : (k ? @"": nil)
#define keyPathFromObject(o, k) YES ? @#k : ((o ?: o.k) ? @"" : nil)
@interface Sample : NSObject
@property id greeting;
View SeaObject.h
// (C)opyright 2018-04-25 Dirk Holtwick, All rights reserved.
#import <Foundation/Foundation.h>
/* A dictionary like object that allows to define custom dynamic properties
* for typed and easy access. Only simple types like string, number, array and
* dictionary are supported. It is mainly thought to be a convenience class that
* can be serialized easily to JSON and other formats.
* MAKE SURE to add @dynamic for any property you define in a subclass of SeaObject!
holtwick / SeaDataSpeedTests.m
Created Feb 3, 2018
Speed and size testing for JSON, MessagePack, Plist and KeyedArchiver
View SeaDataSpeedTests.m
// (C)opyright 2018-02-03 Dirk Holtwick, All rights reserved.
#import <XCTest/XCTest.h>
#import "MPMessagePack.h"
#import "NSData+GZIP.h"
@interface SeaDataSpeedTests : XCTestCase
holtwick /
Created Dec 7, 2010
Analyze AppStore Daily Reports
import glob
d = {}
for fn in glob.glob('appsales/*.txt'):
lines = open(fn, 'r').readlines()[1:]
# print fn
for l in lines:
l = l.split('\t')
if len(l) == 18: # only newest format
proceeds = float(l[8])
View macro.m
#import <objc/runtime.h>
#import <objc/message.h>
#include <execinfo.h>
#include <stdio.h>
void dumpCall(id *__selfPtr, SEL __cmd) {
// Get argument stack
id __self = *__selfPtr;
holtwick / asmacro.m
Created Oct 29, 2010
Log current method and the arguments passed to that method
View asmacro.m
#import <objc/runtime.h>
#import <objc/message.h>
#include <execinfo.h>
#include <stdio.h>
void dumpCall(id *__selfPtr, SEL __cmd) {
// Get argument stack
id __self = *__selfPtr;
View NSLog printing method name together with passed arguments.m
- (void)test:(id)some second:(id)sec {
// Inspired by
// Find argument stack and skip first arguments
void *stack = &self;
stack += sizeof(self);
stack += sizeof(_cmd);
#!/usr/bin/env python2.6
"""IMAP Incremental Backup Script"""
__version__ = "1.4a"
__author__ = "Rui Carmo ("
__copyright__ = "(C) 2006 Rui Carmo. Code under BSD License.\n(C)"
__contributors__ = "Bob Ippolito, Michael Leonhard, Giuseppe Scrivano <>"
# = Contributors =
# Giuseppe Scrivano: Added support for folders.
# -*- coding: UTF-8 -*-
# Copyright 2009 Dirk Holtwick
import logging
from waveapi import events
You can’t perform that action at this time.