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
" auto reload .vimrc"{{{ | |
augroup source-vimrc | |
autocmd! | |
autocmd BufWritePost *vimrc source $MYVIMRC | set foldmethod=marker | |
autocmd BufWritePost *gvimrc if has('gui_running') source $MYGVIMRC | |
augroup END"}}} | |
" カラースキームの設定 | |
colorscheme desert |
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
" auto reload .vimrc | |
augroup source-vimrc | |
autocmd! | |
autocmd BufWritePost *vimrc source $MYVIMRC | set foldmethod=marker | |
autocmd BufWritePost *gvimrc if has('gui_running') source $MYGVIMRC | |
augroup END | |
"---タイムスタンプのやつ | |
inoremap <F5> <ESC>i<C-R>=strftime("%H:%M ")<CR> | |
inoremap <F6> <ESC>i<C-R>=strftime("%Y/%m/%d (%a)")<CR><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
require "mechanize" | |
ID="" | |
PASSWD="" | |
agt = Mechanize.new | |
agt.user_agent_alias = "Windows IE 9" | |
page = agt.get("https://netcall.nomura.co.jp/oms") | |
form = page.forms[0] | |
form.user_id = ID | |
form.user_password = PASSWD |
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/sh | |
# SETTING HERE | |
mio_id=hoge | |
mio_pass=fuga | |
if [ $1 = "config" ] | |
then | |
cat <<'EOM' | |
graph_title IIJmio |
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
SELECT channels.title, videos.title, filename | |
FROM `videos` | |
JOIN channels ON videos.channelid = channels.id | |
WHERE filename IS NOT NULL |
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
require "mechanize" | |
ID="" | |
PASSWD="" | |
agt = Mechanize.new | |
agt.user_agent_alias = 'Windows IE 9' | |
page = agt.get("https://netcall.nomura.co.jp/oms") | |
form = page.forms[0] | |
form.user_id = ID | |
form.user_password = PASSWD | |
page = agt.submit(form) |
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
#!c:/bin/ruby/bin/ruby | |
# -*- encoding: cp932 -*- | |
# file: tsv2sqlite3.rb | |
require 'optparse' | |
require 'rubygems' | |
require 'sqlite3' | |
opt = OptionParser.new |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>My workout stat</title> | |
<script src="//code.jquery.com/jquery-1.8.2.js"></script> | |
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> | |
<script type='text/javascript' src='//www.google.com/jsapi'></script> |
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
#usage | |
# find %Dropbox%/Apps/Wahoo | grep csv$ | sort | awk -f wahoo2csv.awk | |
# Date, TotalDistance, Time, AverageSpeed | |
BEGIN { | |
FS="," | |
general_info_flg=0 | |
distance=0 | |
} |
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
function windows_productkey(){ | |
WshShell = new ActiveXObject( "WScript.Shell" ); | |
ret = WshShell.RegRead('HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\DigitalProductId'); | |
DigitalProductId = ret.toArray(); | |
hexPid = DigitalProductId.slice( 52, 67 ); | |
decodedChars = Array(24); | |
digits = Array("B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","2","3","4","6","7","8","9"); | |
for ( var i=1; i<30;i++ ){ | |
if((i % 6) == 0 ){ | |
decodedChars.push("-"); |