Skip to content

Instantly share code, notes, and snippets.

View kaizoa's full-sized avatar

Kai Komoriya kaizoa

View GitHub Profile
@kaizoa
kaizoa / Makefile
Last active May 22, 2017 12:03
Makefileで依存パッケージの更新をしてほしいときだけdep ensureさせる ref: http://qiita.com/kai-zoa/items/596f81fef9d8380c06a2
VENDOR_MD5 := $(shell if [[ -f vendor/lock.md5 ]]; then cat vendor/lock.md5; fi)
GOPKG_MD5 :=
ifneq ($(shell type md5 2> /dev/null),)
GOPKG_MD5 := $(shell md5 -q Gopkg.lock)
endif
ifneq ($(shell type md5sum 2> /dev/null),)
GOPKG_MD5 := $(shell md5sum Gopkg.lock | sed -E 's/ .*//g')
endif
@kaizoa
kaizoa / file0.go
Last active May 17, 2017 04:42
Goでpkg/errorsを使ってスタックトレースを残しつつエラーハンドリングもする ref: http://qiita.com/kai-zoa/items/5503a573ee5d72cbe2ff
package piyo
import (
"github.com/pkg/errors"
"strings"
)
var (
// エラー定義
NotFound = errors.New("not found")
#! /usr/bin/env zsh
fail() {
set +x
echo ERROR: $1 1>&2
exit 1
}
for dep in `echo git zsh`; do
type $dep >/dev/null 2>&1 \
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import commands
import httplib,urllib,base64,json
API_HOST="secure.sakura.ad.jp"
API_ROOT="cloud/zone/is1a/api/cloud/1.1"
ACCESS_TOKEN='ACCESS_TOKEN'
@kaizoa
kaizoa / README.md
Created August 3, 2011 15:56
ctags-go HEAD homebrew formula

Install

  1. install homebrew
  2. place ctags-go.rb into Formula folder: /usr/local/Library/Formula/
  3. run brew install autoconf