Skip to content

Instantly share code, notes, and snippets.

[core]
editor = emacs
[alias]
squash = "!f(){ CUR=`git rev-parse HEAD` && git reset --soft ${1} && git commit -m \"$(git log --format=%B ${1}..${CUR})\"; };f"
# Simple web server for the local directory
alias webserver='python -m SimpleHTTPServer 8000'
# SSH Keep alive
alias ssh='ssh -o ServerAliveInterval=60'
# Our own executables directory for scripts and the like
#export PATH=~/bin:$PATH
# pretty print json
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Keyboard shortcuts
;;
;; f1 menubar activate
;; f2 jump to header or implementation
;; f3 display line numbers toggle
;; f4 open .emacs
;; f5 list-libraries
;; f8 treemacs
;; f10 new frame
ConsRef ConsCreate(Object car, Object cdr) {
_consMade++;
ConsRef newCons = _ObjectInitialize(ConsTypeIdentifier, &_ConsDealloc, &_ConsDescription);
ConsSetCar(newCons, car);
ConsSetCdr(newCons, cdr);
return newCons;
}
void Retain(Object obj) {
if (obj) {
ObjectState *common = (ObjectState *)obj;
common->refCount += 1;
}
}
void Release(Object obj) {
if (obj) {
ObjectState *common = (ObjectState *)obj;
typedef Object ConsRef;
typedef struct ConsRefState {
ObjectState common;
Object car;
Object cdr;
} ConsRefState;
@djdrzzy
djdrzzy / gist:3696505
Created September 11, 2012 06:35
Reactive-C Object state
typedef struct ObjectState {
ObjectType kind;
RefCount refCount;
DeallocFunc deallocFunc;
DescriptionFunc descriptionFunc;
} ObjectState
@djdrzzy
djdrzzy / gist:3696476
Created September 11, 2012 06:29
Reactive-C Object typedef
typedef void * Object;
@djdrzzy
djdrzzy / objc.cfg
Created April 26, 2011 16:58 — forked from tszming/objc.cfg
My uncrustify config file for objective-c
#
# uncrustify config file for objective-c and objective-c++
#
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs
output_tab_size = 2 # new tab size
indent_columns = output_tab_size
indent_label = 2 # pos: absolute col, neg: relative column
indent_align_assign = FALSE