Skip to content

Instantly share code, notes, and snippets.

Hiroaki Sano hiroakis

Block or report user

Report or block hiroakis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View main.go
package main
import (
hiroakis / status.rb
Created Apr 11, 2017
mkr command wrapper
View status.rb
require 'json'
service = ARGV[0]
role = ARGV[1]
status = ARGV[2]
roleFullnames = "#{service}:#{role}"
hosts = JSON.parse(`mkr hosts`)
target_host_ids = []
hiroakis / tail.go
Created Jan 15, 2017
The tail command implementation written in go. The command support -F option. It is default action.
View tail.go
package main
import (
hiroakis / fsnotify_example.go
Last active Oct 3, 2018
fsnotify example: Detect file changes in real time.
View fsnotify_example.go
package main
import (
View IAM
"Version": "2012-10-17",
"Statement": [
"Effect": "Allow",
"NotAction": "iam:*",
"Resource": "*"
"Effect": "Allow",
touch production staging
mkdir group_vars
touch group_vars/group1
touch group_vars/group2
mkdir host_vars
touch host_vars/hostname1
touch host_vars/hostname2
mkdir library
hiroakis / enqueue.rb
Last active Mar 27, 2017
queue implementation using MySQL
View enqueue.rb
require 'mysql2-cs-bind'
def get_db
:host => 'localhost',
:port => 3306,
:username => 'root',
:password => '',
:database => 'queue_test',
:reconnect => true,
View varnish_memo
backend default {
.host = "";
.port = "8000";
sub vcl_recv {
if (req.request == "POST") {
ban("req.url ~ /");
hiroakis / error
Last active Aug 29, 2015
fluentd 0.10.51 error occurred when "include" tag exists in td-agent.conf
View error
[root@xxxxx gems]# /etc/init.d/td-agent start
Starting td-agent: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/config/parser.rb:57:in `process_include': uninitialized constant Fluent::Config::Parser::URI (NameError)
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/config/parser.rb:41:in `parse!'
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/config/parser.rb:8:in `parse'
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/config.rb:33:in `parse'
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/supervisor.rb:364:in `apply_system_config'
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/supervisor.rb:110:in `initialize'
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/command/fluentd.rb:160:in `new'
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/
hiroakis / client.json
Last active Aug 29, 2015
sensu client example
View client.json
"client": {
"name": "web01",
"address": "",
"subscriptions": [
"keepalive": {
You can’t perform that action at this time.