January 2011
12 posts
1 tag
slow-log
[mysqld]
#slow_query_log=1 # <- 不要?
log_slow_queries = /var/log/mysql/mysql-slow.log
long_query_time = 0.1
log-queries-not-using-indexes
1 tag
.gitconfig
[user]
name = myname
email = myname@example.com
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p
[color]
ui = true
1 tag
favicon
AddType image/vnd.microsoft.icon .ico
1 tag
getty (ubuntu)
# vi /etc/default/console-setup
-----
#ACTIVE_CONSOLES="/dev/tty[1-6]"
ACTIVE_CONSOLES="/dev/tty[1-2]"
-----
# vi /etc/init/tty[3-6].conf
-----
## comment out all line
-----
2 tags
sshd_config
/etc/ssh/sshd_config
Port 10022
## ipv6無効時は 0.0.0.0 のコメント解除
#ListenAddress ::
ListenAddress 0.0.0.0
PermitRootLogin no
PasswordAuthentication no
PermitEmptyPasswords no
PubkeyAuthentication yes
UsePAM no
1 tag
javascript Template
var Template = {};
Template.apply = function(str, obj, replacement) {
return str.replace(/#\{(.+?)\}/g, function() {
try {
return eval('obj.' + arguments[1]);
}
catch (e) {
return replacement ? replacement : '';
};
});
};
1 tag
.zshrc
export LANG=ja_JP.UTF-8
autoload -U compinit
compinit
setopt auto_pushd
setopt noautoremoveslash
autoload colors
colors
PROMPT="%{${fg[blue]}%}[%n@%m] %(!.#.$) %{${reset_color}%}"
PROMPT2="%{${fg[blue]}%}%_> %{${reset_color}%}"
SPROMPT="%{${fg[red]}%}correct: %R -> %r [nyae]?...
2 tags
github ssh/config
http://help.github.com/multiple-keys/
$ vi ~/.ssh/config
-----
Host github.com
HostName github.com
User git
IdentityFile /Users/joe/.ssh/id_rsa
-----
1 tag
find | xargs
find . -type d -name .svn -print0 | xargs -0 rm -rf
1 tag
disable ipv6 (ubuntu)
$ sudo vi /etc/sysctl.conf
-----
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
-----
$ sudo sysctl -p
1 tag
node-dev
https://github.com/fgnass/node-dev
Node-dev is a supervisor for Node.js that spawns a node child-process and restarts it when changes are detected in the filesystem.
$ npm install node-dev
$ node-dev script.js
1 tag
TerminalColors
SIMBLE
http://www.culater.net/software/SIMBL/SIMBL.php
TerminalColors
https://github.com/brodie/terminalcolours/downloads
$ mkdir ~/Library/Application\ Support/SIMBL
$ mkdir ~/Library/Application\ Support/SIMBL/Plugins
$ mv TerminalColours.bundle ~/Library/Application\ Support/SIMBL/Plugins/