Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mooremo on github.
  • I am mooremo (https://keybase.io/mooremo) on keybase.
  • I have a public key whose fingerprint is C929 9BAB 52CD D4EE C3C3 1CB3 30F0 7178 478B C94E

To claim this, I am signing this object:

@mooremo
mooremo / deep_slice.rb
Created December 5, 2018 22:28
Deep Slice for Ruby Hash
class Hash
def deep_slice(*keys)
# create a new hash to store the results in
# the default value for this hash is an empty hash because it makes the merging code simpler
result = Hash.new { |h, k| h[k] = {} }
# iterate across the given args
keys.each do |key|
# if the key is a hash descend into each sub key and recurse
if key.is_a?(Hash)
key.each_pair do |sub_key, value|
@mooremo
mooremo / gist:688c3b47141296547c01
Created July 31, 2014 11:20
Google Material Design in CSS - Inputs
/* http://codepen.io/sevilayha/pen/IdGKH */
* { box-sizing:border-box; }
/* basic stylings ------------------------------------------ */
body { background:url(http://scotch.io/wp-content/uploads/2014/07/61.jpg); }
.container {
font-family:'Roboto';
width:600px;
margin:30px auto 0;
@mooremo
mooremo / deployment_best_practices_and_friendly_advice.md
Last active August 29, 2015 13:56
Deployment Best Practices and Friendly Advice

Deployment Best Practices and Friendly Advice ™

The Foreword

This document represents a small, but growing, set of learnings and thoughts around how to perform software deployments.

These learnings can come from anywhere in the development workflow once code has begun to be written. This is because, in this humble developers opinion, deployments are a part of the development workflow. If you never deploy the code you write, then it might as well not have been written; therefore we should take the deployment of the code we are writing into consideration as we write it.

I'd like to encourage people to treat this as a living document. Add your own knowledge and experience so that this resource can improve with time.

#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin