Skip to content

Instantly share code, notes, and snippets.

View Evan-M's full-sized avatar

Evan Marell Evan-M

View GitHub Profile
# RSpec matcher to spec delegations.
# Forked from https://gist.github.com/ssimeonov/5942729 with fixes
# for arity + custom prefix.
#
# Usage:
#
# describe Post do
# it { should delegate(:name).to(:author).with_prefix } # post.author_name
# it { should delegate(:name).to(:author).with_prefix(:any) } # post.any_name
# it { should delegate(:month).to(:created_at) }
@Evan-M
Evan-M / invalidate-cf-path.rb
Created August 29, 2016 23:07 — forked from rbm/invalidate-cf-path.rb
Invalidate CloudFront path using fog
#!/usr/bin/env ruby -w
require 'rubygems'
require 'fog'
require 'pp'
AWS_ACCESS_KEY = ENV['AWS_ACCESS_KEY_ID']
AWS_SECRET_KEY = ENV['AWS_SECRET_ACCESS_KEY']
def get_cf_connection()
@Evan-M
Evan-M / index.html
Last active August 29, 2015 14:16
Simple Onboarded Flow - Completed
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Simple Onboarding Flow</title>
<script src="https://d237d8mq680mpf.cloudfront.net/onboarded-js/latest/onboarded-js.min.js"
data-style="false">
</script>
@Evan-M
Evan-M / index.html
Last active August 29, 2015 14:16
Blank Onboarded Template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Simple Onboarding Flow</title>
<script src="https://d237d8mq680mpf.cloudfront.net/onboarded-js/latest/onboarded-js.min.js"
data-style="false"
data-flow-auto-start="false">
require 'formula'
class TmuxIterm2 < Formula
url 'http://iterm2.googlecode.com/files/iTerm2-1_0_0_20130122.zip'
sha1 'a5f55b545500ebcb97e842f65ea9c90dd457f228'
head 'git://tmux.git.sourceforge.net/gitroot/tmux/tmux'
depends_on 'pkg-config' => :build
depends_on 'libevent'
#
# = Capistrano database.yml task
#
# Provides a couple of tasks for creating the database.yml
# configuration file dynamically when deploy:setup is run.
#
# Category:: Capistrano
# Package:: Database
# Author:: Simone Carletti <[email protected]>
# Copyright:: 2007-2010 The Authors
#!/bin/bash
# CentOS rbenv system wide installation script
# Forked from https://gist.github.com/1237417
# Installs rbenv system wide on CentOS 5/6, also allows single user installs.
# Install pre-requirements
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
make bzip2 autoconf automake libtool bison iconv-devel git-core
@Evan-M
Evan-M / es.sh
Last active December 18, 2015 22:38 — forked from rajraj/es.sh
#!/bin/bash
# Install depencencies
#yum update
yum install -y java-1.6.0-openjdk.x86_64
# Install Elasticsearch
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.1.noarch.rpm -O /tmp/elasticsearch-0.90.1.noarch.rpm
yum localinstall /tmp/elasticsearch-0.90.1.noarch.rpm --nogpgcheck -y
@Evan-M
Evan-M / gist:5679881
Last active December 17, 2015 22:09
Rails + Devise -> for the Enterprise

LDAP / ActiveDirectory resources

  • [cschiewek / devise_ldap_authenticatable]
  • [ajrkerr / devise_active_directory_authenticatable]

CAS / Resources

  • [nbudin / devise_cas_authenticatable]
  • [rubycas / rubycas-server] - SSO authentication for web applications, implements the server-end of Jasig's CAS protocol.

OAuth

  • [socialcast / devise_oauth2_providable] - Rails3 engine integrating OAuth2 authentication with Devise
# Sublime Text 2 Installation Guide: Ubuntu 13.04 and Elementary OS Luna
## 1. Install Sublime Text 2
Open terminal
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text
## 2. Install Sublime Package Control
- Open Sublime Text Console