Skip to content

Instantly share code, notes, and snippets.

javascript:(function(w){var i=$('#dig_area .ice_ax');w.t=w.setInterval(function(){i.click()},120)})(window)
#title "メロディーチャイムNO.1 ニ長調 作品17「大盛況」"
#copyright "作曲:稲田康, データ:Autch"
#timebase 24
A t90 BT2,4
A EExff,x59,x02,x02,x00 ; key metaevent, D major
A EX x7e,x7f,x09,x01,xf7 ; GM SYSTEM ON
A r4
A @0 v120
@autch
autch / gist:868189
Created March 13, 2011 15:53
輪番停電PDFをMacのpreviewで選択→テキストエディタに貼り付け、そしてこのスクリプトに与える
#!/usr/bin/ruby1.8
# create table rt (
# id integer unsigned not null auto_increment primary key,
# pref char(32) not null,
# city char(32) not null,
# addr char(32) not null,
# rt_group integer not null,
#
# index(pref,city,addr,rt_group)
@autch
autch / do_vlc_live.sh
Created March 28, 2011 16:20
tcpで生TSをもらってVLCでトランスコード結果をHTTPストリーミング
#!/bin/sh
if [ "x$1" = "x" -o "x$2" = "x" ]; then
echo "Usage: $0 inport outport"
exit 1
fi
if [ "x$3" = "x" ]; then
BITRATE=128
else
@autch
autch / vlcserv.php
Created March 28, 2011 16:31
gist:890759 で受け取ったTSへのリバースプロキシ
<?php // bogus reverse-proxy for VLC http streaming output
ini_set("display_errors", 0);
ini_set("log_errors", 1);
if(isset($_REQUEST['port']))
$port = intval($_REQUEST['port']);
else
$port = 12234;
@autch
autch / check_fof.rb
Created June 29, 2011 04:39
Twitter で相互followしているユーザを表示。Grackleが必要。
#!/usr/bin/ruby
#
# gem install grackle
#
# ./check_fof.rb <your_twitter_screen_name>
#
$KCODE = 'u'
require 'rubygems'
@autch
autch / shukan.html
Created July 26, 2011 01:36
習慣^H^H週刊韓国経済をヲンで買う。レートはStooqからその場で取得。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<title>習慣^H^H週刊韓国経済をヲンで買う</title>
<style type="text/css">
input { text-align: right; }
</style>
<script type="text/javascript">
@autch
autch / vcgi.rb
Created August 23, 2011 04:41
ERB/CGI/PHP-capable WEBrick server
#!/usr/bin/ruby
ORG_ARGV = ARGV.dup
require 'optparse'
require 'socket'
BasicSocket.do_not_reverse_lookup = true
require 'webrick'
@autch
autch / .emacs
Last active September 27, 2015 01:47
自分の .emacs
(auto-compression-mode t)
(if (file-exists-p "/usr/bin/lgrep")
(setq grep-command "lgrep -n ")
)
(require 'font-lock)
(global-font-lock-mode t)
(global-set-key [delete] 'delete-char)
(global-set-key "\C-h" 'backward-delete-char)
@autch
autch / rtx1000.rb
Created October 14, 2011 02:11
RTX1000 のtelnetインタフェースからFW状況を取得してCSVで出力
#!/usr/bin/ruby1.9.1
# -*- coding: euc-jp -*-
require 'net/telnet'
RT_HOST = 'YOUR_RTX1000_ADDR'
RT_PW = 'YOUR_RTX1000_PASSWORD'
telnet = Net::Telnet.new("Host" => RT_HOST,
"Waittime" => 1,