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 the REPL module | |
// and models | |
let repl = require('repl').start({}); | |
const models = require('./models'); | |
// Make the `models` object | |
// a global variable in the | |
// REPL | |
repl.context.models = models; |
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 ruby | |
#/ Usage: <progname> [options]... | |
#/ How does this script make my life easier? | |
# ** Tip: use #/ lines to define the --help usage message. | |
$stderr.sync = true | |
require 'optparse' | |
# default options | |
flag = false | |
option = "default value" |
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
$ git stash list --format="%gd (%cr): %s" | |
stash@{0} (7 weeks ago): On neuter-mssql-in-prod: neuter in production | |
stash@{1} (6 months ago): On fix-group-messages-being-archived: archived-spec | |
stash@{2} (1 year, 1 month ago): On staff-comments: staff persona test | |
stash@{3} (1 year, 3 months ago): On staffng-integration-tests: 77e5f6c added more to staff flow | |
stash@{4} (1 year, 3 months ago): On staffng-integration-tests: WIP staff onboarding integration test | |
stash@{5} (1 year, 5 months ago): On staff-ng-add-switch-link: 4823a45 Jk don't hardcode | |
stash@{6} (1 year, 6 months ago): On staff-ng-groups: staffng-routing | |
stash@{7} (1 year, 7 months ago): On master: readable policy spec |
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
module NewUserActivation | |
class UnknownStrategyError < ArgumentError | |
def initialize | |
raise self | |
end | |
end | |
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
#!/bin/bash | |
# to run: | |
# $ nohup mem_collector.sh & | |
while : | |
do | |
pids=( $(ps auxwww |egrep 'ruby|bundle' | awk '{print $2}') ) | |
echo $(date) >> ruby_usage.log | |
ps -o pid,pcpu,pmem,rss,args ${pids[@]/#/-p } >> ruby_usage.log |
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
Get the list of ES indices | |
GET <host>:<port>/*/_aliases?pretty | |
{ | |
"development-section-16": { | |
"aliases": {} | |
}, | |
"development-section-15": { | |
"aliases": {} |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
module CharacterizationTestHelpers | |
def currently(description, *options, &block) | |
it("*CURRENTLY* #{description}", *options, &block) | |
end | |
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
git log -p --no-color --since="5 days ago" -S "*" -- CHANGELOG.md |grep -n "+.*\*" | tr -d '+' | sort -r -n | sed 's/^[0-9]*://g' |
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
merge.conflictstyle=diff3 | |
github.user=vinbarnes | |
github.password=MQ3i8x@vq$ODGyKJ | |
alias.st=status | |
alias.ci=commit | |
alias.co=checkout | |
core.repositoryformatversion=0 | |
core.filemode=true | |
core.bare=false | |
core.logallrefupdates=true |