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
#!/bin/bash | |
echo -n ! | |
exec git "$@" |
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
;; This function is quoted from this page. Thanks to Tomohiro Matsuyama. | |
;; http://dev.ariel-networks.com/Members/matsuyama/pretty-lambda-in-emacs/ | |
(defun set-pretty-patterns (patterns) | |
(loop for (glyph . pairs) in patterns do | |
(loop for (regexp . major-modes) in pairs do | |
(loop for major-mode in major-modes do | |
(let ((major-mode (intern (concat (symbol-name major-mode) "-mode"))) | |
(n (if (string-match "\\\\([^?]" regexp) 1 0))) | |
(font-lock-add-keywords major-mode | |
`((,regexp (0 (prog1 () |
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
sin関数の魅力に迫る! | |
これは超ハイテンションでsin関数の魅力に迫るという文章です | |
sin関数は入力された角度(ラジアン)を元に、-1から1までのあいだの値を返却します | |
sin関数は周期的な特徴があって入力する値を増やしていくと... | |
----------------- | |
sin(0) = 0 | |
sin(1) = 0.1 | |
sin(2) = 0.14 | |
... |
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
require 'rubygems' | |
require 'ffi-portaudio' | |
def safe | |
r = nil | |
Thread.new { | |
$SAFE = 4 | |
r = yield | |
}.join | |
r |
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
# -*- 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 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
/* 近代デジタルの画像をページ分割するヤツ(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 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 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 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
#!ruby | |
require 'rubygems' | |
require 'twitter' | |
require 'pit' | |
def enjoy(&block) | |
begin | |
block.call |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'uri' | |
require 'open-uri' | |
class Results | |
@l = nil | |
@cache = nil |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'rubygems' | |
require 'MeCab' | |
require 'uri' | |
require 'open-uri' | |
require 'generator' | |
require 'extractcontent.rb' | |
$KCODE='u' |
NewerOlder