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
vendor/ | |
.bundle/ | |
node_modules/ | |
Gemfile.lock |
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
# -- coding: utf-8 | |
require "pp" | |
require "rubygems" | |
require 'sinatra' | |
require 'sinatra/base' | |
module Sinatra | |
module Helpers | |
class Stream |
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
// ==UserScript== | |
// @name Better Google Groups | |
// @namespace http://uu59.org/ | |
// @version 1.0.0 | |
// @include http://productforums.google.com/forum/* | |
// ==/UserScript== | |
function addStyle(css) { | |
var id = "better-google-groups"; | |
var style = document.querySelector('#' + id); |
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
#!/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} | |
} |
NewerOlder