This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var arr1 = []; | |
| var arr2 = []; | |
| for(var i=0 ; i<1000000 ; i++){ | |
| arr1.push(i); | |
| arr2.push(i); | |
| } | |
| var str1 = arr1.join(','); | |
| var str2 = arr2.join(','); | |
| bench('==', function(){return str1 == str2}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Array.prototype.stack = function(array){ | |
| this.push.apply(this, array); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
| <style type="text/css"> | |
| .frame { | |
| width: 100px; | |
| height: 100px; | |
| border: 5px solid black; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <style type="text/css"> | |
| .frame { | |
| position: absolute; | |
| width: 100px; | |
| height: 100px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var elmImage = document.createElement('img'); | |
| console.time('clone'); | |
| for(var i=0 ; i<100000 ; i++) | |
| elmImage.cloneNode(false); | |
| console.timeEnd('clone'); | |
| console.time('img'); | |
| for(var i=0 ; i<100000 ; i++) | |
| document.createElement('img'); | |
| console.timeEnd('img'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @namespace url(http://www.w3.org/1999/xhtml); | |
| @-moz-document domain("twitter.com") { | |
| div[data-component-term="user_recommendations"], | |
| div[data-component-term="trends"], | |
| div[data-component-term="footer"], | |
| .fullname{ | |
| display: none !important; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function.prototype.throttleAndDebounce = function(threshold, delay){ | |
| threshold = threshold || 100; | |
| delay = delay || threshold; | |
| var me = this; | |
| var expire = 0; | |
| var timeout; | |
| return function(){ | |
| if(timeout) | |
| clearTimeout(timeout); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @id www.google.com-3ca00d86-e5af-4ad5-beca-fc6012a7500b@to.tumblr.com | |
| // @name Google - Remove Tracking Listener | |
| // @version 1.0 | |
| // @namespace to.tumblr.com | |
| // @include http://www.google.com/search* | |
| // @run-at window-load | |
| // ==/UserScript== | |
| setInterval(function process(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Tombloo.Service.actions.register( { | |
| name : 'Collect File Links', | |
| type : 'context', | |
| execute : function(ctx){ | |
| var self = this; | |
| var urls = {}; | |
| var RE = /((anonym\.to|share|mediafire|send|upload|rapidspread)|(zip|mp3)$)/; | |
| forEach(ctx.document.links, function(l){ | |
| if(RE.test(l.href)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 僕こうかな…けっこう一貫してないけど | |
| // 先頭近辺での揃えのスペースがすごく少ないな | |
| if (( | |
| cond_a || cond_b || | |
| cond_c || cond_d) || cond_e) { | |
| } | |
| test( | |
| value1, value2, | |
| value3, value4); |