Skip to content

Instantly share code, notes, and snippets.

View kanerogers's full-sized avatar
📹
Reticulating splines

Kane Rogers-Wong kanerogers

📹
Reticulating splines
View GitHub Profile
@kanerogers
kanerogers / fibbonaci.io
Created October 25, 2012 10:55
Fibbonaci sequence finder in Io
main := Object clone
main fb := method(num,
i := 1
last := 0
fib := 0
current := 0
i println
while(fib != num,
fib = fib + 1
public class GenericSimpleCalcFactoryFactory {
class SimpleCalcFactory {
class SimpleCalc {
double number = Integer.parseInt(args[0]);
if (number < 0){
System.out.println(Math.pow(number, 2) + (number/2));
return;
}
call pathogen#infect()
:set shiftwidth=2
:set tabstop=2
:set expandtab
:set smarttab
:set number
filetype plugin on
filetype plugin indent on
@kanerogers
kanerogers / Vim Plugins
Created June 21, 2013 01:23
Vim Plugins
kane@Kanes-MacBook-Pro ⮀ ~ ⮀ ls -lah .vim/bundle
total 0
drwxrwxrwx 11 kane staff 374B 7 May 09:57 .
drwxr-xr-x@ 8 kane staff 272B 20 Jun 16:11 ..
drwxrwxrwx 8 kane staff 272B 5 May 00:30 Conque-Shell
drwxrwxrwx 8 kane staff 272B 5 May 00:30 ctrlp.vim
drwxrwxrwx 10 kane staff 340B 5 May 00:31 syntastic
drwxrwxrwx 8 kane staff 272B 5 May 00:31 vim-colors-solarized
drwxrwxrwx 7 kane staff 238B 5 May 00:31 vim-fugitive
drwxrwxrwx 10 kane staff 340B 5 May 00:31 vim-less
@kanerogers
kanerogers / gist:5855744
Created June 25, 2013 03:35
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
477 l
444 git
424 cd
402 vim
106 rails
58 rm
53 rake
46 fg
43 rc
42 java
import React from 'react';
import TouchableOpacity from 'react-native';
import { connect } from 'react-redux';
export const mapStateToProps = (state) => {
todos: state.todos,
};
export const mapDispatchToProps = (dispatch) => {
toggleTodo: (id) => dispatch({type: 'TOGGLE_TODO', id }),
import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import sinon from 'sinon';
describe('<Todos />', () => {
it('renders the <TodosComponent /> correctly', () => {
const TEST_ONPRESS = sinon.spy();
const TEST_TODOS = [
{ id: 0, text: 'Learn Redux' },
// Continued from the gist above..
it('maps state to props correctly', () => {
const TEST_TODOS = [
{ id: 0, text: 'Learn Redux' },
{ id: 1, text: 'Learn TDD' },
];
const TEST_STATE = { todos: TEST_TODOS };
// Here's how Redux's connect method will define the props for your component.
it('maps dispatch to props correctly', () => {
const DISPATCH_SPY = sinon.spy();
//
const props = mapDispatchToProps(DISPATCH_SPY);
});
{"v":"5.4.4","fr":30,"ip":0,"op":281,"w":1080,"h":1080,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 6","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":21,"s":[100],"e":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":67,"s":[100],"e":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":79,"s":[0],"e":[0]},{"t":81}],"ix":11,"x":"var $bm_rt;\n$bm_rt = loopOut('cycle', 0);"},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[460,561,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"t":21,"s":[0,0],"e":[0,0]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"t":51,"s":[0,0],"e":[20,20]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"t":67,"s":[20,20],"e":[0,0]},{"t":81}],"ix":2,"x":"var $bm_rt;\n$bm_rt = loopOut('cycle', 0);"},"p":