Skip to content

Instantly share code, notes, and snippets.

View wnoguchi's full-sized avatar
😀

Wataru Noguchi wnoguchi

😀
View GitHub Profile
@st63jun
st63jun / switch-ruby
Last active August 29, 2015 14:01
switch-ruby
#!/bin/bash
#
# switch-ruby - Simple Ruby switcher
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Jun SAITO <jun.saito@u-cast.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@wnoguchi
wnoguchi / .tmux.conf
Last active August 29, 2015 14:05
Main dotfiles.
#key
set-option -g prefix C-s
unbind-key C-b
bind-key C-s send-prefix
bind s split-window -v
bind v split-window -h
bind j select-pane -D
bind k select-pane -U
bind h select-pane -L
bind l select-pane -R
@tsuda7
tsuda7 / gist:a5c058aab86c909ae005
Last active September 18, 2015 11:21
Hadoop 徹底入門(第2版) 輪読会メモ
  • お膳立て
    • 環境は Vagrant から起動する CentOS
    • JDK7
    • Hadoop ディストリビューションは CDH

Chapter 1 "Hadoop の基礎知識"

Hadoop とは

一言で言うと…

@kkosuge
kkosuge / blog.md
Created October 19, 2011 16:05
10月20日の日記 -Markdownで画像を表示-

Summer

10月20日の日記 -Markdownで画像を表示-

githubなどでファイルの拡張子を.mdにするとMarkdown書けていい感じのHTMLにしてくれますが。
Markdownで画像も表示出来る。知らなかった。

![alt text](http://path/to/img.jpg)
@antaflos
antaflos / foreman-ubuntu-12.04.pxe
Created June 14, 2012 16:34
Foreman Ubuntu 12.04 PXE provision template
default Ubuntu
label Ubuntu
kernel <%= @kernel %>
append initrd=<%= @initrd %> video=vga16fb:off vga16fb.modeset=0 interface=eth0 url=<%= foreman_url("provision")%> ramdisk_size=10800 root=/dev/rd/0 rw auto=true priority=critical hostname=unassigned-hostname DEBCONF_DEBUG=5 language=en locale=en_IE.UTF-8 console-setup/ask_detect=false keyboard-configuration/layoutcode=de console-keymaps-at/keymap=de-latin1-nodeadkeys keyboard-configuration/xkb-keymap=de debian-installer/country=AT debian-installer/fb=false BOOTIF=<%= mac %>
@antaflos
antaflos / foreman-ubuntu-12.04.preseed
Created June 14, 2012 16:33
Foreman Ubuntu 12.04 preseed provision template
d-i debian-installer/language string en
d-i debian-installer/country string AT
d-i debian-installer/locale string en_IE.UTF-8
d-i localechooser/supported-locales en_US.UTF-8, en_IE.UTF-8
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap string de
d-i keyboard-configuration/layoutcode string de
d-i keyboard-configuration/modelcode string pc105
d-i console-keymaps-at/keymap string de-latin1-nodeadkeys
@yasuyk
yasuyk / utf8-mac_2_utf-8.rb
Last active December 11, 2015 02:19
EncodingをUTF8-MacからUTF-8に変換する。Preview.appで開いたPDFの内容をコピペすると、濁点、半濁点が別々の文字になってしまう問題を解決。
#!/usr/bin/env ruby
# http://sssslide.com/speakerdeck.com/a_matsuda/rails3-recipe-book-gaiden#114
ARGV.each do |file|
File.open(file,'r+:UTF8-MAC') do |f|
str = f.read
f.rewind
f.truncate(0)
f.set_encoding('UTF-8')
@bageljp
bageljp / server_create.bash
Last active December 18, 2015 15:59
さくらのクラウドAPI
#!/bin/bash
ACCESS_KEY="<access-key>"
ACCESS_KEY_SECRET="<access-key-secret>"
SERVER_NUM=${1:-1}
HOST_NAME="<hostname>"
DISK_ID="<disk-id>"
SSH_KEY_ID="<ssh-key-id>"
PASSWORD="<password>"
@yoppi
yoppi / a.sh
Created August 2, 2013 04:55
git grepするときにファイルの拡張子で絞り込む
git grep 'hogehoge' -- "*.rb"
@yuya-takeyama
yuya-takeyama / README.md
Last active December 20, 2015 16:48
ネットワークルーター YAMAHA RTX1200 の温度をログに残すヤツ

ネットワークルーター YAMAHA RTX1200 の温度をログに残すヤツ

標準出力に書き出すだけなので、crontab で適当なログファイルに追記するようにリダイレクトするがよろし。
エラー時は non-zero で終了するので cronlog とかで監視もできる。