Skip to content

Instantly share code, notes, and snippets.

View elijahmurray's full-sized avatar
🧐

Elijah Murray elijahmurray

🧐
View GitHub Profile
@elijahmurray
elijahmurray / setup.sh
Last active October 9, 2023 18:45 — forked from bradp/setup.sh
New Mac Setup Script
# New Mac Setup
read -p "Please enter your email address: " email
echo "Creating an SSH key for you..."
ssh-keygen -t ed25519 -C "$email"
# Start the ssh-agent in the background
eval "$(ssh-agent -s)"
@elijahmurray
elijahmurray / vim-heroku.sh
Created January 22, 2018 15:32 — forked from dvdbng/vim-heroku.sh
Run vim in heroku updated 2017
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -
@elijahmurray
elijahmurray / Ember Environment Setup.md
Last active March 23, 2017 14:48
Notes for Setting up basic environment on new Macbook

brew install node

@elijahmurray
elijahmurray / README.md
Last active August 29, 2015 14:05 — forked from curtisblackwell/README.md
Revised gist for making gutterless columns in bootstrap 2.3

Non-Destructive Sass Twitter Bootstrap Gutterless Fluid Grid Hack

Why?

Sometimes I need a row sans gutters. This uses the same mixins and whathaveyou to create another grid that sits alongside the normal grid.

Difference in Markup

You'll need to wrap your .row-fluid in a .gutterless div.

Code Needed

Easiest if you simply add the _mixins.css.scss to your application. You'll also need to redeclare your variables then:

@elijahmurray
elijahmurray / phone-validator
Created June 17, 2014 18:26
Regex for Phone Validation
def format_phone_number(phone_number)
if phone_number.gsub(/\D/, '').match(/^1?(\d{3})(\d{3})(\d{4})/)
[$1, $2, $3].join('')
end
end
@elijahmurray
elijahmurray / pry-notes.rb
Last active August 29, 2015 14:01
Pry Development
# Launching Pry console session
pry -r ./config/environment
###############
###############
# Set a breakpoint with `binding.pry`
#Access shell mode
@elijahmurray
elijahmurray / common-git-commands.rb
Last active August 29, 2015 14:01
Useful git commands. Used a lot, forgotten just as much.
# reverse uncommitted changes
git clean -fd
# file names of changed files between master branch and your branch
git diff --name-status master..<yourbranch>
# push nonmaster branch to master branch. Optional -f flag to force it
git push [remote-name] [pushed-branch-name]:master
#rename current branch
@elijahmurray
elijahmurray / puma_rails_heroku.rb
Last active August 29, 2015 14:01 — forked from subelsky/puma_rails_heroku.rb
Gist to get sidekiq up and running on heroku with puma.
# Gemfile
gem "puma"
gem 'sidekiq', '~> 2.2.1'
# gem 'autoscaler'
# Procfile
web: bundle exec puma -p $PORT -e $RACK_ENV
# add to config block config/environments/production.rb
# This is becoming deprecated and needs to be updated.
@elijahmurray
elijahmurray / SassMeister-input.scss
Created March 25, 2014 23:33
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
@mixin calc-width($percentage, $width) {
/* Firefox */
width: -moz-calc(#{$percentage} - #{$width});
/* WebKit */
width: -webkit-calc(#{$percentage} - #{$width});