Skip to content

Instantly share code, notes, and snippets.

View mknkisk's full-sized avatar
🐈‍⬛
🐈

Keisuke Makino mknkisk

🐈‍⬛
🐈
  • stores, Inc
  • Tokyo, Japan
View GitHub Profile

elasticsearch 1.1.1 and 1.0.3 released

  • Clinton Gormley
  • April 16, 2014

Lucene 4.7.2 ベースの Elasticsearch 1.1.1, Lucene 4.6.1 ベースの Elasticsearch 1.0.3 をリリースしました。

どちらのリリースにも重大なバグフィックスが含まれていますが1.0系を使う特別な理由が無い限りは1.1.1にバージョンアップすることをおすすめします。

@mknkisk
mknkisk / file0.txt
Created November 6, 2014 11:05
iOS8 (Safari8) で "クレジットカードを読み取る" に対応する ref: http://qiita.com/mknkisk/items/7cc2a513fa81cf467188
<input type="text" id="cardNumber" name="cc_number">
@mknkisk
mknkisk / file0.txt
Last active August 29, 2015 14:12
Upgrade MongoDB v2.4.9 => 2.6.6 ref: http://qiita.com/mknkisk/items/ee826d485430e018cd3c
pacman -Syu
@mknkisk
mknkisk / zundoko.rb
Created March 24, 2016 11:05
ZUN ZUN ZUN ZUN DOKO KIYOSHI
module ZunDoko
Z = 'ズン'
D = 'ドコ'
TARGET = [Z, Z, Z, Z, D]
def self.kiyoshi(arr=[])
arr.shift if arr.size > 4
arr << [Z, D].sample
return "#{arr.join("\s")} #{'キ・ヨ・シ!'}" if arr == TARGET
#!/bin/bash
merge_commit=$(ruby -e 'print (File.readlines(ARGV[0]) & File.readlines(ARGV[1])).last' <(git rev-list --ancestry-path $1..master) <(git rev-list --first-parent $1..master))
if git show $merge_commit | grep -q 'pull request'
then
pull_request_number=$(git log -1 --format=%B $merge_commit | sed -e 's/^.*#\([0-9]*\).*$/\1/' | head -1)
url="`hub browse -u`/pull/${pull_request_number}"
echo $url
fi
open $url
@mknkisk
mknkisk / cookbooks_nginx_default.rb
Last active May 14, 2016 17:54
Itamae Nginx Recipe
# Nginx をインストール
package 'nginx'
# Nginx
service 'nginx' do
# サービスの有効化, 起動
action [:enable, :start]
end
require 'spec_helper'
describe package('nginx') do
it { should be_installed }
end
describe service('nginx') do
it { should be_enabled }
it { should be_running }
end
@mknkisk
mknkisk / gist:e27e89ddf89c95bff51befd7ee5f4509
Last active April 18, 2020 18:27
aws glacier -> aws s3
for key in `aws s3api list-objects --bucket {bucket_name} --output json | jq -r '.Contents[].Key'`; do echo $key; aws s3api restore-object --bucket {bucket_name} --key $key --restore-request '{"Days": 1}'; done
for key in `aws s3api list-objects --bucket {bucket_name} --output json | jq -r '.Contents[].Key'`; do echo "\n$key"; aws s3api head-object --bucket {bucket_name} --key $key --output json | jq -r .Restore; done
for key in `aws s3api list-objects --bucket {bucket_name} --prefix {path} --output json | jq -r '.Contents[].Key'`; do echo "\n$key"; aws s3 cp s3://{bucket_name}/$key ./; done
git branch -r --merged master | grep -v -e master -e release -e staging/ | sed -e 's% *origin/%%' | xargs -I% git push --delete origin %
@mknkisk
mknkisk / app.js
Created February 11, 2017 15:45
Install client for airbrake (errbit) for express application
const airbrake = require('airbrake').createClient("your project ID", "your api key")
// errbit run on localhost
airbrake.protocol = 'http'
airbrake.serviceHost = 'localhost:3001'
// By default only the errors from the production environment will get reported
// If you put 'production' in airbrake.env, errors will reported
airbrake.env = 'production'
// routing
app.use('/', index)