Skip to content

Instantly share code, notes, and snippets.

View june29's full-sized avatar
🚿

june29 june29

🚿
View GitHub Profile
// ==UserScript==
// @name Maximize LDR view
// @namespace http://june29.jp/
// @include http://reader.livedoor.com/reader/
// ==/UserScript==
(function(){
GM_addStyle('#header, #control, #menu, #footer { display: none !important; }');
GM_addStyle('#subs_toolbar, #subs_buttons, #subs_search { display: none !important; }');
GM_addStyle('#ads_bottom { display: none !important; }');
<!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"/>
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss"/>
<link rel="shortcut icon" href="{Favicon}">
<link type="text/css" rel="stylesheet" media="screen" href="http://june29.jp/stylesheets/screen.css"/>
<title>{Title}</title>
<style type="text/css">
public class HelloWorld {
public static void main(final String[] args) {
System.out.println("Hello, world!");
}
}
makeSearchCommand({
name: "twitter-search",
url: "http://search.twitter.com/search?q={QUERY}",
icon: "http://twitter.com/favicon.ico",
description: "Searches twitter for your words.",
preview: function(pBlock, directObject) {
var query = directObject.text;
pBlock.innerHTML = "Searching for...";
var url = "http://search.twitter.com/search.json";
// ==UserScript==
// @name QuickSearchForm
// @namespace http://june29.jp/
// @include http://*
// @include https://*
// ==/UserScript==
(function() {
var BIND_KEY = '/';
require "net/http"
require "json"
class CouchDB
def initialize(host, port = 5984)
@host = host
@port = port
end
def get(uri)
cdb_config = Pit.get("couchdb", :require => {
"host" => "CouchDB host",
"port" => "CouchDB port"
})
ps_config = Pit.get("bcphotoshare.com", :require => {
"email" => "your email address",
"password" => "your password"
})
require "net/http"
require "time"
require "digest/sha1"
Net::HTTP.version_1_2
class HatenaBookmark
def initialize(username, password)
@username = username
@password = password
#!/usr/bin/ruby -Ku
require "rubygems"
require "open-uri"
require "rexml/document"
require "time"
require "pit"
require File.dirname(__FILE__) + "/hatena_bookmark"
require File.dirname(__FILE__) + "/couchdb"
require "rubygems"
require "open-uri"
require "nokogiri"
def count_word(url)
text = fetch_text(Nokogiri::HTML(open(url)))
text.scan(/\w+/).inject(Hash.new(0)) { |count, word|
count[word.downcase] += 1
count