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
| # This sends all output from the command to journalctl while allowing CodeDeploy | |
| # agent to capture it as well. It also prefixes the output with timestamps for | |
| # better debugging via CodeDeploy logs. | |
| # | |
| # TODO Consider changing codedeploy-agent to do these things itself. | |
| # | |
| # NOTE Not POSIX compliant; must run in bash or bash masquerading as sh. | |
| # TODO Figure out why codedeploy-agent (using Open3), isn't respecting the | |
| # shebang to all our scripts which are /bin/bash. See: | |
| # https://github.com/aws/aws-codedeploy-agent/issues/71 |
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
| #!/bin/bash | |
| set -ex | |
| # Reproduce bundler issue: | |
| # https://github.com/bundler/bundler/issues/4392 | |
| rm -rf /tmp/bundler-GH-4392 | |
| mkdir -p /tmp/bundler-GH-4392 | |
| cd /tmp/bundler-GH-4392 |
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
| $ bundle package --all --all-platforms --no-install | |
| Fetching source index from https://rubygems.org/ | |
| Resolving dependencies.......... | |
| Using rake 10.5.0 | |
| Using acquia-http-hmac 2.0.0.pre3 from git://github.com/acquia/http-hmac-ruby.git (at 2.0@0776822) | |
| Using i18n 0.7.0 | |
| Using json 1.8.3 | |
| Using minitest 5.8.4 | |
| Using thread_safe 0.3.5 | |
| Using addressable 2.3.8 |
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
| #!/bin/bash | |
| set -ex | |
| # Reproduce bundler issue: | |
| # https://github.com/bundler/bundler/issues/4373 | |
| rm -rf /tmp/bundler-GH-4373 | |
| mkdir -p /tmp/bundler-GH-4373 | |
| cd /tmp/bundler-GH-4373 |
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
| #!/bin/bash | |
| set -ex | |
| # Reproduce bundler bug: | |
| # https://github.com/bundler/bundler/issues/4144 | |
| rm -rf /tmp/bundler-GH-4144 | |
| mkdir -p /tmp/bundler-GH-4144 | |
| cd /tmp/bundler-GH-4144 |
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 'json-schema' | |
| require 'json-schema/validator' | |
| require 'thread' | |
| require 'thwait' | |
| schema = { | |
| "$schema" => "http://json-schema.org/draft-03/schema#", | |
| "properties" => { | |
| "a" => {"type" => "string", "required" => true}, | |
| "b" => {"type" => "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
| module Kernel | |
| alias_method :_aq_original_require, :require | |
| def require(name) | |
| fail 'No loading in threads!' if Thread.main != Thread.current | |
| _aq_original_require(name) | |
| end | |
| 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
| #!/usr/bin/env ruby | |
| # filter git repo to only files interested in by regex | |
| # | |
| # Get all files ever in the repo. | |
| # git log --pretty=format: --name-only --diff-filter=A | sort -u > list.txt | |
| # ruby filter_reduce.rb | tr '\r\n' ' ' > reduced_list.txt | |
| # git filter-branch --index-filter "git rm -rfq --cached --ignore-unmatch $(cat reduced_list.txt)" --prune-empty | |
| list = [] |
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
| stackprof --stackcollapse stackprof.dump | ~/Code/FlameGraph/flamegraph.pl > blah.html; open blah.html |
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
| [1] pry(main)> class Foo | |
| [1] pry(main)* private def bar; end | |
| [1] pry(main)* def baz; end | |
| [1] pry(main)* end | |
| => :baz | |
| [2] pry(main)> Foo.new.baz | |
| => nil | |
| [3] pry(main)> Foo.new.bar | |
| NoMethodError: private method `bar' called for #<Foo:0x007fc34419c6c0> | |
| from (pry):6:in `__pry__' |