Skip to content

Instantly share code, notes, and snippets.

View yuya-takeyama's full-sized avatar
🎐
Humility, Kindness, Bonds

Yuya Takeyama yuya-takeyama

🎐
Humility, Kindness, Bonds
View GitHub Profile
@yuya-takeyama
yuya-takeyama / Gemfile
Created September 16, 2017 03:11 — forked from mtsmfm/Gemfile
Ruby hangs (`[BUG] rb_gc_mark(): 0x0000000178d240 is T_NONE`)
source 'https://rubygems.org'
gem 'mongo_mapper'
gem 'bson_ext'
gem 'activemodel', '< 5'
@yuya-takeyama
yuya-takeyama / README.md
Last active December 14, 2015 22:19 — forked from anonymous/README.md

MongoDB の MapReduce を Ruby の DSL で書くアイディア

DSL で MapReduce の定義を書いて、Mapper や Reducer 単体テストを RSpec で書けると便利だと思う。

@yuya-takeyama
yuya-takeyama / intelligent.php
Created October 17, 2012 06:51
会話できる人工知能のプログラム (PHP)
<?php
$words = ['マジで', 'ヤバい', 'ウケルー'];
while (fgets(STDIN) !== "\n") echo $words[array_rand($words)], PHP_EOL;
@yuya-takeyama
yuya-takeyama / this.js
Created July 20, 2012 06:48 — forked from KOBA789/this.js
あなたがJavaScriptを嫌いになるのに十分なコード
function Class (bar) {
this.foo = bar;
}
Class.prototype.method = function () {
return this.foo;
};
var instance = new Class('baz'),
func = (function () {
@yuya-takeyama
yuya-takeyama / fizzbuzz.dart
Created October 11, 2011 06:01 — forked from VoQn/fizzbuzz.dart
Google が Dart 公開したから早速 FizzBuzz
main(){for(var i=0;i++<100;)print((i%3<1?'Fizz':'')+(i%5<1?'Buzz':'')||i);}
@yuya-takeyama
yuya-takeyama / section_numbers_for_real_world_haskell.user.js
Created August 25, 2011 09:50 — forked from anonymous/section_numbers_for_real_world_haskell.user.js
Real World Haskell の HTML 中に節番号振るグリモン
// ==UserScript==
// @name section_numbers_for_real_world_haskell.user.js
// @namespace http://yuyat.jp/
// @description Gives section numbers for Real World Haskell book online.
// @include http://book.realworldhaskell.org/read/*
// ==/UserScript==
(function (elements) {
var n = 1;
for (var i in elements) {
// ==UserScript==
// @name Report RT Dake ni Naru
// @namespace http://ssig33.com/
// @description Destroy RT Igai from Report
// @include http://sinsai.info/ushahidi/admin/reports*
// @include http://ushahidi.localhost/admin/reports*
// ==/UserScript==
for (q = 0; q < 30; q ++) {
var ns = document.getElementsByTagName("tr");
for (i = 0; i < ns.length; i++) {