Skip to content

Instantly share code, notes, and snippets.

@takeshik
takeshik / brainyacq.yacq
Created December 9, 2011 16:49
Brainf*ck on Yacq
(def bf (\ [c:String] ($ [
d Int32.array.(new 30000) ; data array
di 0 ; data index
ci 0 ; code index
s Stack.[Int32].(new) ; jump stack
jc 0 ; jump counter
]
EnumerableEx.(Repeat c)
.(TakeWhile {!= ci $0.Length})
.(ForEach {$
@co3k
co3k / co3k.asc
Created November 26, 2011 09:09
GPG Publick Key of "Kousuke Ebihara <kousuke@co3k.org>"
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
mQENBE6qdy8BCACgK0kZUgjJEIMQ3derJpqaQjSbSYPpjot6exH3+Z/QbaGsBNm3
+mlD+XgFZbX7J8pTlcrpBB9ntKCORuSpF5O3AjB/8FbHy+mcoTKg16JP6qlYRuSF
9PappM7hDzpcI1NiXdckjHRGGtIa6Lxg26zB+2hQPjF0PjAPqojFZOTmTk4fEaqb
tvjf1XAQRHLn0bejfF5ooRw27WgQDUaweBHghG7CYxWF1zjunkyXeWPrZel7thz1
epfm3mVTlNzH2iBVlQuZBcHmZrJK6EfyfOgO/xk9vcfgzaFztuSn/vW2iqfMEF9G
1MgO9A0+wffmW5UgDREdb7Vw4TopShJge+dHABEBAAG0IktvdXN1a2UgRWJpaGFy
@youzaka
youzaka / gist:985485
Created May 22, 2011 13:54
TSファイルから記述子を取得
#!/usr/bin/env python2.6
# -*- coding: utf-8 -*-
from array import array
from collections import defaultdict
from datetime import datetime, time
from StringIO import StringIO
import sys
class QuickOutputter(object):
def __lt__(self, msg):
print msg
return self
o = QuickOutputter()
o < "Some random message"
o < "Some other message"
#/usr/bin/python
#-*- encoding:utf-8 -*-
#====== options =============
#Oauth用認証トークン 各自取得
ckey = ""
csecret = ""
atoken =""
atoken_secret = ""
#============================
<?php
// OpenSocial RESTful APIサンプル (2-legged OAuth)
// ライブラリとして http://oauth.googlecode.com/svn/code/php/ を利用しています。
include_once('lib/OAuth.php');
define('CONSUMER_KEY', '#CONSUMER_KEY#');
define('CONSUMER_SECRET', '#CONSUMER_SECRET#');
define('BASE_URL', '#BASE_URL#');
@snaka
snaka / nicolive.rb
Created January 23, 2010 07:27
ニコ生アラートを受信するスクリプト
require 'net/http'
require 'rubygems'
require 'nokogiri'
KCODE = 'UTF-8'
# アラートを通知してくれるコメントサーバーの情報を取得
response = Net::HTTP.get(URI('http://live.nicovideo.jp/api/getalertinfo'))
xml = Nokogiri(response)
address = (xml/'addr').inner_text()