Skip to content

Instantly share code, notes, and snippets.

@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情報の設定

@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 / 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 / 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 / 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 / ugid-mappng.md
Last active August 29, 2015 14:16
WindowsのNFSを使った際のuid,gidマッピング
@cynipe
cynipe / README.md
Last active August 29, 2015 14:16
Github流Makeおじさん(Rubyバージョン)

Github流Makeおじさん(Rubyバージョン)

プロジェクトディレクトリに script ディレクトリを掘ってそこに bootstrap, specs を置いて使う感じ。 以降は script/specs と叩けば確実に全員同じバージョンのライブラリを使ってテストすることが保証される。

なぜGithub流?

boxen/our-boxen, boxen/puppet-xxxx辺りのリポジトリで見かけた手法でおそらくGithub社内での一般的な流儀になっているっぽいから。 Makefileじゃないのはshならどの環境でも入ってるしょ絶対。っていうのがあるからなのかなーと思ってる。

@cynipe
cynipe / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@cynipe
cynipe / SIDECI.md
Created June 11, 2015 10:09
sideciのドキュメントを読みやすくしたった

sideci.ymlファイルをレポジトリのルートディレクトリに配置頂くことで、SideCIの自動コードレビュー機能の設定を行うことが出来ます。 各機能のオン・オフはSideCIの画面上から行えます。また、各機能はカスタマイズなどはそれぞれの機能に準じます。 各機能がサポートしていないカスタマイズ・設定などについてのみ、sideci.ymlファイルで設定することが可能です。

sideci.ymlファイルをサポートしているのは以下の2つの機能です。

  • PHP_CodeSniffer
  • PHP Mess Detector

sideci.ymlの作成

@cynipe
cynipe / Dockerfile
Created June 15, 2015 09:54
俺々R環境
FROM r-base
RUN apt-get -y update \
&& apt-get -y install vim build-essential default-jdk default-jre \
&& R CMD javareconf \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/
RUN install2.r --error RJDBC