This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Amazon target killer | |
// @namespace http://tech.portalshit.net/ | |
// @description Kills `target="_blank"` on search result screen | |
// @author morygonzalez | |
// @version 0.3 | |
// @include http://www.amazon.co.jp/* | |
// ==/UserScript== | |
var targets = document.evaluate('//h3[contains(concat(" ",@class," "), " newaps ")]/a | //div[contains(concat(" ",@class," "), " imageContainer ")]/a', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# haiku tweet / earthquake plugin | |
# | |
Earthquake.init do | |
command :haiku do |m| | |
input(":update #{m[1]} ここで一句、 %s" % [open("http://haiku.jgate.de/"){|f| f.read}]) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# coffee tweet / earthquake plugin | |
# | |
# e.g. :coffee+ あんぱん #=> あんぱんヒー | |
# | |
Earthquake.init do | |
command %r|^:coffee\+ (.+)|, :as => :coffee do |m| | |
input(":update #{m[1]}ヒー") | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DBQuery.prototype.p = function() { | |
var args = arguments | |
this.forEach(function(e) { | |
var result = {} | |
if(args.length == 0) { | |
result = e | |
} else { | |
for(var i = 0; i < args.length; i++) { | |
var target = e | |
var keys = args[i].split('.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DBQuery.prototype.p = function() { | |
var args = arguments | |
this.forEach(function(e) { | |
var result = {} | |
if(args.length == 0) { | |
result = e | |
} else { | |
for(var i = 0; i < args.length; i++) { | |
var target = e | |
var keys = args[i].split('.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# huroushotoku tweet / earthquake plugin | |
# | |
# e.g. :hs hoge # => hoge #huroushotoku | |
# | |
Earthquake.init do | |
command %r|^:hs\s(.*)$|, :as => :huroushotoku do |m| | |
input(":update #{m[1]} #huroushotoku") | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# favstar / earthquakge.gem plugin | |
# | |
# e.g. :favstar #=> your favstar | |
# :favstar who #=> who's favstar | |
# | |
require 'rss' | |
Earthquake.init do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# favstar / earthquakge.gem plugin | |
# | |
# e.g. :favstar #=> your favstar | |
# :favstar who #=> who's favstar | |
# | |
require 'rss' | |
Earthquake.init do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# ogyohee tweet / earthquake plugin | |
# | |
# ogyohee: http://shindanmaker.com/152454 | |
# | |
require 'net/http' | |
Earthquake.init do | |
command %r|^:ogyo\s*(.+)*|, :as => :ogyohee do |m| | |
url = "http://shindanmaker.com/152454" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p() { | |
local pid exit | |
# http://www.filesonic.com/file/703099021 | |
afplay ~/Music/Nyan\ Cat.mp3 & | |
pid=$! | |
trap "kill -9 $pid" INT | |
command $* | |
exit=$? | |
kill -9 $pid | |
trap INT |