- Clone
$ git clone http://gist.github.com/5675296.git /path/to/somewhere
$ echo 'export PATH="/path/to/somewhere:$PATH"' >> ~/.bashrc
$ source ~/.bashrc
// ==UserScript== | |
// @name Larger SG Selector | |
// @namespace http://ryotarai.info/ | |
// @version 0.1 | |
// @description Why is it too small? | |
// @author Ryota Arai | |
// @match https://*.console.aws.amazon.com/* | |
// @grant none | |
// ==/UserScript== |
#!/usr/bin/env ruby | |
require 'json' | |
require 'terminal-table' | |
def cpu_to_milli(cpu) | |
if cpu =~ /\A(\d+)m\z/ | |
return $1.to_i | |
end | |
return cpu.to_i * 1000 | |
end |
#!/bin/sh | |
CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" | |
if [ -f "${CHROME}.orig" ]; then | |
echo "Spdy already seems to be disable" >&2 | |
exit 1 | |
fi | |
mv "$CHROME" "${CHROME}.orig" | |
cat <<EOC > "$CHROME" |
// ==UserScript== | |
// @name AWS Console Header Color | |
// @namespace http://ryotarai.info/ | |
// @version 0.1 | |
// @description Change color of header | |
// @author Ryota Arai | |
// @match https://*.console.aws.amazon.com/* | |
// @grant none | |
// ==/UserScript== |
#!/usr/bin/env ruby | |
require 'json' | |
require 'shellwords' | |
cid = ARGV[0] | |
JSON.parse(`docker inspect #{cid}`).each do |c| | |
config = c['Config'] | |
args = %w!docker run -it! | |
config['Env'].each do |e| |
require 'ffi' | |
vendor_id = 3141 | |
product_id = 29697 | |
module HidApi | |
extend FFI::Library | |
ffi_lib 'hidapi' | |
attach_function :hid_open, [:int, :int, :int], :pointer |
module Mina | |
module SshHelpers | |
def ssh(cmd, options={}) | |
require 'shellwords' | |
cmd = cmd.join("\n") if cmd.is_a?(Array) | |
# monkey patch | |
cmd = "sudo -u #{Shellwords.escape(execute_as)} bash -c #{Shellwords.escape(cmd)}" if execute_as? | |
# end | |
script = Shellwords.escape(cmd) |