Skip to content

Instantly share code, notes, and snippets.

View gongo's full-sized avatar
🍕
Thanks Driven Development

Wataru MIYAGUNI gongo

🍕
Thanks Driven Development
View GitHub Profile
@gongo
gongo / shellcheck
Last active March 29, 2017 08:15
Shellcheck wrapper using Docker image http://gongo.hatenablog.com/entry/2017/03/28/223757
#!/bin/sh
(
dir="$(cd "$(dirname "$1")" && pwd)"
name="$(basename "$1")"
docker run --rm -v "${dir}:/scripts" koalaman/shellcheck "/scripts/${name}"
)
(require 'gamegrid)
(defconst xmas-tree-buffer-name "*XMASTREE*")
(defconst xmas-tree--display-padding-top 5)
(defconst xmas-tree--display-padding-left 3)
(defvar xmas-tree--display-width)
(defvar xmas-tree--display-height)
(defvar xmas-tree--leafs nil)
@gongo
gongo / main.tf
Last active December 20, 2016 06:40
terraform plan displays "value of 'count' cannot be computed" https://github.com/hashicorp/terraform/issues/10857
# /path/to/main.tf
variable "aws_access_key" {}
variable "aws_secret_key" {}
provider "aws" {
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
region = "ap-northeast-1"
(make-variable-buffer-local
(defvar sushi-bar--conveyor-belt ""))
(make-variable-buffer-local
(defvar sushi-bar--backup-mode-line-format nil))
(defvar sushi-bar--updater-object nil)
(defun sushi-bar--sushi-is-ready-p ()
(eq (random 15) 1))
@gongo
gongo / pizza_order.sh
Last active November 17, 2016 05:24
シェルスクリプトの関数コメントのスタイル、いい感じの模索してる
#!/bin/sh
#
# Short description
#
# Long description (multiline)
# :pizza: :pizza: :pizza:
#
# Examples:
#
@gongo
gongo / line-notify.el
Created October 5, 2016 12:48
Emacs を終了したら LINE に通知が行くやつ
(require 'request)
(defconst line-notify--endpoint
"https://notify-api.line.me/api/notify")
(setq line-notify-token "XXXXXXXXXX")
(defun line-notify-sync (message)
(request
line-notify--endpoint
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("rubykaigi.org") {
body {
background-color: #994444;
background-image: none;
}
}
@gongo
gongo / koukakitai.sh
Last active June 22, 2016 01:35
こう書きたい時あるけど.sh
apt-get install \
apache \ # foo
php \
emacs \ # editor
vim
@gongo
gongo / Gemfile
Created March 12, 2016 10:38
[Turnip Example] hook to after scenario step https://groups.google.com/forum/#!topic/ruby-turnip/WRD0WXqQsYc
source "https://rubygems.org"
gem "turnip"
gem 'rspec'