Skip to content

Instantly share code, notes, and snippets.

View hkjels's full-sized avatar

Henrik Kjerringvåg hkjels

View GitHub Profile
@staltz
staltz / introrx.md
Last active April 29, 2025 08:33
The introduction to Reactive Programming you've been missing
@mbostock
mbostock / .block
Last active February 9, 2016 01:58
Radial Gradient
license: gpl-3.0
@jbenet
jbenet / simple-git-branching-model.md
Last active April 17, 2025 09:30
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active April 20, 2025 17:02
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@hkjels
hkjels / cd.vim
Created May 28, 2013 22:26
Override native `cd`-command, so that the `z` index is updated with whatever directories you `cd` into.
fun! s:CD(directory)
exec '!cd '.directory
exec 'cd '.directory
endfun
cabbrev cd <c-r>=(getcmdtype()==':' && getcmdpos()==1 ? 'CD' : 'cd')<CR>
@jackrusher
jackrusher / gist:5139396
Last active February 23, 2025 01:28
Hofstadter on Lisp: Atoms and Lists, re-printed in Metamagical Themas.

Hofstadter on Lisp

In the mid-80s, while reading through my roommate's collection of Scientific American back issues, I encountered this introduction to Lisp written by Douglas Hofstadter. I found it very charming at the time, and provide it here (somewhat illegally) for the edification of a new generation of Lispers.

In a testament to the timelessness of Lisp, you can still run all the examples below in emacs if you install these aliases:

(defalias 'plus #'+)
(defalias 'quotient #'/)
(defalias 'times #'*)
(defalias 'difference #'-)