Skip to content

Instantly share code, notes, and snippets.

View nobuoka's full-sized avatar

Nobuoka Yu nobuoka

View GitHub Profile
@nobuoka
nobuoka / error.txt
Last active April 27, 2016 03:28
build ディレクトリだけからなる NuGet パッケージを作成してインストールを試すとこういうエラーが起こる
Install-Package : パッケージ 'XXX 1.0.0' をインストールできませんでした。
このパッケージを 'Windows,Version=v0.0' を対象とするプロジェクトにインストールしようとしていますが、
そのフレームワークと互換性があるアセンブリ参照またはコンテンツ ファイルがパッケージに含まれていません。
詳細については、パッケージの作成者に問い合わせてください。
@nobuoka
nobuoka / gist:6460909
Created September 6, 2013 08:11
Perl 5.8.8 で Text::MeCab をインストールしようとするとエラーが出る
Text-MeCab-0.20014$ make
cc -c "-I." "-I/usr/include" "-I." -fPIC -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DMECAB_MAJOR_VERSION=0 -DMECAB_MINOR_VERSION=97 -I src -Wall -W -Wno-comment -O2 -DVERSION=\"0.20014\" -DXS_VERSION=\"0.20014\" -o xs/MeCab.o -fpic "-I/home/nobuoka/perl5/perlbrew/perls/perl-5.8.8/lib/5.8.8/x86_64-linux/CORE" -DUSE_PPPORT -DTEXT_MECAB_ENCODING='"euc-jp"' -DTEXT_MECAB_CONFIG='"/usr/bin/mecab-config"' xs/MeCab.c
xs/MeCab.xs:64: warning: excess elements in struct initializer
xs/MeCab.xs:64: warning: (near initialization for ‘TextMeCab_vtbl’)
xs/MeCab.xs: In function ‘XS_Text__MeCab_version’:
xs/MeCab.xs:116: warning: assignment discards qualifiers from pointer target type
xs/MeCab.c: In function ‘boot_Text__MeCab’:
xs/MeCab.c:1140: error: ‘MECAB_ONE_BEST’ undeclared (first use in this function)
xs/MeCab.c:1140: error: (Each undeclared identifier is reported only once
xs/MeCab.c:1140: error: for each functio
" filetype が typescript の場合にのみ動作する neocomplcache プラグイン
" jsx_complete.vim を参考にしてます.
" https://github.com/osyo-manga/neocomplcache-jsx/blob/master/autoload/neocomplcache/sources/jsx_complete.vim
let s:source = {
\ 'name': 'typescript_complete',
\ 'kind': 'ftplugin',
\ 'filetypes': { 'typescript': 1 },
\ }
@nobuoka
nobuoka / manifest.json
Created May 16, 2012 17:11
Chrome 拡張の popup 内で confirm を使うとおかしくなることがある
{
"name": "Extension for test",
"version": "1.0",
"manifest_version": 2,
"description": "for test of alert, confirm and prompt functions",
"browser_action": {
"default_popup": "popup.html"
},
"permissions": [
]
@nobuoka
nobuoka / twitter_list_adder.rb
Created April 22, 2012 05:59
Twitter のリストにユーザーを放り込む Ruby スクリプト
# coding: UTF-8
#==============================
# 指定した自分のリストに指定したユーザーを放り込みます.
# 多量のユーザーをリストに放り込みたいときに便利.
#==============================
# 本プログラムは OAuthSimple ライブラリを使用します.
# https://github.com/nobuoka/ruby-OAuthSimple
# で公開しているので, git clone するなりして使用してください.
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 54d36c9..cab9d92 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -1209,7 +1209,7 @@ strio_putc(VALUE self, VALUE ch)
/*
* call-seq:
- * strio.read([length [, buffer]]) -> string, buffer, or nil
+ * strio.read([length [, outbuf]]) -> string, outbuf, or nil
@nobuoka
nobuoka / gist:2344397
Created April 9, 2012 15:55
Japanese translation for Rubinius
diff --git a/web/doc/ja/getting-started.markdown b/web/doc/ja/getting-started.markdown
index 9412036..c9f6de6 100644
--- a/web/doc/ja/getting-started.markdown
+++ b/web/doc/ja/getting-started.markdown
@@ -1,18 +1,17 @@
---
layout: doc_ja
-title: Getting Started
-previous: What is Rubinius?
+title: はじめに
diff --git a/lib/webrick/httpresponse.rb b/lib/webrick/httpresponse.rb
index 0d36c07..d6e88e5 100644
--- a/lib/webrick/httpresponse.rb
+++ b/lib/webrick/httpresponse.rb
@@ -330,13 +330,18 @@ module WEBrick
if @request_method == "HEAD"
# do nothing
elsif chunked?
- while buf = @body.read(@buffer_size)
- next if buf.empty?
require 'pg'
# 接続先 DB の情報
DB_S_ARRAY = [ 'localhost', 5432, '', '', 'db_name', 'user_name', 'password' ]
# テーブル table_name に対して先にロックを獲得するスレッド
t1 = Thread.new do
dbconn = PGconn.connect( *DB_S_ARRAY )
dbconn.transaction do
puts 'locking table... (t1)'
@nobuoka
nobuoka / eclipse_setup.markdown
Created August 16, 2015 09:59
Setup Eclipse for Scala development

Eclipse のセットアップ

Windows で Scala 開発をするための Eclipse の準備方法。

Eclipse および Scala IDE for Eclipse のインストール

Eclipse 本体

Eclipse のダウンロードページ より、「Eclipse IDE for Java Developers」 をダウンロードして展開する。