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
[a-zA-Z0-9_]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?!([a-zA-Z0-9]*\.[a-zA-Z0-9]*\.[a-zA-Z0-9]*\.))(?:[A-Za-z0-9](?:[a-zA-Z0-9-]*[A-Za-z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])? |
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
# usage: list_aws_users.sh > list_aws_users.txt | |
# requirements: AWS Command Line Interface | |
# output: ACCESSKEYMETADATA ACCESS_KEY_ID last_used_at Active|Inactive access_key_name | |
# | |
for user in $(aws iam list-users --output text | awk '{print $NF}'); do | |
aws iam list-access-keys --user $user --output text | |
done |
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
Allocated String Report | |
----------------------------------- | |
17486 "/Users/rmurray/.rvm/gems/ruby-2.2.1/gems/better_errors-2.1.1/lib/better_errors/exception_extension.rb" | |
17486 /Users/rmurray/.rvm/gems/ruby-2.2.1/gems/better_errors-2.1.1/lib/better_errors/exception_extension.rb:6 | |
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
suspenders project_name --skip-bundle true --heroku false --skip-turbolinks false --edge false |
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
#!/usr/bin/env bash | |
########################################################################### | |
# Originally written by: Henrik Bengtsson, 2014 | |
# https://github.com/HenrikBengtsson/speedtest-cli-extras | |
# Modified to use IFTTT by: Alasdair Allan, 2015 | |
# License: GPL (>= 2.1) [http://www.gnu.org/licenses/gpl.html] | |
# Usage: | |
# $ speedtest-ifttt.sh --{option} | |
# options: | |
# --header Write headers as first CSV row |
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
# ~/.bashrc | |
open_last_migration(){ | |
subl db/migrate/$(ls db/migrate/ | sort | tail -1) | |
} |
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
local all postgres trust | |
host all postgres 10.200.17.0/24 trust | |
# TYPE DATABASE USER ADDRESS METHOD | |
# "local" is for Unix domain socket connections only | |
local all all trust | |
# IPv4 local connections: | |
host all all 127.0.0.1/32 md5 |
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
require "benchmark/ips" | |
def with_interpolation(a = "a", b = "b") | |
"#{a}--#{b}" | |
end | |
def with_cryptic_percentage(a = "a", b = "b") | |
"%s--%s" % [a,b] | |
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
class StubWorkerService | |
def initialize(method_to_call, *args) | |
@method_to_call = method_to_call | |
@args = args | |
end | |
def subscribe(worker, *_) | |
@worker = worker | |
self | |
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
def m(&block) | |
Benchmark.ms do | |
100.times { yield } | |
end | |
end |