This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** kakasi.c Mon Nov 2 16:22:49 2009 | |
--- kakasi.c Mon Nov 2 16:24:58 2009 | |
*************** | |
*** 28,43 **** | |
Check_Type(src, T_STRING); | |
/* return "" immediately if source str is empty */ | |
! if (RSTRING(src)->len == 0) | |
return rb_str_new2(""); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include Math | |
def custom(u) | |
u < 0.5 ? 0.5-sqrt(0.25-u/2.0) : sqrt(u/2.0-0.25)+0.5 | |
end | |
(0..200000).map { | |
custom(rand()) | |
}.group_by{|num| ((num*20).floor % 20)}.sort_by{|k,v| k}.each{|k,v| | |
puts "#{"%2d" % k} #{"*"*(v.size/500)} #{v.size}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Nicovideo username in mylist | |
// @namespace http://libelabo.jp/ | |
// @include http://www.nicovideo.jp/openlist/* | |
// @require http://gist.github.com/3238.txt | |
// ==/UserScript== | |
(function(){ | |
function addUserName(node) { | |
var lists = $X('.//strong',node); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongodb/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ wget http://downloads.sourceforge.net/project/mecab/mecab/0.98/mecab-0.98.tar.gz | |
$ tar zxvf mecab-0.98.tar.gz | |
$ cd mecab-0.98 | |
$ ./configure | |
$ make | |
$ make check | |
$ sudo make install | |
$ wget http://downloads.sourceforge.net/project/mecab/mecab-ipadic/2.7.0-20070801/mecab-ipadic-2.7.0-20070801.tar.gz | |
$ tar zxvf mecab-ipadic-2.7.0-20070801.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// -*- mode: javascript; coding: utf-8 -*- | |
// ==UserScript== | |
// @name Heat the nicovideo up | |
// @author noriaki | |
// @namespace http://blog.fulltext-search.biz/ | |
// @description Visualize comments upsurge for Nicovideo | |
// @license MIT License | |
// @version 0.4.0 | |
// @released 2007-09-11 09:00:00 | |
// @updated 2009-06-07 19:58:00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Rotate Images | |
// @namespace http://june29.jp/ | |
// @include * | |
// ==/UserScript== | |
(function() { | |
var style = document.createElement('style'); | |
document.body.appendChild(style); | |
style.textContent = "img, canvas, video {\n" + "-moz-transform: rotate(0deg);\n" + " }"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'em-http-request', :require => 'em-http' | |
gem 'oauth' | |
gem 'pit' | |
gem 'yajl-ruby', :require => 'yajl' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:fileencoding=utf-8 | |
require 'rubygems' | |
require 'oauth' | |
require 'pit' | |
config = Pit.get("tweetstream_oauth",:require => { | |
"consumer_key" => "Set Consumer Key", | |
"consumer_secret" => "Set Consumer Secret", | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
liberator.registerObserver('enter',function(){ | |
let tldStr = "(?:museum|travel|aero|arpa|coop|info|jobs|name|nvus|biz|com|edu|gov|int|mil|net|org|pro|xxx|ac|ad|ae|af|ag|ai|ak|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|ct|cu|cv|cx|cy|cz|dc|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fl|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hi|hk|hm|hn|hr|ht|hu|ia|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|ks|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mi|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|nd|ne|nf|ng|nh|ni|nj|nl|nm|no|np|nr|nu|ny|nz|oh|ok|om|or|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ri|ro|ru|rw|sa|sb|sc|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tx|tz|ua|ug|uk|um|us|ut|uy|uz|va|vc|ve|vg|vi|vn|vt|vu|wa|wf|wi|ws|wv|wy|ye|yt|yu|za|zm|zw)" | |
let regexp = new RegE |