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
inoremap <silent> <ESC> <ESC>:call system("ore_ime stop")<CR> |
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
command! Migemo call Migemo() | |
function! Migemo() | |
if hasmapto('\<CR>','c') | |
cunmap <expr><CR> | |
else | |
cnoremap <expr><CR> migemosearch#replace_search_word()."\<CR>" | |
endif | |
endfunction |
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
# encoding: utf-8 | |
# | |
# Month List for Octopress | |
module Jekyll | |
class CatList < Liquid::Tag | |
def initialize(tag_name, markup, tokens) | |
super | |
end | |
def render(context) |
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/expect | |
set timeout 10 | |
spawn telnet mail.example.com 25 | |
expect { | |
default {exit 2} | |
"ESMTP Postfix" | |
} | |
# helo | |
send "HELO sender.example.com\n" |
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
if [ "$SHLVL" = "1" ] && [ ! -z "$PS1" ] ; then | |
[ -d ~/oplog/ ] || mkdir ~/oplog | |
find ~/oplog/ -type f -mtime +60 -delete | |
script ~/oplog/"typescript_$(date '+%Y%M_%H:%M:%S')" | |
fi |
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/perl | |
my (@row,@columns); | |
{ | |
my $line=<STDIN>; | |
my ($height,$width)=split(/\s+/,$line); | |
for (1..$height){ | |
$line=<STDIN>; | |
chomp $line; | |
$row[$_-1]=$line; |
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/perl | |
use File::Temp; | |
use strict; | |
use warnings; | |
# grep | |
my $temp_grep_log=File::Temp->new(DIR=>"/tmp",SUFFIX=>".tmp"); | |
my $temp_grep_log_name=$temp_grep_log->filename; | |
system "cat /var/log/syslog | grep '°' > $temp_grep_log_name "; | |
# make gnuplot data |
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/perl | |
use strict; | |
use warnings; | |
open (FH,"blog-05-10-2014_2.xml") or die $!; | |
while (<FH>){ | |
if (/^<entry>/){ | |
open (WR,">/tmp/out/${.}.erb") or die $!; | |
} | |
if (/^<entry>/../^<\/entry>/){ |
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
#!/bin/bash | |
DISPLAY=:0 | |
function previous { | |
sleep $1 | |
eval $(xdotool getmouselocation --shell) | |
echo "$X,$Y" | |
} | |
while :;do |
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
#!/bin/bash | |
set -e | |
#rbenv | |
HOME=/home/hogeuser | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
cd ~/middleman |
OlderNewer