Skip to content

Instantly share code, notes, and snippets.

View performance.js
(function() {
var max = 10000;
var pi = Math.PI;
(function() {
var a = new Array(max);
console.time('native');
for (var i = 0, len = a.length; i < len; i++) {
a[i] = pi;
View test006.js
// strict check
//
function strict() {
'use strict';
var isStrict = (function(){return !this}());
console.log(isStrict);
}
function nonStrict() {
View Custom.css
/* UserStyleSheet for Google Chrome */
body.user-style-negipo,
body.user-style-hitode909{
background-image: none !important;
}
article.twitter/* TweetDeck */,
#doc .stream-item/* Twitter web */ {
overflow:hidden;
}
View gist:1046896
$ rvm ruby-1.9.2
$ ruby -e "print nil"
$ rvm ree
$ ruby -e "print nil"
nil%
$ ruby -e "print nil.to_s"
$
View ldrize.user.js
// ==UserScript==
// @name LDRize
// @namespace http://white.s151.xrea.com/
// @description j,k,v,p,o,:,f,? + l,s,i
// @include http://*
// @include https://*
// @include file:///*
// ==/UserScript==
const SCRIPT_VERSION = "2010.10.27 mod/2011.01.30"
View minibuffer.user.js
// ==UserScript==
// @name Minibuffer
// @namespace http://white.s151.xrea.com/
// @description Minibuffer
// @include *
// ==/UserScript==
var VERSION = "2009.12.06 mod/2011.01.30";
var Class = function(){return function(){this.initialize.apply(this,arguments)}};
View mouseover_eijirox.user.js
// ==UserScript==
// @name mouseover eijirox
// @description mouseover dictionary, require EijiroX and NinjaKit extensions.
// @namespace http://ss-o.net/
// @include http*
// ==/UserScript==
(function () {
var d = document.createElement('dl');
d.id = 'eijirox-box';
d.style.cssText = 'min-width:200px;min-height:100px;position:absolute!important;background:rgba(255,255,255,0.8)!important;color:#000!important;font-size:11px!important;border-radius:10px!important;padding:10px!important;margin:0px!important;text-align:left!important;line-height:1.2!important;z-index:10000000!important;border:2px solid #456!important;';
View array.js
function EXArray() {
var result = [];
result.__proto__ = EXArray.prototype;
for (var i = 0, len = arguments.length; i < len; ++i) {
result[i] = arguments[i];
}
return result;
}
// どうせなら仕様の範囲内で
View game.html
<!DOCTYPE html>
<html>
<head>
<title>game</title>
<style>
#C{
position:relative;
}
.cell{
View gist:592772
var re_http = '(?:https?://\\S+)',
re_user = '(?:[@][0-9A-Za-z_]{1,15})',
re_hashtag = '(?:[#]\\S+)',
re_tweet = new RegExp(
'('+[re_http, re_user, re_hashtag].join('|')+'|\\S+)', 'g'
);
var make_link = function(href, txt) {
var a = document.createElement('a');
a.href = href;