Skip to content

Instantly share code, notes, and snippets.

View holgersindbaek's full-sized avatar

Holger Sindbaek holgersindbaek

View GitHub Profile
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
0 libsystem_kernel.dylib 0x000000018abb0ff0 0x18ab92000 + 126960
1 libsystem_c.dylib 0x000000018ab26448 0x18aac3000 + 406600
2 libsystem_c.dylib 0x000000018aafa7e4 0x18aac3000 + 227300
3 libsystem_malloc.dylib 0x000000018abf5dd8 0x18abe4000 + 73176
4 libsystem_malloc.dylib 0x000000018abebea0 0x18abe4000 + 32416
5 libsystem_malloc.dylib 0x000000018abf4718 0x18abe4000 + 67352
6 Slang 0x0000000101ce1ab0 -[FCRSystemMetadata sampleMemoryStats] + 68
7 Slang 0x0000000101ce27e4 __initMemoryMonitor_block_invoke.372 + 44
8 libdispatch.dylib 0x000000018aa690f4 0x18aa68000 + 4340
9 libdispatch.dylib 0x000000018aa7994c 0x18aa68000 + 72012
0 libsystem_kernel.dylib 0x000000018bb44ff0 0x18bb26000 + 126960
1 libsystem_c.dylib 0x000000018baba448 0x18ba57000 + 406600
2 libsystem_c.dylib 0x000000018ba8e7e4 0x18ba57000 + 227300
3 libsystem_malloc.dylib 0x000000018bb89dd8 0x18bb78000 + 73176
4 libsystem_malloc.dylib 0x000000018bb7fea0 0x18bb78000 + 32416
5 libsystem_malloc.dylib 0x000000018bb88718 0x18bb78000 + 67352
6 Slang 0x0000000101cf5ab0 -[FCRSystemMetadata sampleMemoryStats] + 68
7 Slang 0x0000000101cf67e4 __initMemoryMonitor_block_invoke.372 + 44
8 libdispatch.dylib 0x000000018b9fd0f4 0x18b9fc000 + 4340
9 libdispatch.dylib 0x000000018ba0d94c 0x18b9fc000 + 72012
#!/bin/bash
usage () {
echo >&2 "usage: $0 [-h] [-v] [-w|-e]"
}
help () {
usage
cat >&2 <<EOF
frame #129995: 0x0000000100219756 Slang`-[JDStatusBarNotificationViewController supportedInterfaceOrientations](self=0x000000011ce4ce20, _cmd="supportedInterfaceOrientations") + 70 at JDStatusBarNotification.m:573
frame #129996: 0x00000001076d2d6c UIKit`-[UIViewController __supportedInterfaceOrientations] + 701
frame #129997: 0x00000001075694b9 UIKit`-[UIApplicationRotationFollowingController supportedInterfaceOrientations] + 101
frame #129998: 0x0000000100219756 Slang`-[JDStatusBarNotificationViewController supportedInterfaceOrientations](self=0x000000011ce4ce20, _cmd="supportedInterfaceOrientations") + 70 at JDStatusBarNotification.m:573
frame #129999: 0x00000001076d2d6c UIKit`-[UIViewController __supportedInterfaceOrientations] + 701
frame #130000: 0x00000001075694b9 UIKit`-[UIApplicationRotationFollowingController supportedInterfaceOrientations] + 101
frame #130001: 0x0000000100219756 Slang`-[JDStatusBarNotificationViewController supportedInterfaceOrientations](self=0x000000011
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
@holgersindbaek
holgersindbaek / gist:7055188
Created October 19, 2013 12:07
Follow the Rabbit
require 'open-uri'
require 'json'
BASE_URL = "http://letsrevolutionizetesting.com/challenge.json"
@counter = 0
def follow_the_rabbit(url)
json = JSON.parse(open(url).read)
puts " "
@holgersindbaek
holgersindbaek / JSON to map
Created January 30, 2013 18:22
JSON to map
{ "issue" : { "articles" : [ { "article_image_url" : "https://uninkd.s3.amazonaws.com/uploads/tiger.jpg",
"main_text" : "<p>Remember <a href=\"http://37signals.com/svn/posts/3329\">when I said we hired Chris</a> after advertising for a GMT position a few months ago? That was a bit of a fib. We were actually blown away bytwo applications during that go-round and decided to hire both of the candidates we liked. Natalie Keshlear joins us from the venerable community team at <a href=\"http://soundcloud.com/\">SoundCloud</a>. She’ll be working with us from Berlin, Germany.Natalie is originally from Southern California, but moved to Berlin about 2 years ago to work for SoundCloud. She loves it there, but decided she couldn’t pass up an opportunity to stay in a place she loved and work with we <a href=\"http://smiley.37signals.com/\">happy-makers</a>. While we were originally looking for only one more European support team member, we decided to treat Chris and Natalie like Pokémon and caught ‘em all.If y
@holgersindbaek
holgersindbaek / Mapping Local File
Created January 30, 2013 13:29
If I map this with only the issue mapping and leave out the article relationship, then everything is fine. If I include the article relationship, then I get the error: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'RKManagedObjectMappingOperationDataSource must be initialized with a managed object context.'
//Setting up objectmapping for issue
RKObjectMapping *issueMapping = [RKObjectMapping mappingForClass:[Issue class]];
[issueMapping addAttributeMappingsFromDictionary:@{
@"title": @"title",
@"description": @"description",
@"cover_url": @"cover_url",
@"published_at": @"published_at",
@"issue_number": @"issue_number"
}];