Skip to content

Instantly share code, notes, and snippets.

require 'dxruby'
def simpleHash(x)
x = x * 1103515245 + 12345
return x & 2147483647
end
Window.width = 640
Window.height = 480
Window.bgcolor = [0, 0, 0]
set nocompatible "vi非互換モード
"#######################
" 表示系
"#######################
set number "行番号表示
set showmode "モード表示
set title "編集中のファイル名を表示
set ruler "ルーラーの表示
set showcmd "入力中のコマンドをステータスに表示する
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export PTEX_IN_FILTER="/opt/local/bin/nkf -j"
# PROMPT
PS1="[@${HOST%%.*} %1~]%(!.#.$) " # この辺は好み
RPROMPT="%T" # 右側に時間を表示する
setopt transient_rprompt # 右側まで入力がきたら時間を消す
setopt prompt_subst # 便利なプロント
bindkey -e # emacsライクなキーバインド
@yayugu
yayugu / gist:640138
Created October 22, 2010 07:59
hogehiga's somen tairiku patch
Index: test/main/util/DefragUtilTest.java
===================================================================
--- test/main/util/DefragUtilTest.java (リビジョン 0)
+++ test/main/util/DefragUtilTest.java (リビジョン 5)
@@ -0,0 +1,75 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
@yayugu
yayugu / gist:939522
Created April 24, 2011 12:40
Random#randとKernel#randでRangeを扱えるように
Random#randとKernel#randで引数としてRangeを扱えるようにしてほしいです。
Random#randは引数にInteger, Float, Rangeを扱うことができるのに対し、Kernel#rand, Random.randではIntegerしか扱うことができません。
rand 10 #=> 7
rand 7.5 #=> 4
rand 10..20 #=> TypeError: can't convert Range into Integer
Random.rand 10 #=> 8
Random.rand 7.5 #=> 3
@yayugu
yayugu / ybookML.y
Created July 24, 2011 04:29
ybookMLのパーサ
class YbookMLParser
prechigh
left CHARACTER
nonassoc LOW
preclow
rule
target : text { p val[0] }
| /* none */ { "" }
text : text string { result = val[0] + val[1] }

TwitterGoodRSS

TwitterGoodRSS is web service generate RSS better than Twitter official one.

Install

Heroku

diff --git a/config.sample.yml b/config.sample.yml
index 0dab043..5ed6aa8 100644
--- a/config.sample.yml
+++ b/config.sample.yml
@@ -1,5 +1,5 @@
production:
- dsn: <%= ENV['DATABASE_URL'] || ENV['DUOSTACK_DB_MYSQL'] %>
+ dsn: mysql://sampleuser:samplepassword@localhost/db_name
development:
dsn: sqlite3://<%= root %>/db/development.sqlite3
@yayugu
yayugu / gist:5983210
Last active October 29, 2020 18:19
卓球ハウスへのアクセス

住所

〒 153-0064 東京都目黒区下目黒5-11-24

行き方

best practice

グーグルマップ先生で経路から。現在地→東京都目黒区下目黒5-11-24