Skip to content

Instantly share code, notes, and snippets.

@bfitch
bfitch / .vimrc
Created June 24, 2014 16:16
new .vimrc with vundle changes
set nocompatible
filetype off
"-----------------VUNDLE ----------------------
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"let Vundle manage Vundle
Plugin 'gmarik/Vundle.vim'
@bfitch
bfitch / open_spec_file.vim
Created September 21, 2014 00:55
open related spec file in vim
function! OpenSpecFile()
ruby <<EOF
class FileWrapper
def initialize(path)
@path = path
end
def absolute_path
File.expand_path(@path)
end
@bfitch
bfitch / run_js_spec.vim
Created September 21, 2014 00:56
Run JS specs in vim
function! RunJsSpec()
ruby <<EOF
def absolute_path
File.expand_path VIM::evaluate("expand('%:p')")
end
def filename
File.basename(absolute_path)
end
@bfitch
bfitch / reactive_routerer.js
Created August 16, 2015 14:42
reactive-router: Swap rackt/history and crossroads.js for page.js
// reactive-router/index.js
'use strict';
import crossroads from 'crossroads';
import {createHistory} from 'history';
let Router = function (routes, options) {
// let isSilent = false;
@bfitch
bfitch / auth.js
Last active September 26, 2015 21:03
Auth actions
async function login(input, state, output, {hello}) {
hello.init({
google: 'client_id'
});
try {
let response = await hello.login('google');
output.success({accessToken: response.authResponse.access_token});
} catch (error) {
@bfitch
bfitch / computed_decorator.js
Created October 14, 2015 04:48
computed stuff
// ConversationList.js
@Cerebral({}, {
conversations: ['decoratedConversations']
})
class ConversationList extends React.Component {
render() {
return (
{this.props.conversations.map((conversation) => <Conversation key={conversation.uid} conversation={conversation}/>)}
);
@bfitch
bfitch / esnextbin.md
Last active February 4, 2016 21:16
esnextbin sketch
@bfitch
bfitch / esnextbin.md
Last active February 17, 2016 05:02
esnextbin sketch
@bfitch
bfitch / esnextbin.md
Created February 17, 2016 18:16
esnextbin sketch
@bfitch
bfitch / esnextbin.md
Last active March 10, 2016 03:19
esnextbin sketch