Skip to content

Instantly share code, notes, and snippets.

PWD=$(shell pwd)
EMACS_REPOS_DIR=emacs-git-repos
EMACS_DAILY=emacs-daily
EMACS_DAILY_DIR=emacs-daily-$(shell date +%Y%m%d%H%M)
CONFIGURE_OPTIONS=
.PHONY: all link build repository-update repository-init
all: build
@troter
troter / Rakefile
Created September 1, 2009 14:13 — forked from yhara/Rakefile
# configurations
BIN_DIR = File.expand_path("~/bin/")
INSTALL_DIR = File.expand_path("~/bin/rubys/")
P185 = "p231"
P186 = "p369"
P187 = "p174"
P191 = "p129"
JRUBY_VER = "1.3.0"
@troter
troter / ExcelUtil.bas
Created January 4, 2010 08:11
Activate A1 All.
Attribute VB_Name = "ExcelUtil"
Sub ActivateA1All()
Dim Index
For Index = 1 To Worksheets.Count
With Worksheets(Index)
.Activate
.Cells(1, 1).Activate
End With
Next
@troter
troter / im-kayac.el
Created January 10, 2010 18:42
Post im.kayac.com
;;; im-kayac.el --- Post im.kayac.com
;;; test code
;; - 認証なし
;; (setq im-kayac-username "username")
;; (setq im-kayac-authorization-type nil)
;;
;; - パスワード
;; (setq im-kayac-username "username")
;; (setq im-kayac-password "password")
@troter
troter / astar.el
Created January 15, 2010 20:10
A* Algorithm implementation for el
;; astar.el -- A* Algorithm implementation
(require 'cl)
(defstruct (astar-node-struct
(:constructor astar-make-node-struct
(&key pair parent f-star)))
pair parent f-star)
(defun astar-node-struct-pair-pair-equal (node pair)
@troter
troter / gist:728019
Created December 4, 2010 07:51
single table inheritance emulation
public class Player {
protected Long id;
protected PlayerBehavior behavior;
protected String name;
protected String club;
@troter
troter / Chrome8
Created December 15, 2010 02:37
show UserAgent
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 Safari/534.10
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 Safari/534.10
@troter
troter / svnpropsed.rb
Created February 15, 2011 02:14
edit svn properties using sed
#!/usr/bin/env ruby
# -*- coding:utf-8 -*-
SCRIPT_NAME=$0
if ARGV.size != 3
puts "USAGE: #{SCRIPT_NAME} PROPNAME SED_SCRIPT TARGET"
exit 1
end
svn = 'svn'
propname, sed_script, target=ARGV
@troter
troter / maven-with-mercurial-branch.txt
Created March 8, 2011 02:47
Mavenのプロジェクトをmercurialで管理する場合のブランチの取り扱い
* Mavenのプロジェクトをmercurialで管理する場合のブランチの取り扱い
** 前提
hudsonでビルドするときに依存関係が混ざらないよう、
featureブランチのjarには別のversionをつける。
** 方法
1.featureブランチを切ったタイミングで、pomのversionに修正を入れる。
2.featureブランチからマージするときはpomのversionを元に戻す。
@troter
troter / pickuphexspeak.rb
Created March 9, 2011 13:15
pickup hexspeak.
# -*- coding: utf-8; mode: ruby -*-
#
# usage:
# hg log --template "{node} {author} {desc|firstline}\n" | ruby pickuphexspeak.rb
first_class = %w[
abadbabe baadf00d baddcafe cafebabe deadbeef defec8ed
facefeed fee1dead badcab1e feedface deaddead beadface
]
second_class = %w[