Skip to content

Instantly share code, notes, and snippets.

View kdubbels's full-sized avatar
🔮
doing orb stuff

Kristofer Dubbels kdubbels

🔮
doing orb stuff
View GitHub Profile
@kdubbels
kdubbels / .tmux.conf
Last active April 7, 2016 18:14
tmux dotfile
unbind C-b
set -g prefix C-s
bind-key -r C-s send-prefix
bind-key u split-window -h
bind-key r source-file ~/.tmux.conf
"~/.tmux.conf reloaded"
bind-key -n C-h select-pane -L
bind-key -n C-j select-pane -D
@kdubbels
kdubbels / README.md
Last active July 10, 2016 19:07
X-Value Mousover with React
@kdubbels
kdubbels / .bash_profile
Created July 27, 2016 16:37
So that .bashrc is automatically loaded when you start up a new Terminal window
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
alias python=python3
alias weather="curl wttr.in"
alias moon="curl wttr.in/Moon"
export HISTIGNORE="history:pwd:ls:ls -la:exit"
@kdubbels
kdubbels / .vimrc
Created July 31, 2016 20:12
Sweet vim setup
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@kdubbels
kdubbels / README.md
Last active October 10, 2016 20:31
A possible React carousel

This carousel illustrates a possible UX for something like pro vs. con content (or point vs. counterpoint). The styling is minimalist for purposes of illustration and emphasizing it's baseline usability. Fork (or just copy and paste) and go wild. Images can also be substituted for text in the individual slides with ease! Headings provided by the Onion without permission (theonion.com).

@kdubbels
kdubbels / README.md
Last active January 12, 2017 02:36
Responsive Line Chart with D3 and React

NOTA BENE: Because Blocks use iFrames, you'll have to open this visualization in its own tab/ window to see the chart resize with the window resize.

For sake of reference, toggle the radio buttons to get .tvs with variable rows of data. Up to several hundred data points will resize with ease, but at over 1000, the browser starts to hurt on window resize.

The line chart itself is, of course, based on Bostock's original example here.

@kdubbels
kdubbels / collatz.js
Created August 17, 2017 00:07
Collatz conjecture in ES6
const collatz = (n) => {
if (n == 1) {
console.log(n);
return 1;
}
if (n % 2 == 0) { // n is even
console.log(n);
return 1 + collatz(n/2)
} else { // n is odd
@kdubbels
kdubbels / palindrome.io
Last active August 28, 2017 07:59
Palindrome Detection in Io
palindrome := method(a, a reverse == a)
palindrome("racecar") // ==> true
palindrome("foobar") // ==> false
require 'sinatra'
get '/hi' do
"Hello World!"
end