Skip to content

Instantly share code, notes, and snippets.

View masahide's full-sized avatar

YAMASAKI Masahide masahide

View GitHub Profile
@masahide
masahide / mackerel-graph-builder.html
Created June 20, 2016 10:55 — forked from stanaka/mackerel-graph-builder.html
save this html as a local file, then open the file.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Mackerel Graph Builder</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
function update() {
var d = $("#def")[0].value;
var o = $("#org")[0].value;
@masahide
masahide / fluentd_hacking_guide.md
Created September 23, 2015 08:56 — forked from sonots/fluentd_hacking_guide.md
Fluentd ソースコード完全解説

Fluentd ソースコード完全解説

英題:Fluentd Hacking Guide

目次

30分しかないため斜線部分は今回省く

  • Fluentd の起動シーケンスとプラグインの読み込み
  • Fluentd の設定ファイルのパース
  • Input Plugin から Output Plugin にデータが渡る流れ
@masahide
masahide / proxy.go
Last active August 29, 2015 14:16 — forked from vmihailenco/proxy.go
package main
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"io"
"log"
"net"
@masahide
masahide / bounded.go
Last active August 29, 2015 14:07 — forked from sudix/bounded.go
Goでのパイプラインとキャンセル http://qiita.com/sudix/items/f95ef0e5bbd0cd3d4378
// Goでのパイプラインとキャンセル http://qiita.com/sudix/items/f95ef0e5bbd0cd3d4378
package main
import (
"crypto/md5"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
vimでシーケンスを作成する。
数値にカーソルを合わせてCtrl + a でカウントアップできますが、
デフォルト設定だと数値が8進数、16進数としてカウントアップします。
業務だと10進数を扱うことのほうが多いと思うので
:set nrformats=
で数値インクリメントオプションをクリアします。
@masahide
masahide / piping.go
Created February 18, 2014 05:00 — forked from kylelemons/piping.go
package main
import (
"bytes"
"exec"
"log"
"os"
)
// Pipeline strings together the given exec.Cmd commands in a similar fashion
- hosts: localhost
connection: local
gather_facts: no
vars:
role: common
tasks:
- name: create directories for ansible files.
file: path={{ item }} state=directory
with_items:
- group_vars