This file contains 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
#!/bin/bash | |
echo -n ! | |
exec git "$@" |
This file contains 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
class Stone | |
@@STONE_COLORS = [:white, :black] | |
def initialize(heads_color) | |
raise "Invalid type" unless @@STONE_COLORS.include?(heads_color) | |
@heads = heads_color | |
end | |
attr_reader :heads # 表の色 | |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#define MAX_NUM 999999999 | |
typedef struct{ | |
double ax; | |
double ay; |
This file contains 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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'rubygems' | |
require 'MeCab' | |
require 'uri' | |
require 'open-uri' | |
require 'generator' | |
require 'extractcontent.rb' | |
$KCODE='u' |
This file contains 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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'uri' | |
require 'open-uri' | |
class Results | |
@l = nil | |
@cache = nil |
This file contains 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
#!ruby | |
require 'rubygems' | |
require 'twitter' | |
require 'pit' | |
def enjoy(&block) | |
begin | |
block.call |
This file contains 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 AutoGhiblize | |
// @namespace http://d.hatena.ne.jp/tily | |
// @include http://faithrm-zero-zero.blog.so-net.ne.jp/archive/* | |
// @require http://www.chasen.org/~taku/software/TinySegmenter/tiny_segmenter-0.1.js | |
// ==/UserScript== | |
//----[Markov]--------------------------------------- | |
var Markov = function() { | |
this.chain = {} |
This file contains 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
/* 近代デジタルの画像をページ分割するヤツ(page_split) | |
opencvを使う. | |
*/ | |
#if 0 | |
#include <cv.h> | |
#include <highgui.h> | |
#include <math.h> | |
#else | |
#include <opencv/cv.h> | |
#include <opencv/highgui.h> |
This file contains 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
# -*- coding: utf-8 -*- | |
$KCODE = 'UTF-8' | |
require 'rubygems' | |
require 'json' | |
require 'ya2yaml' | |
require 'oauth/cli/twitter' # gem install oauth-cli-twitter | |
BANNER = "usage ruby twitter_get_all_statuses.rb username path/to/file" | |
# TODO: 今何発言とったか表示できるようにする |
This file contains 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
require 'rubygems' | |
require 'ffi-portaudio' | |
def safe | |
r = nil | |
Thread.new { | |
$SAFE = 4 | |
r = yield | |
}.join | |
r |
OlderNewer