This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_line_markers = (marker) -> | |
editor = atom.workspace.getActiveTextEditor() | |
range = editor.getSelectedBufferRange() | |
editor.moveToBeginningOfLine() | |
s = range.start.row | |
e = range.end.row | |
if e > s && range.end.column == 0 | |
e = e - 1 | |
editor.moveUp() | |
editor.transact -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Tsutomu Kuroda | |
email = t-kuroda@oiax.jp | |
[alias] | |
ci = commit | |
cia = commit --amend | |
co = checkout | |
cop = checkout @{-1} | |
cp = cherry-pick | |
mf = merge --ff-only |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
password = `cat /root/mysql_root_password` | |
password.strip! | |
result = `mysql -u root -p#{password} -E -e "show slave status"` | |
values = {} | |
result.split(/\n/).each do |line| | |
if md = line.match(/:/) | |
key = md.pre_match.strip.to_sym |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias a=alias | |
a ls="/bin/ls $LS_OPTIONS" | |
a ll="/bin/ls -l $LS_OPTIONS" | |
a la="/bin/ls -a $LS_OPTIONS" | |
a lla="/bin/ls -la $LS_OPTIONS" | |
a rm='rm -i' | |
a cp='cp -i' | |
a mv='mv -i' | |
a less='less -I' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prompts | |
# 30 31 32 33 34 35 36 37 | |
# BK RE GR YE BL MA CY WH | |
if [ $UID = "0" ]; then | |
PROMPT="%{[01;31m%}%n@%m%#%{[m%} " | |
else | |
PROMPT="%{[01;36m%}%n@%m%#%{[m%} " | |
fi | |
RPROMPT="%{[36m%}[%~]%{[m%}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace 'views' do | |
desc 'Renames all .rhtml views to .html.erb' | |
task 'rename' do | |
Dir.glob('app/views/**/*.rhtml').each do |file| | |
puts `git mv #{file} #{file.gsub(/\.rhtml$/, '.html.erb')}` | |
end | |
end | |
end |