Skip to content

Instantly share code, notes, and snippets.

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers
# get it ready
git bisect start
git bisect good c09c728
git bisect bad e6a0692
# give git a command to run against each commit
git bisect run rspec spec/features/my_broken_spec.rb
@kylesnowschwartz
kylesnowschwartz / simulate-league.py
Created December 1, 2016 04:02
Justins League Simulator
#!/usr/bin/python
import numpy as np
import copy
num_simul = 10000
# get initial standings
init_standings, past_perform, playoff_count = dict(), dict(), dict()
f = open('2016_week12_standings.txt'); lines = f.readlines(); f.close()
for line in lines[1:]: #skips header
module Math
# https://rosettacode.org/wiki/Evaluate_binomial_coefficients#Ruby
# binomial coefficient
def self.bc(n, k)
pTop = (n-k+1 .. n).inject(1, &:*)
pBottom = (2 .. k).inject(1, &:*)
pTop / pBottom
end
end
@kylesnowschwartz
kylesnowschwartz / gist:2978e496972cf7470f6b
Created July 22, 2015 00:02
How to do things on amazon web service
view the contents of your bucket:
aws s3 ls s3://mybucket
recursive uploads/downloads:
aws s3 cp myfolder s3://mybucket/myfolder --recursive
sync contents of local folder to bucket:
aws s3 sync myfolder s3://mybucket/myfolder --exclude *.tmp
https://console.aws.amazon.com/s3/home?region=us-west-2#&bucket=tipjarwellington&prefix=fonts/nexa/
@kylesnowschwartz
kylesnowschwartz / gist:c69516409bbcfdac8ab8
Created July 21, 2015 05:50
How to Open the Bitcoin-Qt wallet program in testnet
/Applications/Bitcoin-Qt.app/Contents//MacOS//Bitcoin-Qt -testnet
# # echo is like puts for bash (bash is the program running in your terminal)
echo "Loading ~/.bash_profile a shell script that runs in every new terminal you open"
# $VARIABLE will render before the rest of the command is executed
echo "Logged in as $USER at $(hostname)"
# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Path for RVM
test -d $HOME/.rvm/bin && PATH=$PATH:$HOME/.rvm/bin