Tmux Config

Written By [object Object]

# C-b is "back 1 char" in emacs # Unbind it as the Tmux prefix to not conflict with emacs unbind-key C-b set-option -g prefix C-] # If we change our .tmux.conf and want to reload it quickly bind r source-file ~/.tmux.conf # Use vim movement keys for moving between...

Read more

Analyzing California State Scratchers

Written By [object Object]

Let's figure out the expected loss of playing scratchers. California publishes all of the information we need to determine this at their website http://www.calottery.com/play/scratchers-games/top-prizes-remaining From there, for each game, we can see: Price of a ticket Value of each prize Odds of winning each...

Read more

Using Graphviz DOT for UML

Written By [object Object]

Graphviz DOT, UML, and VIM Prerequisites Graphviz WM Graphviz Vim Plugin (Optional) Grip Github Markdown Previewer (Optional) Add UML Diagrams to your Github README with Graphviz Install the prereqs. If you would rather use some other editor, you can always compile from the command line with dot -Tpng uml.dot...

Read more

Hosting a Node.js process on a non-default port on AWS Elastic Beanstalk

Written By [object Object]

Two things happen that make it difficult to run a Node.js process on a non-default port. First, Elastic Beanstalk uses load balancers. When a request hits your EB DNS (your-app.elasticbeanstalk.com) the load balancer directs the traffic to the least utilized instance (assuming you have multiple ec2 instances...

Read more

Overriding the 'verify' method on MiniTest::Mock

Written By [object Object]

Ran into an interesting problem today in which a method in one of my classes happened to have the same name as a method on my testing framework. I'm pasting a lot of code but highlighting the important details with comments. Contract require_relative './exceptions' require_relative './fulfillment_...

Read more