I hereby claim:
- I am sskirby on github.
- I am seank (https://keybase.io/seank) on keybase.
- I have a public key whose fingerprint is F417 A0AB 1343 4478 EC80 403D 6DA5 7F41 B7EE 34C0
To claim this, I am signing this object:
import * as React from 'react' | |
/** | |
* | |
* @param {String} key The key to set in localStorage for this value | |
* @param {Object} defaultValue The value to use if it is not already in localStorage | |
* @param {{serialize: Function, deserialize: Function}} options The serialize and deserialize functions to use (defaults to JSON.stringify and JSON.parse respectively) | |
*/ | |
function useLocalStorageState( |
require 'vorpal' | |
module TreeRepository | |
extend self | |
# The engine is basically the same as the old repository (some methods have been renamed, see below) | |
# but it is not intended to be used directly. | |
engine = Vorpal.define do | |
map Tree do | |
attributes :name |
I hereby claim:
To claim this, I am signing this object:
class Gear | |
attr_reader :chainring, :cog, :wheel | |
def initialize(args) | |
# ... | |
end | |
def gear_inches | |
ratio * wheel.diameter | |
end |
require "mocha/setup" | |
class GearTest < MiniTest::Unit:TestCase | |
def test_calculates_gear_inches | |
gear = Gear.new( | |
chainring: 52, | |
cog: 11, | |
wheel: stub(diameter: 29)) | |
assert_in_delta(137.1, | |
gear.gear_inches, |
class GearTest < MiniTest::Unit:TestCase | |
def test_calculates_gear_inches | |
gear = Gear.new( | |
chainring: 52, | |
cog: 11, | |
wheel: Wheel.new(26, 1.5)) | |
assert_in_delta(137.1, | |
gear.gear_inches, | |
0.01) | |
end |
# Path to your oh-my-zsh configuration. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="bira" | |
# Set to this to use case-sensitive completion |
vnoremap <leader>re :call ExtractVariable()<cr> | |
function! ExtractVariable() | |
let name = input("Variable name: ") | |
if name == '' | |
return | |
endif | |
normal! gv | |
exec "normal c" . name | |
exec "normal! O" . name . " = " | |
normal! $p |
filetype off | |
call pathogen#runtime_append_all_bundles() | |
filetype plugin indent on | |
set nocompatible | |
set hlsearch | |
set number | |
set tabstop=2 | |
set shiftwidth=2 |