This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/support/screenshot.rb | |
RSpec.configure do |config| | |
# A work-around to support accessing the current example that works in both | |
# RSpec 2 and RSpec 3. | |
fetch_current_example = RSpec.respond_to?(:current_example) ? | |
proc { RSpec.current_example } : proc { |context| context.example } | |
config.after do | |
example = fetch_current_example.call(self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bootstrap_alert(type, message, options = {}) | |
options.reverse_merge!(dismissable: true) | |
classes = %w(alert) | |
classes << case type | |
when :error, :alert | |
'alert-danger' | |
else | |
'alert-info' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Green="\033[0;32m" | |
Yellow="\033[0;33m" | |
Blue="\033[0;34m" | |
Red="\033[0;31m" | |
GreyB="\033[1;30m" | |
Normal="\033[0m" | |
smiley() { | |
ret_val=$? | |
if [ "$ret_val" = "0" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# POST proxy | |
post '/api/*' do | |
splat = params.delete('splat') | |
RestClient.post "http://#{@dest_host_port}/#{splat}", params | |
end | |
# GET proxy | |
get '/api/*' do | |
splat = params.delete('splat') | |
RestClient.get "http://#{@dest_host_port}/#{splat}", :params => params |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " We don't want vi compatibility. | |
set guifont=Menlo\ For\ Powerline:h10 | |
set guioptions-=m " No menu | |
set guioptions-=T " No toolbar | |
set guioptions+=c " Use console dialogs where possible | |
set modelines=0 | |
set encoding=utf-8 " Necessary to show Unicode glyphs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('underscore'); | |
var config = require('../config'); | |
var envPrefix = 'PREFIX_' | |
var envPrefixLen = envPrefix.length; | |
var envKeys = _.chain(config.base).keys().map(function(key){return envPrefix + key;}).value(); | |
var procEnvOverrides = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a monkey patch to fix the Rails deep_munge issue described here: | |
# https://github.com/rails/rails/issues/13420 | |
# | |
# Rails converts incoming empty array params into nils. This patch reverts that. | |
# This goes in /config/initializers | |
# | |
# Before patch: | |
# | |
# | JSON | Hash | | |
# |----------------------------------|-------------------------| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Starting from the official Elixir 1.3.2 image: | |
# https://hub.docker.com/_/elixir/ | |
FROM elixir:1.3.2 | |
# Based off of a Dockerfile by David Anguita <david@davidanguita.name> | |
MAINTAINER Cory Fabre <cfabre@gmail.com> | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Install hex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clone https://github.com/tmux-plugins/tmux-battery to <tmux-battery-path> | |
# add to .tmux.conf: | |
set -g status-right "#[fg=yellow]#(date +'%a %d') #[fg=green]#(date +'%I:%M%p')#[fg=white] #[bg=black] #{battery_percentage} #{battery_icon} " | |
set -g @batt_charged_icon "🔌" | |
set -g @batt_charging_icon "⚡" | |
set -g @batt_discharging_icon "🔋" | |
set -g @batt_attached_icon "⚠️" |
OlderNewer