Skip to content

Instantly share code, notes, and snippets.

🔥
🍖

Norio Suzuki suzuki

🔥
🍖
View GitHub Profile
View sample.sh
#!/bin/sh
DIRS=`find ./ -type d -name .git -depth 3`
for D in $DIRS
do
pushd . > /dev/null
cd $D
echo `dirname $D`
git rev-parse --abbrev-ref HEAD
popd > /dev/null
done
View gist:c2ad457316e378eba3ca
% cat composer.json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/yahoojapan/yconnect-php-sdk"
}
],
"require": {
"yahoojapan/yconnect-php-sdk": "dev-master"
View sample.tsv
We can make this file beautiful and searchable if this error is corrected: Any value after quoted field isn't allowed in line 1.
abc "d"ef ghi
@suzuki
suzuki / init.el
Created Mar 30, 2015
markdown-mode (gfm-mode)
View init.el
(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)
View gist:bc06d156895fc5fbfc7c
#!/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"
View 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 Nov 20, 2014
Vagrantfile for Elasticsearch
View Vagrantfile
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 Nov 20, 2014
ELasticsearch recipe
View default.rb
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
View default.rb
group 'suzuki' do
group_name 'suzuki'
action [:create]
end
user 'suzuki' do
comment 'Norio Suzuki'
group 'suzuki'
home '/home/suzuki'
shell '/bin/zsh'
View output_after_restored.json
{
"took" : 4,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 11,
You can’t perform that action at this time.