Skip to content

Instantly share code, notes, and snippets.

View closer's full-sized avatar
🎯
Focusing

closer closer

🎯
Focusing
View GitHub Profile
// ==UserScript==
// @name Wikimage
// @namespace cshamoo
// @include http://*.wikipedia.org/wiki/*
// ==/UserScript==
(function() {
var title = document.getElementsByTagName('h1')[0].innerHTML;
var google = "http://images.google.co.jp/images";
てすとだよ
わーいてすとだあ
#!/usr/bin/ruby
# iTunes
require "rubygems"
require "rbosa"
class ControlliTunes
@@app = OSA.app('iTunes')
#!/usr/bin/env ruby
require "kconv"
require "rubygems"
require "twitter"
require "mixi"
username = ''
password = ''
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Tumblr Cascade</title>
<style type="text/css">
* {
font-size:100%;
}
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="icon" href="{Favicon}"/>
<link rel="alternate" type="application/rss+xml" title="RSS" href="{RSS}"/>
<title>{Title}{block:PostSummary} - {PostSummary}{/block:PostSummary}</title>
<style type="text/css">
* {
font-size:100%;
#!/usr/bun/ruby
require "fileutils"
require "pathname"
include FileUtils
SRC_BASE= Pathname.new ARGV.shift
DEST_BASE = Pathname.new ARGV.shift
@closer
closer / random.rb
Created August 26, 2009 01:30
random select in ruby
module Kernel
def random arg
arg = arg.to_a if arg.class == Range
arg[rand(arg.size)]
end
end
class Range
def random
Kernel.random self
module Enumerable
def random
ary = self.to_a
ary[rand(ary.size)]
end
end
#!/usr/bin/ruby
require 'fileutils'
require 'open-uri'
require 'uri'
require 'digest/md5'
require 'rubygems'
require 'RMagick'
require 'simple-rss'