Skip to content

Instantly share code, notes, and snippets.

View jonboiser's full-sized avatar

Jonathan Boiser jonboiser

View GitHub Profile
@jonboiser
jonboiser / gist:f042d9f4df08fafc2891
Created April 3, 2015 19:17
Beginning of Mastermind project.
# mastermind implementation
from itertools import *
# functions for AI
# 1. calculate the response for a guess, given the true code
def responseToGuess(guess, true_code):
N = len(guess)
assert N == len(true_code), "Guess is not the same length as true code."
correct_pos = 0
@jonboiser
jonboiser / README.md
Created January 20, 2016 21:44 — forked from jstcki/README.md
Grid layout
@jonboiser
jonboiser / .gitignore
Last active January 27, 2016 16:25 — forked from mbostock/.block
Pan+Zoom
node_modules/
@jonboiser
jonboiser / index.html
Created January 22, 2016 16:05 — forked from stepheneb/index.html
D3 Example: zoom, pan, and axis rescale
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>One Graph</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
<script type="text/javascript" src="simple-graph.js"></script>
<style type="text/css">
body { font: 13px sans-serif; }
rect { fill: #fff; }
@jonboiser
jonboiser / init.vim
Created April 15, 2016 15:12
init.vim
call plug#begin('~/.config/nvim/plugged')
Plug 'sjl/badwolf'
Plug 'rking/ag.vim'
Plug 'editorconfig/editorconfig-vim'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'Chun-Yang/vim-action-ag'
Plug 'kchmck/vim-coffee-script'
Plug 'tpope/vim-sensible'
@jonboiser
jonboiser / notes.md
Last active May 14, 2016 05:48
Notes on "My Spacemacs" by Eivind Fond
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
# classes
class Foo
bar: () => 1
foo = new Foo
foo.bar()
Foo.bar
Foo::bar
# commented
Parinfer
advanced-open-file
atom-fuzzy-grep
atom-material-ui
autocomplete-paths
cursor-history
editorconfig
egghead-react-snippets
emmet
git-plus
ack gnupg2 libusb
antigen gnutls libusb-compat
autoconf gobject-introspection libyaml
automake gpg-agent moreutils
cairo harfbuzz nettle
cask-repair haskell-stack openssl
cf-cli hr pango
coreutils httpie pcre
dirmngr hub pinentry
emacs-plus icu4c pixman