Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am abrambailey on github.
  • I am funkdified ( on keybase.
  • I have a public key ASBJeh8WilJSq3aIkNH0WaUPwM-mNwwc9AoEzcjlmdJIkgo

To claim this, I am signing this object:

abrambailey / invite-all-users-to-slack-channel.js
Last active Oct 29, 2020
Invite all users to slack channel
View invite-all-users-to-slack-channel.js
var i = 1;
function inviteAllUsers() {
setTimeout(function () {
setTimeout(function() {
setTimeout(function() {
abrambailey /
Last active Jun 30, 2016 — forked from DennisOSRM/
Rebase current branch against origin/qa and squash all commits into a single one
set -e
# Get the current branch name.
branch=`git rev-parse --abbrev-ref HEAD`
# Determine the commit at which the current branch diverged.
ancestor=`git merge-base qa HEAD`
# Stash any uncommited, changed files.
git stash --all
# Revert the branch back to the ancestor SHA.
View gist:32e5c1b5ec4f0e817a67
sudo apt-get -y update
sudo apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev git rbenv
git clone ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
type rbenv
git clone ~/.rbenv/plugins/ruby-build
rbenv install 2.2.0
sudo apt-get -y install nodejs
gem update --system
View gist:3d04ee1572535a97f500
subreddit Last Visited View all »
Never +shortcut
2014-09-14 +shortcut
Never +shortcut
2014-09-14 +shortcut
abrambailey / EnglishHonorifics
Created Feb 9, 2015
English honorifics array
View EnglishHonorifics
View application.rb
#config/boot.rb is loaded
require File.expand_path('../boot', __FILE__)
#reuquires all the railties (active model, active record, etc)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
#Bundler.require(*Rails.groups(:assets => %w(development test)))
Bundler.require(*Rails.groups(:assets => %w(development test))) if defined?(Bundler)
abrambailey / geo_helper.rb
Created Oct 25, 2014
MaxMind GeoIP2 Ruby Helper file
View geo_helper.rb
module GeoHelper
def maxmind_locate
uri = URI("{request.remote_ip}?pretty")
Net::HTTP.start(, uri.port,
:use_ssl => uri.scheme == 'https',
:verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|
abrambailey / gist:dceb8f450b6f139fab2a
Created Aug 10, 2014
How to add Spree to an existing Ruby on Rails application with devise authentication
View gist:dceb8f450b6f139fab2a
gem 'spree', github: 'spree/spree', :branch => '2-3-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-3-stable'
$ bundle install
$ rails g spree:install --migrate=false --sample=false --seed=false
config/initializers/spree.rb by changing this line: Spree.user_class = "Spree::User" to this: Spree.user_class = "User"
$ rake spree_auth:install:migrations
View script.rb
require 'csv'
require 'street_address'
require 'logger'
log =
count = 0
# puts CSV.generate(ARGV[1]) do |csv|
CSV.foreach(ARGV[0], :headers => true) do |row|
if (count == 0)