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 WORKS | |
| require 'ddtrace' | |
| require 'sinatra' | |
| Datadog.configure do |c| | |
| c.use :sinatra | |
| end | |
| get '/' do |
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
| sudo yum install -y git gcc openssl-devel readline-devel zlib-devel; | |
| git clone https://github.com/rbenv/rbenv.git ~/.rbenv; | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile; | |
| echo 'eval "$(rbenv init -)"' >> ~/.bash_profile; | |
| git clone https://github.com/rbenv/ruby-build.git "$($HOME/.rbenv/bin/rbenv root)"/plugins/ruby-build; | |
| echo "=============" | |
| echo "exec $SHELL -l" | |
| echo "curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash" |
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 | |
| for i in {0..10}; do | |
| echo "$i: old version" | |
| if [ $i -eq 5 ]; then | |
| cp loop_new.sh loop.sh | |
| fi | |
| sleep 1 | |
| done |
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
| window.setInterval(function() { | |
| const trendElement = document.querySelector('[aria-label="タイムライン: トレンド"]'); | |
| if (trendElement) { | |
| trendElement.remove(); | |
| } | |
| }, 500); |
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 'faraday' | |
| require 'nokogiri' | |
| require 'json' | |
| require 'time' | |
| require 'dotenv' | |
| Dotenv.load | |
| DEBUG = !ENV['DEBUG'].nil? |
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
| [alias] | |
| cb = rev-parse --abbrev-ref HEAD | |
| p = ! git push origin $(git cb) | |
| pl = ! git pull origin $(git cb) | |
| merged = ! git branch --merged | grep -v '*' | |
| dmerged = ! git pull --prune && git branch -d `git merged` | |
| s = switch |
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 -eu | |
| GCR_HOST="asia.gcr.io" | |
| image_name=$1 | |
| tag_name=${2:-latest} | |
| project_id=${3:-$(gcloud config get-value project)} | |
| if [ "-$image_name" == "-" ]; then | |
| echo "usage: $0 image_name [tag_name] [project_id]" >/dev/null | |
| exit 1 |
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
| [ 'https://github.com/', | |
| 'https://github.githubassets.com/assets/frameworks-41c2037bf12f1e46d8f08b88a04a8d8f.css', | |
| 'https://github.githubassets.com/assets/site-294181adec18ed639e160b96b45d17ac.css', | |
| 'https://github.githubassets.com/assets/github-5604f7ab2b481e74ad33491877db1226.css', | |
| 'https://github.githubassets.com/images/search-key-slash.svg', | |
| 'https://github.githubassets.com/images/modules/site/icons/play-button_white.svg', | |
| 'https://github.githubassets.com/images/modules/site/logos/airbnb-logo.png', | |
| 'https://github.githubassets.com/images/modules/site/logos/sap-logo.png', | |
| 'https://github.githubassets.com/images/modules/site/logos/ibm-logo.png', | |
| 'https://github.githubassets.com/images/modules/site/logos/google-logo.png', |
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
| diff --git a/lib/reish/exenv.rb b/lib/reish/exenv.rb | |
| index 6474995..1818a4b 100644 | |
| --- a/lib/reish/exenv.rb | |
| +++ b/lib/reish/exenv.rb | |
| @@ -120,7 +120,7 @@ module Reish | |
| attr_reader :display_method | |
| def display_mode=(opt) | |
| - if i = IRB::INSPECTORS[opt] | |
| + if i = IRB::Inspector::INSPECTORS[opt] |
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
| //-> % ruby --version | |
| jruby 9.2.0.0 (2.5.0) 2018-05-24 81156a8 Java HotSpot(TM) 64-Bit Server VM 25.152-b16 on 1.8.0_152-b16 +jit [darwin-x86_64] | |
| // -> % ruby -rjson -e 'puts JSON(orig = 1 << 62)' | |
| 4611686018427387904 | |
| // -> % ruby -rjson -e 'puts JSON(orig = 1 << 63)' | |
| Unhandled Java exception: java.lang.ClassCastException: org.jruby.RubyBignum cannot be cast to org.jruby.RubyFixnum | |
| java.lang.ClassCastException: org.jruby.RubyBignum cannot be cast to org.jruby.RubyFixnum | |
| generate at json/ext/Generator.java:224 |
NewerOlder