Skip to content

Instantly share code, notes, and snippets.

View hiroakis's full-sized avatar

Hiroaki Sano hiroakis

View GitHub Profile
@hiroakis
hiroakis / fsnotify_example.go
Last active April 17, 2025 00:06
fsnotify example: Detect file changes in real time.
package main
import (
"log"
"os"
"time"
"github.com/fsnotify/fsnotify"
)
@hiroakis
hiroakis / tail.go
Created January 15, 2017 17:14
The tail command implementation written in go. The command support -F option. It is default action.
package main
import (
"flag"
"fmt"
"io"
"os"
"time"
"github.com/fsnotify/fsnotify"
@hiroakis
hiroakis / status.rb
Created April 11, 2017 06:12
mkr command wrapper
require 'json'
service = ARGV[0]
role = ARGV[1]
status = ARGV[2]
roleFullnames = "#{service}:#{role}"
hosts = JSON.parse(`mkr hosts`)
target_host_ids = []
@hiroakis
hiroakis / main.go
Created December 14, 2018 12:19
ast
package main
import (
"bytes"
"fmt"
"go/ast"
"go/parser"
"go/token"
"io"
"log"

Keybase proof

I hereby claim:

  • I am hiroakis on github.
  • I am hiroakis (https://keybase.io/hiroakis) on keybase.
  • I have a public key ASBKQZEisRZCgOs-Cr_5JFfXL-A6nahRyh5F-S_k46tGuAo

To claim this, I am signing this object: