Skip to content

Instantly share code, notes, and snippets.

View temmings's full-sized avatar
🇹🇭
Out sick

Tetsuya HAMAMOTO temmings

🇹🇭
Out sick
View GitHub Profile
@temmings
temmings / uc2amp.pl
Last active August 29, 2015 14:01
UCカードのWEB明細CSVを Active Money Pro でインポート可能な形式に変換するスクリプト。カテゴリなどは決め打ちです。
#!/usr/bin/env perl
# -*- coding: utf-8 -*-
=head1 uc2amp.pl
description: CSV of UC card expose detail to Active Money Pro Import CSV.
=cut
# TODO:
@temmings
temmings / file0.groovy
Last active August 29, 2015 14:07
Jenkins ジョブのビルドパラメータを直近の日付選択リストにしたい ref: http://qiita.com/temmings/items/fee4c805560d4e74997e
use (groovy.time.TimeCategory) {
def today = new Date()
return (0..2).collect { i -> (today - i.days).format('YYYYMMdd') }
}
@temmings
temmings / .cvimrc
Last active August 29, 2015 14:08
cVim setting.
let blacklists = ["https://mail.google.com/*", "*://*.reddit.com/*", "*://feedly.com/*"]
unmap <C-h> "The unmaps the default 'C-h' mapping
@temmings
temmings / geolocation.py
Created December 13, 2014 21:15
IP から GeoIP を利用して日本の都道府県名を引く
# -*- coding: utf-8; -*-
u"""
IP から GeoIP を利用して日本の都道府県名を引く
:Author: t.hamamoto@skillupjapan.co.jp
* http://koshigoeb.hateblo.jp/entry/2012/02/19/183631
* http://www.maxmind.com/app/city
* http://www.maxmind.com/app/fips10_4
@temmings
temmings / osx_setup_munin-node.sh
Created October 6, 2012 00:34
OSX リソースモニタを munin-node で提供する覚え書き
#!/usr/bin/env sh
### 参考
# http://munin-monitoring.org/wiki/DarwinInstallation
# http://blog.isnext.net/issy/archives/156
### MacPorts から munin-node をインストール (munin-node 以外にも余計なものが沢山入る)
### homebrew には munin-node ないのかー。
sudo /opt/local/bin/port install munin +server
@temmings
temmings / osx_env.sh
Last active December 10, 2015 01:19
Initial setting of the environment MacOSX
#!/usr/bin/env sh
echo "### Enable locate updatedb"
launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
echo "### Show the ~/Library folder in Finder"
chflags nohidden ~/Library
echo "### Show full path in Finder title bar"
defaults write com.apple.finder _FXShowPosixPathInTitle -boolean true
@temmings
temmings / NF_STORY.MVI
Created February 4, 2013 20:33
MML for FMP v4 (see: http://fmp.jp)
; vim: set ts=4 fdm=marker commentstring=;%s:
'/lrod Mp30 z1z3z4
'"NoN-Fiction Story! / by Creative Life
beatmaniaIIDX 17 SIRIUS (c)2009 KONAMI
(for FMP disk vol.9) programmed by Tetsuya HAMAMOTO <temmings@gmail.com>"
'A C192 t228 ; T160
'BCXYZEFGHI {+fcgd} ; E.Major
'AB V+1
@temmings
temmings / selenium_expect_console_log.py
Created February 26, 2013 22:55
console.log に期待されたメッセージが含まれるかを selenium から検証する
from selenium import webdriver
import time
js_override_console_log = """
(function () {
testSelenium = {};
testSelenium.messages = [];
var cl = console.log;
console.log = function () {
testSelenium.messages.push(Array.prototype.join.call(arguments, '|'));
@temmings
temmings / force_101_keymap.reg
Created March 2, 2013 19:41
なんかしらんけど 106 Keyboard になってて発狂したときに使う
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters]
"LayerDriver JPN"="kbd101.dll"
"OverrideKeyboardIdentifier"="PCAT_101KEY"
"OverrideKeyboardSubtype"=dword:00000000
@temmings
temmings / gist:5130822
Created March 10, 2013 22:38
When you play this video in full screen on 4.0.3 Android, timeupdate event is fired in the video at the bottom.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>android4 video elements problem.</title>
<script type="text/javascript">
function logger(message) {
console.log(message);
var log = document.getElementById("log");
var li = document.createElement('li');