Skip to content

Instantly share code, notes, and snippets.

a = function() {
var oldLog = console.log;
var modes = ["duel","ffa","2v2"];
var reg = new RegExp(" to (\\\d*\\\.\\\d*)","i");
var lasts = JSON.parse(localStorage.getItem('stars'))
var lastValues = [lasts[modes[0]],lasts[modes[1]],lasts[modes[2]]];
console.log = function (message) {
var mode = -1
modes.forEach(function (e,i) {
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@danielstocks
danielstocks / gist:5da83982d3b4c7b503a0
Created October 17, 2014 11:38
Pretty print a JavaScript Tree Data Structure
// Example implementation: http://jsfiddle.net/2f7w2fpn/
var indent = 1;
function walk(tree) {
tree.forEach(function(node) {
console.log('--' + Array(indent).join('--'), node.key);
if(node.children) {
indent ++;
walk(node.children);
}
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//