Skip to content

Instantly share code, notes, and snippets.

View hnakamur's full-sized avatar

Hiroaki Nakamura hnakamur

View GitHub Profile
@udzura
udzura / tutorial.md
Created June 2, 2014 03:31
Hubot + CoffeeScript ではじめるやわらかプログラミング入門

やわらかプログラミング入門

  • Hubot であそぼう


始めに、地図を描く

@shirou
shirou / output_csv.py
Last active August 29, 2015 14:02
ansible callback example 1. create directory "callback_plugin" 2. place one of this file. that's all
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import datetime
format = "%Y-%m-%d %H:%M:%S"
class CallbackModule(object):
def __init__(self):
@tristanfisher
tristanfisher / Ansible-Vault how-to.md
Last active June 11, 2026 13:33
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

Working with ansible-vault


I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

@fujiwara
fujiwara / arch.txt
Created July 2, 2014 05:12
stud / HAProxy SSL benchmark
[ client ] --> [ :8443 stud ] --> [ :8888 haproxy ] ---> [ :80 nginx ]
+---------------------------> [ :9443 haproxy ] -/
@mattn
mattn / moguro.go
Last active August 29, 2015 14:03
./moguro | peco
package main
import (
"fmt"
"strings"
"time"
)
func main() {
time.Sleep(3 * time.Second)
@mopemope
mopemope / example_pongo2.go
Created July 16, 2014 06:45
Gin meets Pongo2 !
package main
import (
"github.com/flosch/pongo2"
"github.com/gin-gonic/gin"
"net/http"
)
type pongoRender struct {
cache map[string]*pongo2.Template
@yi
yi / gist:01e3ab762838d567e65d
Created July 24, 2014 18:52
lua hex <= => string
function string.fromhex(str)
return (str:gsub('..', function (cc)
return string.char(tonumber(cc, 16))
end))
end
function string.tohex(str)
return (str:gsub('.', function (c)
return string.format('%02X', string.byte(c))
end))
@voluntas
voluntas / shiguredo_mqtt_broker_log_summary.rst
Last active June 19, 2024 03:22
時雨堂 MQTT ブローカー開発ログまとめ

時雨堂 MQTT ブローカー開発ログまとめ

日時:2015-01-10
作:@voluntas
バージョン:0.3.4
url:http://voluntas.github.io/

注意

@yuroyoro
yuroyoro / chat-osx.css
Created September 5, 2014 07:07
HipCahtのcssをアレした( ꒪⌓꒪)
/* /Applications/HipChat.app/Contents/Resources/chat-osx.css */
p, div {
font-family: Helvetica;
}
p, div, .nameBlock p, .messageBlock p, .messageBlock div, .messageBlock pre {
/* These are %-based to enable text size scaling options. The default text size is defined
by a function on the WebPreferences object */
font-size: 100%;
@voluntas
voluntas / mqtt_meetup_tokyo_201408_copy.rst
Created September 5, 2014 10:21
(COPY) MQTT Meetup Tokyo 2014.08

(COPY) MQTT Meetup Tokyo 2014.08

概要

内容