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
fullName: "+workflow+for_items" | |
state: "success" | |
result: | |
subtaskConfig: | |
+for-0=dir=0=foo: | |
+for_item: | |
+config: | |
rb>: "Workflow.config" | |
+for_paths: | |
for_each>: |
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
timezone: UTC | |
_export: | |
foo: tmp_${session_date_compact} | |
td: | |
database: uu59test | |
+initialize: | |
td_ddl>: | |
create_tables: ["${foo}"] |
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 SqlEruby < Erubis::EscapedEruby | |
def escaped_expr(expr) | |
"#{self.class.to_s}.escape(#{expr})" | |
end | |
def self.escape(str) | |
ActiveRecord::Base.connection.instance_variable_get(:@connection).escape(str.to_s) | |
end | |
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
$ pry -r json -r oj -r yajl | |
[1] pry(main)> json = "[0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100e100]" | |
=> "[0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100e100]" | |
[2] pry(main)> JSON.parse json | |
=> [0.0] | |
[3] pry(main)> Yajl.load json | |
=> [100.0] | |
[4] pry(main)> Oj.load json | |
=> [#<BigDecimal:7faa1e380c00,'0.1E3',9(117)>] | |
[5] pry(main)> RUBY_DESCRIPTION |
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
[Unit] | |
Description=digdag | |
[Service] | |
User=uu59 | |
Restart=always | |
TimeoutStartSec=30s | |
Type=simple | |
ExecStart=/home/uu59/digdag-server/start.bash |
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
#!/usr/bin/env ruby | |
percent = (ENV["D"] || "50").to_i | |
content = ARGF.read | |
if STDOUT.tty? | |
print content.chars.map{|c| next c unless c.match(/[\x20-\x7f]/); rand(1..100) <= percent ? " " : c}.join | |
else | |
print content | |
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
#!/bin/bash | |
set -ue | |
ask() { | |
local default=${2:-""} | |
printf "%s" "${1}: (${default}) " >&2 | |
read in | |
echo ${in:-$default} | |
} |
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 | |
#vim:set ft=bash: | |
set -u | |
ghq-grep() { | |
for repo in $(ghq list); do | |
echo $repo: | |
(cd "$(ghq root)/$repo" && PAGER= git grep --full-name "$@") | |
echo |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 -rubygems -e 'p Gem::Specification.count' | |
560 | |
$ bundle exec ruby -rubygems -e 'p Gem::Specification.count' | |
78 | |
$ bundle exec ruby -rubygems -e 'Bundler.with_clean_env { p Gem::Specification.count }' | |
78 | |
$ bundle exec ruby -rubygems -e 'Bundler.with_clean_env { system("ruby -rubygems -e \"p Gem::Specification.count \"")}' |
NewerOlder