Skip to content

Instantly share code, notes, and snippets.

View xvaldetaro's full-sized avatar

Alexandre Valdetaro xvaldetaro

View GitHub Profile
@nanek
nanek / gist:f7f8f4cfd76751e43dd1
Created May 20, 2015 20:46
Disable npm install on ElasticBeanstalk. Only npm rebuild.
commands:
01_fixNpmInstallJustRebuild:
command: sed -i "s/check_call(\[npm_path, 'install'\], cwd=app_path, env=npm_env)/#/g" /opt/elasticbeanstalk/containerfiles/ebnode.py
02_fixNpmInstallJustRebuild:
command: sed -i "s/check_call(\[npm_path, '--production', 'install'\], cwd=app_path, env=npm_env)/#/g" /opt/elasticbeanstalk/containerfiles/ebnode.py
@benwells
benwells / init.coffee
Last active April 2, 2016 19:12
Override escape with jk for use with atom's vim-mode
# ~/.atom/init.coffee
atom.commands.add 'atom-text-editor', 'exit-insert-mode-if-preceded-by-j': (e) ->
editor = @getModel()
pos = editor.getCursorBufferPosition()
range = [pos.traverse([0,-1]), pos]
lastChar = editor.getTextInBufferRange(range)
if lastChar != "j"
e.abortKeyBinding()
else
@gcanti
gcanti / HOC.js
Created September 14, 2016 09:24
/* @flow */
import React from 'react'
import ReactDOM from 'react-dom'
type FunctionComponent<A> = (props: A) => ?React$Element<any>;
type ClassComponent<D, A, S> = Class<React$Component<D, A, S>>;
type Component<A> = FunctionComponent<A> | ClassComponent<any, A, any>;