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
#!ruby -rzlib | |
print Zlib.inflate(DATA.read).unpack("B*")[0].tr("01"," #").scan(/.{49}/).join"\n" | |
__END__ | |
x�U�1 | |
1E�(�.�`�`��^%G퍲��Ŷ�W�%���" | |
�6)�|'����1�|�?qa�R��h2�~��|;`�P�JI�F���T��#��h�O.�a�A��8� | |
{�瑋(�\�J�����Z�i�u/��e�p���s{����7�؏�� |
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 | |
set -e -o pipefail | |
container_ids=$(docker ps --format "{{.ID}}") | |
for container_id in $container_ids; do | |
volumes=$(docker inspect $container_id | jq -c '.[0].Mounts[] | select(.Type=="bind") | {Source: .Source, Destination: .Destination}') | |
for volume in $volumes; do | |
echo "Watch $container_id $volume" |
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
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch({ headless: false }); | |
const context = browser.defaultBrowserContext(); | |
await context.overridePermissions('https://stretch3.github.io', ['camera', 'microphone']); | |
const page = (await browser.pages())[0]; | |
await page.goto('https://stretch3.github.io/'); |
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
redis-store: 1.9.0, redis: 4.5.1 | |
redis-store: 1.9.0, redis: 4.6.0 | |
Pipelining commands on a Redis instance is deprecated and will be removed in Redis 5.0.0. | |
redis.multi do | |
redis.get("key") | |
end | |
should be replaced by |
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
gem install rubocop-minitest | |
cat > _tmp-rubocop.yml <<YML | |
require: rubocop-minitest | |
AllCops: | |
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop | |
# to ignore them, so only the ones explicitly set in this file are enabled. | |
DisabledByDefault: true | |
Exclude: |
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 "ipaddr" | |
text = ARGF.read | |
cidrs = [] | |
while (match = text.match(%r[(\d+\.\d+\.\d+\.\d+/\d+)])) | |
cur = IPAddr.new(match[1]) | |
cur_addrs = cur.to_range.to_a | |
cidrs.each do |cidr| | |
puts "overlap: #{cur} x #{cidr}" if cur_addrs.any?{|cur_addr| cidr.to_range.cover?(cur_addr) } | |
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
Fetching gem metadata from https://rubygems.org/........... | |
Resolving dependencies... | |
Using rake 13.0.6 | |
Using concurrent-ruby 1.1.10 | |
Using minitest 5.16.1 | |
Using builder 3.2.4 | |
Using erubi 1.10.0 | |
Using racc 1.6.0 | |
Using rack 2.2.4 | |
Using nio4r 2.5.8 |
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
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
# Activate the gem you are reporting the issue against. |
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 ReplaceWords | |
attr_reader :app | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
binding.irb | |
http_status_code, headers, body = @app.call(env) |
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
copy(document.querySelector("#billSelectDate").innerText + "\t" + document.querySelector("#billFxAmount").innerText); | |
m=window.location.href.match(/bills\?year=(\d+)&month=(\d+)/);year=m[1];month=m[2]; | |
if (month == "1") { | |
year -= 1; | |
month = 12; | |
} else { | |
month -= 1; | |
} | |
window.location.href = "https://console.aws.amazon.com/billing/home?region=ap-northeast-1#/bills?year=" + year + "&month=" + month; |
NewerOlder