Skip to content

Instantly share code, notes, and snippets.

Avatar

Jun Morimoto mrmt

View GitHub Profile
View timer.rb
# -*- coding: utf-8 -*-
# ruby timer.rb 12:00 1 2 3 4 5 6 7 8 9 10 15 30 1m 2m 3m 4m 5m 10m 15m 20m 30m 45m 1h 1h30m 2h
require 'time'
require 'timers'
def usage
STDERR.puts "Usage: ruby timer end_time timing [timing..]"
STDERR.puts " example: ruby timer 12:00 1 2 3 5m 30m 1h"
exit
@mrmt
mrmt / GGsync.java
Last active Feb 4, 2016
softly ignore google calendar api error source/GGsync/src/com/cybozu/GGsync.java
View GGsync.java
package com.cybozu;
import java.io.File;
import java.sql.SQLException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@mrmt
mrmt / KeySetting_Default.plist
Last active Feb 2, 2018
Yosemite:/System/Library/Input Methods/JapaneseIM.app/Contents/Resources/KeySetting_Default.plist
View KeySetting_Default.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>version</key>
<integer>1</integer>
<key>keys</key>
<dict>
<key>before_typing</key>
<dict>
@mrmt
mrmt / wxr2mt
Last active Aug 29, 2015
WordpressからexportしたWXRをMT形式に変換
View wxr2mt
#!/usr/bin/perl
use XML::Simple;
use Date::Parse;
use strict;
use warnings;
use feature 'say';
binmode(STDOUT, ':utf8');
my $xml = new XML::Simple;
@mrmt
mrmt / setlist.md
Last active Aug 29, 2015
setlist for GitHub & DeployGate Tokyo Meetup, 30 May 2014
View setlist.md

main

  • GBI (German Bold Italic) Tei Towa
  • Wuthering Heights The Puppini Sisters
  • Human Nature Sexy Synthesizer
  • Smoke On The Water Señor Coconut
  • Get It Right Arabology
  • Telefone Bossacucanova
  • Batucada Tei Towa
  • Breakn' A Sweat Skrillex
@mrmt
mrmt / gist:8578863
Last active Jan 4, 2016
/etc/logrotate.d/poxxxxy
View gist:8578863
/home/ubuntu/git/qron/webfront/log/production.log {
daily
missingok
nocreate
compress
delaycompress
copytruncate
rotate 30
}
@mrmt
mrmt / trademark.iim
Created Dec 24, 2013
iMacrosで特許電子図書館 - 商標検索の商標文字列検索を ちょっとだけラクにする
View trademark.iim
VERSION BUILD=8601111 RECORDER=FX
TAB T=1
URL GOTO=about:newtab
URL GOTO=http://www.ipdl.inpit.go.jp/Syouhyou/syouhyou.htm
TAG POS=1 TYPE=A ATTR=TXT:商標出願・登録情報
PROMPT "Please enter name" !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:FORM1 ATTR=NAME:key01 CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:FORM1 ATTR=*
SET !TIMEOUT 10
TAG POS=1 TYPE=INPUT:BUTTON FORM=ACTION:/syutsugan/TM_LIST_A.cgi ATTR=*
@mrmt
mrmt / gist:7674746
Last active Dec 29, 2015
Google日本語入力のローマ字変換ルールに、大文字ローマ字入力でカタカナを入力できるようにするための設定
View gist:7674746
- ー
~ 〜
. 。
, 、
z/ ・
z. …
z, ‥
zh ←
zj ↓
zk ↑
View tumblr-template-sample.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<!--
Designed by
_|_|_| _|_| _|_|_|_| _|_| _| _|_|
View linkcynergy2phg.pl
#!/usr/bin/perl
sub replace{
my $url = shift;
$url =~ s|.*RD_PARM1=||;
$url =~ s|%25(..)|chr(hex($1))|ge;
$url =~ s|\?.*||;
return '\"' . $url . '?uo=4&at=10l4yZ' . '\"';
}
while(<>){