Skip to content

Instantly share code, notes, and snippets.

View uu59's full-sized avatar

uu59

View GitHub Profile
@uu59
uu59 / forward_smtp_server.rb
Created May 30, 2012 21:40
localhostでSMTPサーバ立ててGmailで送るやつ
# -- coding: utf-8
# inspired by http://d.hatena.ne.jp/takuya_1st/20120418/1334778323
require "tempfile"
require "rubygems"
require "mini-smtp-server"
require "pony"
require "pit"
require "mail"
$('input[name="new_version"]').on('change', function(){
$('input[name="old_version"][value="'+(this.value - 1)+'"]').check();
});
@uu59
uu59 / better-google-groups.user.js
Created August 3, 2012 18:36
Better Google Groups
// ==UserScript==
// @name Better Google Groups
// @namespace http://uu59.org/
// @version 1.0.0
// @include http://productforums.google.com/forum/*
// ==/UserScript==
function addStyle(css) {
var id = "better-google-groups";
var style = document.querySelector('#' + id);
@uu59
uu59 / manifest.json
Created August 8, 2012 21:47
techcrunch ja
{
"manifest_version": 2,
"name": "techcrunch",
"version": "1.1.1",
"description": "説明",
"icons":
{
},
"content_scripts": [
{
@uu59
uu59 / .gitignore
Created August 13, 2012 08:12
socket.io and Sinatra
vendor/
.bundle/
node_modules/
Gemfile.lock
@uu59
uu59 / avoid-awesome-selection.user.js
Created August 29, 2012 17:39
kill ::selection { /* hard to see color */ }
// ==UserScript==
// @name avoid awesome selection
// @namespace http://uu59.org/
// @version 1.0.0
// @include *
// ==/UserScript==
// tested on http://www.vimninjas.com//2012/08/28/vim-for-rubyists-part-1/
function addStyle(css) {
# http://r7kamura.hatenablog.com/entry/2012/09/02/185129
# https://gist.github.com/3595761
# https://gist.github.com/3595759
require "spec_helper"
describe Avalon::Validator do
let(:validator) do
proc do |arg|
@uu59
uu59 / delicious_private.rb
Created September 19, 2012 14:34
make private all bookmarks on Delicious
# -- coding: utf-8
require "rubygems"
require "grill"
Grill.implant <<-GEM
source :rubygems
gem 'capybara', :require => ["capybara", "capybara/dsl"]
gem "capybara-webkit"
gem "headless"
tes
var _submit = HTMLFormElement.prototype.submit;
HTMLFormElement.prototype.submit = function() {
var uri = document.createElement('a');
uri.href = this.action;
if(uri.host == location.host) {
_submit.call(this);
return ;
}
if(confirm('will submit to ' + uri.href + ', acceptable?')) {
_submit.call(this);