Joined February 2012
·

Couto

Front-End Developer at Triworks.net
·
Aveiro, Portugal
·
·
·

I think that it's also important to know that this limit is per stylesheet and you can @import 31 stylesheets.

reference: http://stackoverflow.com/questions/9906794/internet-explorers-css-rules-limits

function log() {
  console.log.apply(console, [].slice.call(arguments, 0));
}

log('hello', 'world');
log('%c this sentence is coloured', 'background-color: yellow; color: blue');

this way you still support multiple arguments ;)

Posted to Cloning Javascript Objects over 1 year ago
var originalObject = {
  div: document.createElement('div')
}

var clonedObject = JSON.parse(JSON.stringify(originalObject)); // TypeError: Converting circular structure to JSON
Posted to ~~ is faster than Math.floor() over 1 year ago

Besides all the downsides of using ~~, I'll just leave this here about micro performance tests: http://www.youtube.com/watch?v=65-RbBwZQdU

Posted to Convert `arguments` into an Array over 1 year ago

Since I'm a pretty lazy dev, I tend to use:

var args = [].slice.call(arguments, 0);

probably not as performant as Array.prototype but a lot shorter ;)

The closest thing I can think of is Pixelapse or LayerVault although I can't really say they are are exactly like what you're asking.

Posted to Brevity in JavaScript over 1 year ago

var
b = '1837727366484959938' | 0; // -1722178816

Posted to Excluding files from git locally over 1 year ago

@sujaykrishna Thanks for the all the info =)

Posted to Excluding files from git locally over 1 year ago

@sujaykrishna Why is your case better than the method in the protip?

I didn't know any of those... It's just honest curiosity =)

You might also want to take a look at z

After you cd into a couple of directories, you'll just have to do:

$> z folderName <enter>

@richthegeek those are nice features. You should wrap those in a component and distribute them.
Ultimately they still rely on console.log which breaks older IE's. So you have three options:

a) You overwrite with an empty function.
b) You wrap them in if statements that would evaluate if you are in a production or development environment.
c) You remove them completely.

With empty functions, you loose time calling empty functions... Performance wise, it's usually not significant but sometimes you just can't afford that.

With if statements, you create dead code, and if by accident you make a mistake in the evaluation you might call a console.log and break older IE's

To remove console.log statements entirely, is in my opinion the correct stance in this situation. You don't create dead code, and you don't waste time calling empty functions.

Anyway, every developer has a different workflow. This tool might not fit in your workflow, but it does in mine.

Luckily for all of us, older IE's are losing marketing share, which will render groundskeeper useless along the way and for that... I'm happy.

@richthegeek Probably I didn't understand your comment but.
Are you just stating that you have a nice function, or are you having a trouble using groundskeeper

Achievements
241 Karma
8,368 Total ProTip Views