Skip to content

Instantly share code, notes, and snippets.

View doolin's full-sized avatar

Dave Doolin doolin

View GitHub Profile
@doolin
doolin / application.rb
Created August 15, 2020 12:35 — forked from shawndrost/application.rb
Single file Rails application
# the new and improved one-file rails app -- now including
require "action_controller/railtie"
class Tester < Rails::Application
config.session_store :cookie_store, :key => '_rails_session'
config.secret_token = '095f674153982a9ce59914b561f4522a'
end
class UsersController < ActionController::Base
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
@doolin
doolin / 15-acme-operations.tf
Created August 8, 2020 18:56 — forked from QuingKhaos/15-acme-operations.tf
Terraform initialization of AWS sub account
// Configure AWS provider
variable "acme_operations" {
default = "ACCOUNTID"
}
provider "aws" {
alias = "acme_operations"
profile = "acme_operations"
region = "${var.aws_default_region}"
shared_credentials_file = "./credentials"
@doolin
doolin / git_abbr.fish
Created August 6, 2019 15:02 — forked from jdiaz5513/git_abbr.fish
Git Abbreviations for Fish
abbr -a -U -- ga 'git add'
abbr -a -U -- gaa 'git add --all'
abbr -a -U -- gbd 'git branch -d'
abbr -a -U -- gbl 'git branch -l'
abbr -a -U -- gbm 'git branch -m'
abbr -a -U -- gc 'git commit'
abbr -a -U -- gc! 'git commit --amend'
abbr -a -U -- gcam 'git commit --all -m'
abbr -a -U -- gcan! 'git commit --all --no-edit --amend'
abbr -a -U -- gcb 'git checkout -b'
@doolin
doolin / pre-push.sh
Created July 24, 2019 21:07 — forked from kirkelifson/pre-push.sh
good git hooks for rails
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'
print_fuck() {
echo "${RED}"
echo " █████▒█ ██ ▄████▄ ██ ▄█▀"
echo "▓██ ▒ ██ ▓██▒▒██▀ ▀█ ██▄█▒ "
echo "▒████ ░▓██ ▒██░▒▓█ ▄ ▓███▄░ "
echo "░▓█▒ ░▓▓█ ░██░▒▓▓▄ ▄██▒▓██ █▄ "

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@doolin
doolin / Xresult
Created October 2, 2013 23:19 — forked from amatsuda/Xresult
% rspec spec/models/user_spec.rb
.F.F.
Failures:
1) User
Failure/Error: it { should query :where => {:name => 'bar'} }
expected [:where] to query {:where=>{:name=>"bar"}}
# ./spec/models/user_spec.rb:6
@doolin
doolin / colortest
Created August 25, 2012 00:51 — forked from BinaryMuse/colortest
perl based color test for your terminal
#!/usr/bin/perl
# by entheon, do whatever the hell you want with this file
print "\n";
print "**************************\n";
print "*XTERM 256Color Test Chart\n";
print "**************************\n";
print "* 16 = black\n";
print "* 255 = white\n";