Skip to content

Instantly share code, notes, and snippets.

@mzp
mzp / vvakame.md
Created November 16, 2012 07:11
わかめモナ化.md
@kazu-yamamoto
kazu-yamamoto / gist:4064634
Created November 13, 2012 08:20
Testing Free Monad with QuickCheck
module Main where
import Control.Monad
import Control.Monad.Free
import Prelude hiding (putChar, getChar)
import qualified System.IO as IO
import Test.QuickCheck
----------------------------------------------------------------
-- Our DSL
@myuon
myuon / gist:3386693
Created August 18, 2012 13:03
SKIコンビネータ2
\abf.fab
= \abf.(I f)(K (ab)f)
= \ab.SI(K(ab))
= \ab.(K(SI)(ab))(K(ab))
= \ab.S(K(SI))K(ab)
= \ab.(K(S(K(SI))K) b)(a b)
= \ab.S(K(S(K(SI))K))ab
= S(K(S(K(SI))K))
@nna774
nna774 / gist:3361116
Created August 15, 2012 15:46
オセロ
-- オセロ
--import Data.Functor
import Maybe
import Control.Monad
data Color = Black | White deriving (Eq, Show, Read)
type Cell = Maybe Color
type Board = [[ Cell ]]
@penguin2716
penguin2716 / gray_protected_users.rb
Created July 26, 2012 18:41
鍵垢のツイート背景をグレーにするmikutterプラグイン
#-*- coding: utf-8 -*-
Plugin.create :gray_protected_users do
UserConfig[:protected_users_background_color] ||= [0xcccc,0xcccc,0xcccc]
filter_message_background_color do | mp, array |
if mp.to_message.user[:protected] == true
array = UserConfig[:protected_users_background_color]
end
[mp, array]
end
anonymous
anonymous / yukelog.rb
Created April 28, 2012 11:48
yukelog
#! /usr/bin/ruby -Ku
$udid = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
HOST = 'yukeyusha4iphone.appspot.com'
YYVER = '3.0.1'
require 'net/https'
require 'rubygems'
require 'json'