Skip to content

Instantly share code, notes, and snippets.

Joakim Ekberg kalasjocke

Block or report user

Report or block kalasjocke

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
@kalasjocke
kalasjocke / Dockerfile
Created Feb 25, 2019
Dockerfile with node dependency management
View Dockerfile
FROM node:8.15.0-alpine
ENV NODE_ENV=development
RUN mkdir /usr/dependencies
COPY package.json /usr/dependencies
COPY yarn.lock /usr/dependencies
WORKDIR /usr/dependencies
RUN yarn
ENV NODE_PATH=/usr/dependencies/node_modules
View gist:08a8ae915f6b00b40b30
@mixin with-context {
@content;
@include susy-breakpoint($medium, 9) { @content };
@include susy-breakpoint($large, 12) { @content };
}
View gist:3624f65388d79b74c963
constructor = (spec) ->
that = otherConstructor(spec)
method = ->
doStuff()
that.method = method
that
View gist:5a96eba220c621e55205
{label, select, option, p, button} = React.DOM
p {}, "Some content"
buildTag = (tag) ->
(options...) ->
options.unshift {} if options.length is 1
React.DOM[tag].apply @, options
DOM = (->
View gist:9786174
api = new Api
sinon.stub(api, 'fetchFoo').returns(Q.resolve({}))
sinon.stub(api, 'fetchBar').returns(Q.resolve({}))
Q.all [
api.fetchFoo
api.fetchBar
].then (data) ->
console.log "4. Profit"
View .tmux.conf
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
View .zshrc
if [[ -n $SSH_CONNECTION ]]; then
PROMPT='%{$fg_bold[green]%}λ%{$reset_color%} %~ '
else
PROMPT='%{$fg_bold[green]%}➜%{$reset_color%} %~ $(git_prompt_info)%{$reset_color%}'
fi
View foo.rb
puts ->() {
compose = ->(f, g) {
->(n) { f.(g.(n)) }
}
make_adder = ->(x) {
->(n) { n + x }
}
add1 = make_adder.(1)
You can’t perform that action at this time.