Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name LDR Hatebu Comments
// @namespace http://www.milk1000.cc/
// @include http://reader.livedoor.com/reader/*
// ==/UserScript==
(function() {
var w = this.unsafeWindow || window;
var LDRHatebuComments = function() {
require 'open-uri'
require 'rubygems'
require 'nokogiri'
doc = Nokogiri::HTML(URI(ARGV[0]).read)
id = doc.at('//embed[starts-with(@src, "http://www.dailymotion.com/swf/")]')['src'].sub(%r!^http://www.dailymotion.com/swf/!, '')
html = URI("http://www.dailymotion.com/video/#{ id }").read
if html =~ /\.addVariable\("video", "(.+?)"/
if URI.decode($1) =~ %r!(/get/\d+?/\d+?x\d+?/h264/.+?\.h264\?key=.+?)@!
run "cp config/database.yml config/database.sample.yml"
run "rm README"
run "rm public/index.html"
sentinel = "config.time_zone = 'UTC'"
gsub_file 'config/environment.rb', /(#{ Regexp.escape(sentinel) })/mi do
"config.time_zone = 'Tokyo'"
end
def current_user(stubs = { })
@current_user ||= mock_model(User, stubs)
end
def user_session(stubs = { }, user_stubs = { })
@current_user ||= mock_model(UserSession, { :user => current_user(user_stubs) }.merge(stubs))
end
def login(session_stubs = { }, user_stubs = { })
UserSession.stub!(:find).and_return(user_session(session_stubs, user_stubs))
diff -cr iTerm/Growl/CFGrowlAdditions.c iTerm.META/Growl/CFGrowlAdditions.c
*** iTerm/Growl/CFGrowlAdditions.c 2009-11-18 08:44:56.000000000 +0900
--- iTerm.META/Growl/CFGrowlAdditions.c 2009-11-18 08:55:28.000000000 +0900
***************
*** 8,14 ****
#include <Carbon/Carbon.h>
#include "CFGrowlAdditions.h"
! #include <c.h>
#include <unistd.h>
diff --git vendor/plugins/acts_as_taggable_on_steroids/lib/acts_as_taggable.rb vendor/plugins/acts_as_taggable_on_steroids/lib/acts_as_taggable.rb
index 7a96ef0..adaaeba 100644
--- vendor/plugins/acts_as_taggable_on_steroids/lib/acts_as_taggable.rb
+++ vendor/plugins/acts_as_taggable_on_steroids/lib/acts_as_taggable.rb
@@ -9,7 +9,8 @@ module ActiveRecord #:nodoc:
def acts_as_taggable
has_many :taggings, :as => :taggable, :dependent => :destroy, :include => :tag
has_many :tags, :through => :taggings
-
+
// ==UserScript==
// @name AutoMujiSort
// @namespace http://www.milk1000.cc/
// @include http://www.muji.net/store/cmdty/section/*
// ==/UserScript==
(function() {
var OLD_PATTERN = { sort: 4, count: 12 };
var NEW_PATTERN = { sort: 0, count: 150 };
Index: iTermApplication.m
===================================================================
--- iTermApplication.m (revision 404)
+++ iTermApplication.m (working copy)
@@ -62,6 +62,11 @@
PTYTabView* tabView = [currentTerminal tabView];
PTYSession* currentSession = [currentTerminal currentSession];
NSResponder *responder;
+ unsigned short keyCode = [event keyCode];
+ unsigned int modifierFlags = [event modifierFlags];
ja:
errors:
messages:
not_found: "は見つかりませんでした"
# not_found: "not found"
already_confirmed: "は既に登録済みです"
# already_confirmed: "was already confirmed"
not_locked: "は凍結されていません"
# not_locked: "was not locked"