This is a brief and bare-bones guide to getting GHC 7.2 and the cabal-install
tool (the two basic things you'll need to do Haskell development) up and running
on a new Mac OS X 10.7 install.
The instructions given here worked for me, but YMMV.
#coding: utf-8 | |
require 'twitter' | |
Twitter.configure do |config| | |
config.consumer_key = YOUR_CONSUMER_KEY | |
config.consumer_secret = YOUR_CONSUMER_SECRET | |
config.oauth_token = YOUR_OAUTH_TOKEN | |
config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET | |
end |
// ==UserScript== | |
// @name A smart dashboard have my id | |
// @namespace http://mitukiii.jp/ | |
// @description TumblrのDashboardで自分からReblogされた/自分のidを含んだpostを折り畳むスクリプト | |
// @include http://www.tumblr.com/dashboard* | |
// @author mitukiii | |
// @compatibility Firefox 5.0(Scriptish 0.1), Chrome 12.0.742.112, Opera 11.50 | |
// @charset UTF-8 | |
// @version 0.0.2.20110707180600 | |
// ==/UserScript== |
// ==UserScript== | |
// @name GlitchMonkey | |
// @namespace http://d.hatena.ne.jp/youpy/ | |
// @include * | |
// ==/UserScript== | |
var Corruptions = { | |
'image/jpeg': function() { | |
return this.replace(/0/g, Math.floor(Math.random() * 10)); | |
}, |
require 'base64' | |
path = ARGV.shift | |
if File.exists?(path) && path.match(/^(.+)\.(.+)$/) | |
files = [] | |
filename = $1 | |
ext = $2 | |
10.times do |i| | |
10.times do |j| | |
File.open(path,'r') do |f| |
""" | |
Decrease the verbosity of writing view tests. | |
Old way: | |
self.client.get(reverse("my-view")) | |
self.client.post(reverse("my-view"), data={"key": "value"}) | |
self.client.login("username", "password") | |
self.client.get(reverse("my-other-view")) | |
self.client.logout() |
" endtagcomment.vim | |
" こういうHTMLがあったときに | |
" <div id="hoge" class="fuga"> | |
" ... | |
" </div> | |
" | |
" 実行するとこうなる | |
" <div id="hoge" class="fuga"> | |
" ... | |
" <!-- /div#hoge.fuga --></div> |
正しい実装でt.coの見えない世界へ
document: https://dev.twitter.com/docs/streaming-api/user-streams
#!/usr/bin/env ruby | |
#coding:utf-8 | |
require 'mechanize' | |
require 'xmlsimple' | |
video_ids = ARGV | |
mail = '' | |
password = '' | |
alice = Mechanize.new |
\ ¦ / | |
\ ¦ / | |
/ ̄ ̄ ヽ, | |
/ ', / _/\/\/\/|_ | |
\ ノ//, {0} /¨`ヽ {0} ,ミヽ / \ / | |
\ / く l ヽ._.ノ ', ゝ \ < IE バーカ! > | |
/ /⌒ リ `ー'′ ' ⌒\ \ / \ | |
(  ̄ ̄⌒ ⌒ ̄ _)  ̄|/\/\/\/ ̄ | |
` ̄ ̄`ヽ /´ ̄ | |
| | |