Skip to content

Instantly share code, notes, and snippets.

View nefo-mi's full-sized avatar

Mitsuhide Nefo nefo-mi

View GitHub Profile
@nefo-mi
nefo-mi / gist:1252893
Created September 30, 2011 06:43
CLI DropBoxのLAN Synkを止める
@nefo-mi
nefo-mi / gist:1105648
Created July 26, 2011 00:43
meadowの設定
;;; Window制御
(when window-system
(tool-bar-mode 0)
(menu-bar-mode 0)
(toggle-scroll-bar nil)
(server-start)
)
;;; グローバルキー
(global-set-key "\C-h" 'delete-backward-char)
@nefo-mi
nefo-mi / gist:1064163
Created July 5, 2011 02:19
say "hago" on Linux
% sudo aptitude install festival
% festival
festival> (SayText "Hago")
% echo Hago | text2wave -o hago.wav
% echo ShiniHago | text2wave -o shinihago.wav
@nefo-mi
nefo-mi / gist:996664
Created May 28, 2011 06:25
80個の"="でできた罫線を出力するワンライナー
$ i=0; while [ $i -le 80 ]; do s=$s'='; i=`expr $i + 1`; done;echo $s
$ echo `yes = | head -n 80` |sed 's/\s//g'
$ echo `yes = | head -n 80` |sed 's/ //g'
$ echo ''|dd cbs=80 conv=block |sed 's/ /=/g'
$ perl $ ruby -e "puts '='*80"
$ ruby -e "puts '='*80"
@nefo-mi
nefo-mi / gist:877316
Created March 19, 2011 07:49
logを見やすくするワンライナー(zsh依存)
% cat nantoka.log
START TIME: 2011/03/17 12:00:22
hoge
END TIME: 2011/3/17 13:00:43
huga
START TIME: 2011/03/17 13:06:22
hago
END TIME: 2011/3/17 13:30:43
START TIME: 2011/03/17 14:01:22
are
1.times do |t|
2.times do |h|
3.times do |a|
4.times do |n|
5.times do |k|
6.times do |s|
puts 'thanks!'
end
end
end
@nefo-mi
nefo-mi / gist:840486
Created February 23, 2011 14:32
7進数5桁の全テストデータを作るワンライナー
ruby -e "(7**5).times {|r| puts format('%05d', r.to_s(7)).unpack('aaaaa').join(' ')}"
0 0 0 0 0
0 0 0 0 1
0 0 0 0 2
0 0 0 0 3
0 0 0 0 4
0 0 0 0 5
0 0 0 0 6
0 0 0 1 0

ServersMan@vps Debian/GNUセットアップ内容

0. サーバ状態

   $ uname -a
   Linux dti-vps-srv25 2.6.18-194.3.1.el5.028stab069.6 #1 SMP Wed May 26 18:31:05 MSD 2010 i686 GNU/Linux

   $ df -lh

Filesystem Size Used Avail Use% Mounted on

print("Hello,World")
class Display
attr_accessor :print
def initialize
@print = []
end
def write(msg)
@print.push(msg)
end
end