Skip to content

Instantly share code, notes, and snippets.

Takashi Iwamoto iwamot

Block or report user

Report or block iwamot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:2973895
def cross(cols, rows)
cols.split('').product(rows.split('')).map{|c, r| c + r}
end
$digits = '123456789'
$rows = 'ABCDEFGHI'
$cols = $digits
$squares = cross($rows, $cols)
$unitlist = $cols.split('').map{|c| cross($rows, c)} +
$rows.split('').map{|r| cross(r, $cols)} +
View html.c.patch
--- ext/standard/html.c.org 2007-12-31 16:22:52.000000000 +0900
+++ ext/standard/html.c 2012-03-07 23:33:19.000000000 +0900
@@ -439,19 +439,29 @@
} \
mbseq[mbpos++] = (mbchar); }
+#define CHECK_LEN(pos, chars_need) \
+ if((str_len - (pos)) < chars_need) { \
+ *newpos = pos; \
+ return 0; \
View 商品リソースのJSON表現例
{
"hproduct": {
"fn": "RESTful Webサービス",
"bland": "オライリー・ジャパン",
"category": "Book",
"price": "¥ 3,990",
"photo": [
{
"src": "http://ecx.images-amazon.com/images/I/51ojIhXBP3L._SL75_.jpg",
"height": "75",
View cookpad_tukurepo.user.js
// ==UserScript==
// @name cookpad_tukurepo(iwamot)
// @namespace http://github.com/iwamot
// @include http://cookpad.com/*
// origin http://d.hatena.ne.jp/samurai20000/20090715/1247668133
// ==/UserScript==
(function(){
function get_tukurepo(elem) {
if (!elem) {
View Color of Book
javascript:(function(){if(a=document.getElementById('ASIN'))location.href='http://colorchart.jp/color/'+a.value;})();
You can’t perform that action at this time.