Skip to content

Instantly share code, notes, and snippets.

@cynipe
cynipe / validate_signature.lua
Created February 25, 2015 03:30
Securing Github Webhook Endpoint with Nginx + Lua
-- 多分こんな感じでできる
local x_hub_signature = ngx.hader['X_Hub_Signature']
local body = ngx.req.read_body
local expected_signature = 'sha1=' .. ngx.hmac_sha1(ngx.var.secret_token, body)
if expected_signature ~= x_hub_signature then
ngx.log(ngx.WARN, 'Invalid access detected')
ngx.header.content_type = 'text/plain'
ngx.status = ngx.HTTP_UNAUTHORIZED
ngx.print('401 Access Denied')
@cynipe
cynipe / out.log
Last active August 29, 2015 14:13
❯ mvn -e dbflute:download
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Example Database Manager 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- dbflute-maven-plugin:1.1.0-RC2:download (default-cli) @ example-databases ---
[INFO] ------------------------------------------------------------------------
@cynipe
cynipe / cVimrc
Last active August 29, 2015 14:02
My cVimrc: see https://github.com/1995eaton/chromium-vim for details
set autoupdategist
set noautofocus
let barposition = "top"
let highlight = "#ffff00"
let typelinkhintsdelay = 0
let hintcharacters = "fdsawerjkiop"
let locale="jp"
let scrollstep = 100
map ; :
@cynipe
cynipe / hello_publisher.rb
Created June 6, 2012 04:31
cynipeと読む:Jenkins第一回Rubyプラグイン開発Hackathon開催されるよー!
class HelloPublisher < Jenkins::Tasks::Publisher
display_name "Hello publisher"
# Invoked with the form parameters when this extension point
# is created from a configuration screen.
def initialize(attrs = {})
end
@cynipe
cynipe / git-flow-with-maven-release-plugin.rst
Created March 22, 2012 07:49
git-flow + maven-release-plugin用の手順

git-flow + maven-release-plugin用の手順

前提

プロジェクトのルートPOMに以下の設定が書かれている必要がある。

SCM情報の設定