Skip to content

Instantly share code, notes, and snippets.

@suzuki
suzuki / init.el
Created March 30, 2015 22:54
markdown-mode (gfm-mode)
(require 'markdown-mode)
(setq my-markdown-gfm-command "/usr/local/bin/marked")
(setq my-markdown-command "/usr/local/bin/markdown")
(cond
((file-exists-p my-markdown-gfm-command)
(setq markdown-command my-markdown-gfm-command)
(setq markdown-command-needs-filename t))
((file-exists-p my-markdown-command)
#!/bin/sh
#
# Setup script for Mac with Homebrew / Homebrew-Cask
#
BASE_DIR='/usr/local'
BASE_BIN="$BASE_DIR/bin"
BASE_SHARE="$BASE_DIR/share"
BREW="$BASE_BIN/brew"
@suzuki
suzuki / keybase.md
Created March 1, 2015 07:29
keybase.md

Keybase proof

I hereby claim:

  • I am suzuki on github.
  • I am suzuki (https://keybase.io/suzuki) on keybase.
  • I have a public key whose fingerprint is E282 0319 8E4A 81D2 95E1 C86C DE9E 587A 5139 9007

To claim this, I am signing this object:

@suzuki
suzuki / Vagrantfile
Created November 20, 2014 13:36
Vagrantfile for Elasticsearch
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define :es1 do |es|
es.vm.box = "chef/debian-7.4"
es.vm.network "private_network", ip: "192.168.33.10"
es.vm.provision "chef_solo" do |chef|
set_es_chef(chef)
chef.json = {
@suzuki
suzuki / default.rb
Created November 20, 2014 13:30
ELasticsearch recipe
apt_repository 'elasticsearch-stable' do
uri 'http://packages.elasticsearch.org/elasticsearch/1.4/debian'
distribution 'stable'
components ['main']
key 'http://packages.elasticsearch.org/GPG-KEY-elasticsearch'
not_if do
File.exists?('/etc/apt/source.list/d/elasticsearch.list')
end
end
group 'suzuki' do
group_name 'suzuki'
action [:create]
end
user 'suzuki' do
comment 'Norio Suzuki'
group 'suzuki'
home '/home/suzuki'
shell '/bin/zsh'
{
"took" : 4,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 11,
{
"snapshots" : [ {
"snapshot" : "snapshot_2",
"indices" : [ "webindex" ],
"state" : "SUCCESS",
"start_time" : "2014-11-13T12:49:23.661Z",
"start_time_in_millis" : 1415882963661,
"end_time" : "2014-11-13T12:49:24.561Z",
"end_time_in_millis" : 1415882964561,
"duration_in_millis" : 900,
{
"snapshots": [
{
"snapshot": "snapshot_1",
"indices": [
"webindex",
"_river",
"logstash-2014.11.12",
"logstash-2014.11.13",
"logstash-2014.11.11",
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 9,