Skip to content

Instantly share code, notes, and snippets.

@ongaeshi
ongaeshi / gist:827611
Created February 15, 2011 14:56
groonga1.1.0、configure設定をいじったものの、やはりpthreadが無いとエラー
/bin/sh ../libtool --tag=CC --mode=link i686-w64-mingw32-gcc -fno-strict-aliasing -g -O2 -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-pointer-sign -Wno-missing-field-initializers -Wformat=2 -Wstrict-aliasing=2 -Wdisabled-optimization -Wfloat-equal -Wpointer-arith -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align -Wredundant-decls -version-info 0:0:0 -no-undefined -mwindows -o libgroonga.la -rpath /c/users/ongaeshi/work/rroonga/vendor/local/lib io.lo str.lo nfkc.lo snip.lo query.lo store.lo com.lo ql.lo scm.lo ctx.lo hash.lo db.lo pat.lo ii.lo token.lo proc.lo expr.lo util.lo plugin.lo output.lo geo.lo -lm -ladvapi32 -lws2_32
libtool: link: rm -fr .libs/libgroonga.a .libs/libgroonga.dll.a .libs/libgroonga.la .libs/libgroonga.lai
libtool: link: i686-w64-mingw32-gcc -shared .libs/io.o .libs/str.o .libs/nfkc.o .libs/snip.o .libs/query.o .libs/store.o .libs/com.o .libs/ql.o .libs/scm.o .libs/ctx.o .libs/hash.o .libs/db.o .libs/pat.o .libs/ii.o .libs/token.o .libs/proc.o .libs
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="NONE,NOARCHIVE">
<title>Groonga::InvalidArgument at /</title>
<style type="text/css">
html * { padding:0; margin:0; }
body * { padding:10px 20px; }
@ongaeshi
ongaeshi / popup.rb
Created February 17, 2011 03:24
Windwosで、メッセージをポップアップさせるrubyスクリプト
#! ruby
require 'win32ole'
wsh = WIN32OLE.new('Wscript.Shell')
wsh.Popup(ARGV[0], # メッセージ本体
0, # 待機時間
'Message Box', # タイトル
4096) # オプション(メッセージボックスに応答するまですべてのアプリケーションを中断)
@ongaeshi
ongaeshi / anything-setting.el
Created February 18, 2011 02:03
my anything setting
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;anything
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'anything-startup)
; anything-for-filesの内容をカスタマイズ、anything-c-source-locateを除外
(setq anything-for-files-prefered-list
'(anything-c-source-ffap-line
anything-c-source-ffap-guesser
anything-c-source-buffers+
def assert_diff_files(file1, file2)
unless (IO.read(file1) == IO.read(file2))
puts `diff -c #{file1} #{file2}`
assert_equal true, false
else
assert_equal true, true
end
end
@ongaeshi
ongaeshi / file_test_utils.rb
Created February 21, 2011 10:52
rubyのファイルテスト用ユーティリティ
# -*- coding: utf-8 -*-
#
# @file
# @brief ファイルテスト用ユーティリティ
# @author ongaeshi
# @date 2011/02/21
#
#
# 以下のことを自動でやってくれます
#
@ongaeshi
ongaeshi / js2.el
Created February 25, 2011 10:06
js2-mode & indent patch
;;--------------------------------------------------------------------------
;;JavaScript
;;
;; js2-20090723b.el (ダウンロード後、 js2.el に改名、要バイトコンパイル)
;; http://code.google.com/p/js2-mode/downloads/detail?name=js2-20090723b.el&can=2&q=
;;
;; espresso.el
;; http://download-mirror.savannah.gnu.org/releases/espresso/espresso.el
;;-------------------------------------------------------------------------
(autoload 'js2-mode "js2" nil t)
@ongaeshi
ongaeshi / tw2hatena.rb
Created March 3, 2011 14:10
tw2hatena.rb
# -*- coding: utf-8 -*-
#
# @file
# @brief convert link, TiddlyWiki 2 Hatena
# @author ongaeshi
# @date 2011/03/03
def tw2hatena(line)
# h1, h2, h3..
line = line.gsub(/^\!/, "*")
@ongaeshi
ongaeshi / pop-window-setting.el
Created March 4, 2011 12:05
popwin.el setting
;;--------------------------------------------------------------------------
;; popwin.el
;;--------------------------------------------------------------------------
(require 'popwin)
(setq display-buffer-function 'popwin:display-buffer)
(setq special-display-function 'popwin:special-display-popup-window)
(push '("*Shell Command Output*" :height 20) popwin:special-display-config)
;(push '("*Shell Command Output*" :height 20 :position top) popwin:special-display-config)
# -*- coding: utf-8 -*-
#
# @file
# @brief
# @author ongaeshi
# @date 2011/03/09
class RubyWho
module Adapter
def who?(n = nil, filter = nil)