Skip to content

Instantly share code, notes, and snippets.

View uu59's full-sized avatar

uu59

View GitHub Profile
# -- coding: utf-8
require "rubygems"
require "pry"
@inventory = []
class Gacha
def initialize
ascii = ("\x20".."\x7e").to_a
@uu59
uu59 / google-alert.rb
Created November 13, 2012 11:15
automate to create google alert
# -- coding: utf-8
require "rubygems"
require "grill"
Grill.implant <<-G
source :rubygems
gem "masque"
gem "nokogiri"
@uu59
uu59 / chromium-updater.bash
Created November 5, 2012 18:26
updater of Chromium browser for Ubuntu
#!/bin/bash
# based on
# http://askubuntu.com/questions/112432/chromium-19-for-ubuntu
# http://paste.ubuntu.com/1110824/
set -u
set -e
notify() {
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);
tes
@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"
# 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 / 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) {
@uu59
uu59 / .gitignore
Created August 13, 2012 08:12
socket.io and Sinatra
vendor/
.bundle/
node_modules/
Gemfile.lock
@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": [
{