Skip to content

Instantly share code, notes, and snippets.

@ToQoz
ToQoz / favter.rb
Created August 14, 2011 11:52 — forked from dnpp73/favter.rb
favorit爆撃を与えてターゲットのデスクトップをGrowlで埋めるなどします
#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
@ToQoz
ToQoz / a_smart_dashboard_have_my_id.user.js
Created August 14, 2011 17:35 — forked from rummelonp/a_smart_dashboard_have_my_id.user.js
Dashboardのみで動作、ポストが自分のidを含んでいるかの判定をより厳密に、User CSSの「A smart dashboard is_mine」に依存しないように変更した。
// ==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==
@ToQoz
ToQoz / gist:1272620
Created October 8, 2011 17:52 — forked from mala/gist:77891
// ==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));
},
@ToQoz
ToQoz / glitch.rb
Created October 9, 2011 02:16 — forked from kkosuge/glitch.rb
jpegからイケメン画像たくさん生成するやつ(Macじゃなくても動く気がする
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|
@ToQoz
ToQoz / testcase.py
Created November 14, 2011 07:36 — forked from teserak/testcase.py
Lazy man's Django testcase
"""
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()
@ToQoz
ToQoz / installing-ghc7.2-osx10.7.md
Created January 10, 2012 15:45 — forked from beastaugh/installing-ghc7.2-osx10.7.md
Installing GHC 7.2 on Mac OS X 10.7 Lion

Installing GHC 7.2 on Mac OS X

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.

" endtagcomment.vim
" こういうHTMLがあったときに
" <div id="hoge" class="fuga">
" ...
" </div>
"
" 実行するとこうなる
" <div id="hoge" class="fuga">
" ...
" <!-- /div#hoge.fuga --></div>
@ToQoz
ToQoz / userstream.twitter.com2user.json.md
Created January 26, 2012 04:04 — forked from kkosuge/userstream.twitter.com2user.json.md
Twitter の User Streams で流れてくるやつ
@ToQoz
ToQoz / nicodown
Created February 3, 2012 01:34 — forked from ssig33/nicodown
#!/usr/bin/env ruby
#coding:utf-8
require 'mechanize'
require 'xmlsimple'
video_ids = ARGV
mail = ''
password = ''
alice = Mechanize.new
\               ¦         /
  \             ¦        /
             / ̄ ̄ ヽ,
            /        ',      /     _/\/\/\/|_
    \    ノ//, {0}  /¨`ヽ {0} ,ミヽ    /     \          /
     \ / く l   ヽ._.ノ   ', ゝ \       <   IE バーカ!  >
     / /⌒ リ   `ー'′   ' ⌒\ \    /          \
     (   ̄ ̄⌒          ⌒ ̄ _)    ̄|/\/\/\/ ̄
      ` ̄ ̄`ヽ           /´ ̄
           |            |