Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name fastladder - prevent click scroll.
// @description prevent scroll on click feed.
// @author miya2000
// @namespace http://d.hatena.ne.jp/miya2000/
// @version 1.0.0
// @inclide http://fastladder.com/reader/
// @inclide http://reader.livedoor.com/reader/
// ==/UserScript==
// ==UserScript==
// @name hatebu - rewite id-call.
// @description rewite id-call link from the user page to the user bookmark on the entry page.
// @author miya2000
// @namespace http://d.hatena.ne.jp/miya2000/
// @include http://b.hatena.ne.jp/entry/*
// ==/UserScript==
(function() {
function main(){
var as = document.evaluate('\/\/a[starts-with(@href,"http://b.hatena.ne.jp/")][starts-with(text(),"id:")]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
// ==UserScript==
// @name fastladder - prevent overscroll
// @description prevent overscroll on Opera.
// @author miya2000
// @namespace http://d.hatena.ne.jp/miya2000/
// @version 1.0.0
// @include http://fastladder.com/reader/
// @include http://reader.livedoor.com/reader/
// ==/UserScript==
(function(){
@miya2000
miya2000 / C# concurrent test. (lock, Interlocked, ReaderWriterLock)
Created September 27, 2008 04:56
C# concurrent test. (lock, Interlocked, ReaderWriterLock)
using System;
using System.Diagnostics;
using System.Threading;
namespace ConcurrentTest
{
class Program
{
const int CONCURRENT = 100;
const int LOOP = 100000;
@miya2000
miya2000 / Java concurrent test. (synchronized, AtomicInteger)
Created September 27, 2008 19:30
Java concurrent test. (synchronized, AtomicInteger)
package test01;
import java.text.MessageFormat;
import java.util.concurrent.atomic.AtomicInteger;
public class ConcurrentTest {
static final int CONCURRENT = 100;
static final int LOOP = 100000;
static int counter;
static AtomicInteger aCounter;
package test01;
public class BinaryDumpTest {
public static void main(String[] args) {
System.out.print("Integer.MAX_VALUE : ");
binaryDump(Integer.MAX_VALUE);
System.out.print("Integer.MIN_VALUE : ");
binaryDump(Integer.MIN_VALUE);
System.out.print("-1 : ");
binaryDump(-1);
// ==UserScript==
// @name flash - disable script access
// @author miya2000
// @namespace http://d.hatena.ne.jp/miya2000/
// @version 1.0.1
// @include http://www.nttsolmare.com/*
// @exclude http://*http*
// ==/UserScript==
(function() {
// ==UserScript==
// @name flash - remove kuso
// @author miya2000
// @namespace http://d.hatena.ne.jp/miya2000/
// @version 1.1.0
// @include http://*
// ==/UserScript==
(function() {
function main() {
var kuso = document.evaluate('//embed[contains(@src, "flash_detection.swf")]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
(function(){
var d = document.implementation.createDocument('', '', null);
d.appendChild(d.createTextNode('\n'));
var opml = d.appendChild(d.createElement('opml'));
opml.appendChild(d.createTextNode('\n\t'));
var head = opml.appendChild(d.createElement('head'));
opml.appendChild(d.createTextNode('\n\t'));
var body = opml.appendChild(d.createElement('body'));
opml.appendChild(d.createTextNode('\n'));
alert(new XMLSerializer().serializeToString(d));