Skip to content

Instantly share code, notes, and snippets.

View heiberg's full-sized avatar

Morten Heiberg heiberg

View GitHub Profile

Keybase proof

I hereby claim:

  • I am heiberg on github.
  • I am heiberg (https://keybase.io/heiberg) on keybase.
  • I have a public key whose fingerprint is 2B26 F4DD 4902 F4E1 1BA7 A76A C2CA 3CF2 93BC 0748

To claim this, I am signing this object:

@heiberg
heiberg / README.md
Last active June 9, 2018 18:45
YapDatabaseExtensions and CloudKit

YapDatabaseExtensions and CloudKit

This is a follow-up to this question, seeking advice on how to use YapDatabaseExtensions' value types with the CloudKit extension for YapDatabase.

Dan Thorpe offered some excellent suggestions in the discussion linked above. Many thanks to him. This is my first stab at a solution. I hope I didn't butcher his advice too badly.

Intention

If this is useful to anyone trying to add CloudKit sync to an app using YapDatabaseExtensions and ValueCoding that's terrific.

@heiberg
heiberg / zsh-notes.txt
Created January 23, 2013 21:35
Some notes I made while setting up ZSH for the first time
ZSH and Misc Command Line Notes
===============================
Handy Man Pages
---------------
zshexpn Expansion and substitution
zshmisc "Everything and then some"
@heiberg
heiberg / .zshrc
Created January 23, 2013 21:33
Parts of my .zshrc
# Path to oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
# ZSH_THEME="muse"
# Example aliases
@heiberg
heiberg / NSFileManager+DoNotBackUp.h
Created November 17, 2012 21:05
iOS "Do not backup"
//
// NSFileManager+DoNotBackUp.h
//
// Created by Morten Heiberg on 29/05/12.
// Copyright (c) 2012 Strange Loop. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSFileManager (DoNotBackUp)
@heiberg
heiberg / .bash_profile
Created November 9, 2012 14:19
Bash prompt and git completion
export CLICOLOR=ansi
# --- CHANGE TO WHERE YOU SAVE THE OTHER FILE IN THIS GIST
source ~/Dropbox/Config\ Files/dotfiles/git-completion.bash
function set_prompt {
# Black 0;30 Dark Gray 1;30
# Blue 0;34 Light Blue 1;34
# Green 0;32 Light Green 1;32
@heiberg
heiberg / .bash_profile
Created October 4, 2012 11:30
Mortens .bash_profile
export CLICOLOR=ansi
export PATH="~/Dropbox/Scripts:/usr/local/bin:$PATH"
# Command line completion of git sub-commands, tags, branches etc.
source ~/Dropbox/Config\ Files/dotfiles/git-completion.bash
function set_prompt {
# Black 0;30 Dark Gray 1;30
# Blue 0;34 Light Blue 1;34
@heiberg
heiberg / prompt_with_git_info.bash
Created January 3, 2012 11:50
Bash prompt with Git branch info
# Evaluate my local copy of
# https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
# which also provides TAB-completion of git sub-commands, branches etc.
source ~/Dropbox/Config\ Files/dotfiles/git-completion.bash
function set_prompt {
# Black 0;30 Dark Gray 1;30
# Blue 0;34 Light Blue 1;34
# Green 0;32 Light Green 1;32
@heiberg
heiberg / lovely_charts_crash.txt
Created December 10, 2011 09:55
Lovely Charts crash log
Incident Identifier: DBF26FBF-E56C-40AC-9823-C30A698DFE6F
CrashReporter Key: 839692e91b37d3c1dbf8f449c02c98538f41c896
Hardware Model: iPad1,1
Process: LovelyCharts [9134]
Path: /var/mobile/Applications/6CB0743F-5F74-49CE-B6D8-1E283E52A6B4/LovelyCharts.app/LovelyCharts
Identifier: LovelyCharts
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
@heiberg
heiberg / rvm_trace_install.txt
Created May 24, 2011 06:16
Problematic RVM install with --trace
morten-heibergs-macbook-pro:~ heiberg$ mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 git://github.com/wayneeseguin/rvm.git && cd rvm && ./install --trace
Cloning into rvm...
remote: Counting objects: 4842, done.
remote: Compressing objects: 100% (2497/2497), done.
remote: Total 4842 (delta 3135), reused 3179 (delta 1672)
Receiving objects: 100% (4842/4842), 1.58 MiB | 538 KiB/s, done.
Resolving deltas: 100% (3135/3135), done.
+ ./install : 12 > export rvm_trace_flag=1
+ ./install : 12 > rvm_trace_flag=1
+ ./install : 15 > source /Users/heiberg/.rvm/src/rvm/scripts/functions/installer