Skip to content

Instantly share code, notes, and snippets.

(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;
// strict check
//
function strict() {
'use strict';
var isStrict = (function(){return !this}());
console.log(isStrict);
}
function nonStrict() {
@os0x
os0x / Custom.css
Created July 28, 2011 04:40
youpy対策
/* 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;
}
$ rvm ruby-1.9.2
$ ruby -e "print nil"
$ rvm ree
$ ruby -e "print nil"
nil%
$ ruby -e "print nil.to_s"
$
@os0x
os0x / ldrize.user.js
Created January 30, 2011 11:07
LDRize mod
// ==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"
@os0x
os0x / minibuffer.user.js
Created January 30, 2011 11:05
Minibuffer mod
// ==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)}};
// ==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;';
@os0x
os0x / array.js
Created November 16, 2010 15:41 — forked from Constellation/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;
}
// どうせなら仕様の範囲内で
<!DOCTYPE html>
<html>
<head>
<title>game</title>
<style>
#C{
position:relative;
}
.cell{
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;