This file contains hidden or 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 | |
| # AUTHOR: Zander : zander@xargs.io : @_ZPH | |
| # LICENSE: MIT | |
| # Credit for initial script: http://stackoverflow.com/a/18341108/1930671 | |
| set -o nounset | |
| set -o pipefail | |
| set -o errexit | |
| # set -o xtrace |
This file contains hidden or 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 | |
| staging="blog.xargs.io.staging" | |
| source $HOME/$staging/.envrc | |
| GIT_WORK_TREE=$HOME/$staging/ git checkout -f | |
| cd $HOME/$staging && \ | |
| bundle install && \ | |
| bundle exec rake gen_deploy |
This file contains hidden or 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
| autocmd BufRead,BufNewFile *.go set tabstop=4 shiftwidth=4 noexpandtab softtabstop=4 |
This file contains hidden or 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
| [ { "path": "../../../tmp/rubocop20140513-46031-1gesyur/pr_test.rb", "offenses": [ { "severity": "convention", "message": "Extra empty line detected at body beginning.", "cop_name": "EmptyLinesAroundBody", "corrected": null, "location": { "line": 2, "column": 1, "length": 1 } }, { "severity": "convention", "message": "Missing top-level class documentation comment.", "cop_name": "Documentation", "corrected": null, "location": { "line": 3, "column": 3, "length": 5 } }, { "severity": "convention", "message": "Extra empty line detected at body beginning.", "cop_name": "EmptyLinesAroundBody", "corrected": null, "location": { "line": 4, "column": 1, "length": 1 } }, { "severity": "convention", "message": "Space inside |
This file contains hidden or 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 has_staged_changes? | |
| !system("git diff --quiet --cached 2>/dev/null") | |
| end |
This file contains hidden or 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 'singleton' # => true | |
| # module Kernel | |
| # def d | |
| # DiceBag.instance | |
| # end | |
| # end | |
| module Dice | |
| class String |
This file contains hidden or 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
| --- | |
| github.com: | |
| - protocol: https | |
| user: zph | |
| oauth_token: |
This file contains hidden or 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/ruby | |
| require 'open-uri' | |
| require 'json' | |
| base_link = `git remote -v | head -1` | |
| AUTH_TOKEN = `cat ~/.config/hub | grep oauth | awk '{print $2}'`.chomp | |
| def strip_url(link) |
This file contains hidden or 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
| # TODO: | |
| # - write function to transform jam update to jam upgrade | |
| # Apps | |
| # Port num + 100 reserved for puma control | |
| export COMPANY_PREFIX='RP' | |
| export RP_AG_CONTROL_PORT=9392 | |
| export RP_CONFUSION_CONTROL_PORT=9410 | |
| export RP_PORTAL_CONTROL_PORT=9411 | |
| export RP_RNR_UI_CONTROL_PORT=9413 | |
| export RP_SECRET_TOKEN='pumarules' |
This file contains hidden or 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 'minitest/autorun' # => true | |
| require 'minitest/spec' # => false | |
| require 'minitest/pride' # => true | |
| require_relative 'dicebag' # ~> LoadError: cannot load such file -- /Users/zph/tmp/seeing_is_believing_temp_dir20140505-47830-1l8fiz5/dicebag | |
| describe DiceDSL do | |
| subject { DiceDSL } | |
| describe '5d6' do | |
| let(:str) { '5d6' } | |
| it 'parses correctly' do |