Skip to content

Instantly share code, notes, and snippets.

View rummelonp's full-sized avatar
🐈‍⬛
ニャーン

Kazuya Takeshima rummelonp

🐈‍⬛
ニャーン
View GitHub Profile
@rummelonp
rummelonp / Gemfile
Created February 3, 2012 04:19
guard で *.less と *.coffee 監視してコンパイル
source 'http://rubygems.org'
gem 'guard'
gem 'guard-less'
gem 'guard-coffeescript'
@rummelonp
rummelonp / gif.rb
Created February 3, 2012 17:38
GIF 画像解析するやつ(書きかけ)
# -*- coding: utf-8 -*-
class GIF
class ImplementationError < StandardError
end
def self.parse(arg)
if arg.is_a? File
new(arg).parse
elsif File.exists?(arg)
@rummelonp
rummelonp / coffee_init.rb
Created February 4, 2012 06:46
Padrino で app/javascripts/*.coffee をシステムの coffee コマンドではなく CoffeeScript gem を使ってコンパイル
module CoffeeInitializer
def self.registered(app)
app.use Rack::Coffee,
:root => Padrino.root('/app'),
:urls => '/javascripts',
:nowrap => true
# :root: the directory above urls. Defaults to Dir.pwd.
# :urls: the directories in which to look for coffeescripts. May specify a string or an array of strings. Defaults to /javascripts.
# :static: Whether to serve any static assets found in your urls (via Rack::File). Defaults to true; Specify false to pass through to your app.
# :cache: Sets a Cache-Control header if truthy, public if set to :public
@rummelonp
rummelonp / 0-gif.md
Created February 4, 2012 16:25
GIF アニメ分解して Canvas で再生するやつ

GIF アニメ分解して Canvas で再生するやつ

GifVJ
これがクールだったのでどうにかこれを JavaScript で作れないか頑張ってみた(頑張ってる途中)

実験途中経過報告

Burrn!
ランダムで GIF アニメを全画面表示
Enter で再生/停止

@rummelonp
rummelonp / gist:1805828
Created February 12, 2012 02:19 — forked from novi/gist:1805373
Node.js 開発環境 基礎

Node.js 開発環境 基礎

Node.jsのインストール

OS X ならHomebrewまたはMacportsで。

[~] $ brew install node
[~] # port install node

nodeコマンドでnodeのインタプリタを起動。

@rummelonp
rummelonp / bgm.md
Created February 14, 2012 03:35
最近の作業用 BGM 事情

最近の作業用 BGM 事情

iPod に入ってる音楽飽きてきた感あってネットラジオから適当に流してること多い
そろそろ音源買い漁りたい

音源垂れ流しとか発掘するやつ

Tubalr

http://www.tubalr.com/

@rummelonp
rummelonp / after_jailbreak.md
Created February 14, 2012 06:19 — forked from dnpp73/after_jailbreak.md
@dnpp の JB環境
@rummelonp
rummelonp / 矩形.txt
Created February 15, 2012 02:59
クケェーッ!!!
               ,, -―-、       
             /     ヽ   
       / ̄ ̄/  /i⌒ヽ、|    クケェーッ!!!!
      /  (゜)/   / /          
     /     ト、.,../ ,ー-、       
    =彳      \\‘゚。、` ヽ。、o   
    /          \\゚。、。、o
   /         /⌒ ヽ ヽU  o
   /         │   `ヽU ∴l
  │         │     U :l
@rummelonp
rummelonp / togetter_hide_rt.js
Created February 28, 2012 04:19
Togetter で RT/QT の文字色薄くするやつ
// javascript:$(%27.tweet%27).each(function()%20{var%20tweet%20=%20$(this),%20html%20=%20tweet.html();html%20=%20html.replace(/((?:RT|QT):?%20<a[^>]+>@[\w]+<\/a>.*)$/,%20%27<span%20class=%22c13%22>$1</span>%27);tweet.html(html);});
$('.tweet').each(function() {
var tweet = $(this), html = tweet.html();
html = html.replace(/((?:RT|QT):? <a[^>]+>@[\w]+<\/a>.*)$/, '<span class="c13">$1</span>');
tweet.html(html);
});
@rummelonp
rummelonp / 0-oppai.md
Created February 29, 2012 03:14
いかにしておっぱい画像をダウンロードするか〜2012 for Ruby