Skip to content

Instantly share code, notes, and snippets.

View inside's full-sized avatar

inside

View GitHub Profile
@inside
inside / lodash-get-to-ramda-path.js
Last active November 14, 2019 16:59
A codemod transforming lodash get to ramda path
// This transform converts stuff like:
//
// import get from 'lodash/get'
// const bar = get(foo, 'foo.bar', 'baz')
//
// to
//
// import { pathOr } from 'ramda'
// const bar = pathOr('baz', ['foo', 'bar'], foo)
//
@inside
inside / .vimrc
Created December 5, 2012 15:08
Vim tab map for completion
" This can conflict with the default mappings provided by snipmate.
" See the after directory in .vim/bundle/snipMate/after
function! SuperCleverTab()
if strpart(getline('.'), 0, col('.') - 1) =~ '^\s*$'
return "\<Tab>"
elseif pumvisible()
return "\<c-n>"
else
if &omnifunc != ''
return "\<C-X>\<C-O>"