Joined January 2013
·

Jeremy

orange monks
orange monks
·
Raleigh NC
·
·

Posted to Signing Amazon S3 URLs over 1 year ago

nevermind, didn't read far enough in the doc

Posted to Signing Amazon S3 URLs over 1 year ago

You don't need the CONTENT-MD5 or CONTENT-TYPE in the signature? http://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html

@zhimingwang i'm guessing it's detecting that it's the wrong format (file says .md, lexer doesn't agree)

Posted to Pause on error in Batch File over 1 year ago

@steve-jansen Interesting. Does this work when calling another file, or 'subroutine'? i can't get CALL <somefile> %errorhandler% to behave.

And if you still want to 'rethrow' the error, the following seems to work:

SET errorhandler=^|^| ^(PAUSE ^&^& EXIT /B %errorlevel%^)
Posted to 2-page view in Google Docs over 1 year ago

@verymickey yup, unfortunately

Posted to Bootstrap without all the debt over 1 year ago

Great discussion. As long as you've made it this far in the comments, I thought I'd mention another framework comparing itself to Bootstrap's semantic deficiencies -- http://semantic-ui.com/. I haven't used it beyond a brief review, but it looks pretty good on the surface. One really neat feature is the javascript console debugging/tracking which details the performance of animations via console.table.

Posted to jQuery DOM cache object over 1 year ago

You may as well just declare a global object rather than a generic cache -- you should get the benefit of Intellisense from many IDE's, which you won't from magic strings.

Also, $ME = { h1: $('h1'), somethingelse: $('whatever') } and $ME.yetanother = $('etc') is much less complicated.

@jlukic are all those crazy console.XYZ methods chrome-specific? I've never encountered console.table, although I think I've seen .groupCollapsed before.

and not to be off-topic but semantic-ui looks awesome. i really like the idea.

@philfreo -- mostly because i like rewriting stuff; there wasn't anything wrong with your post. i did:

  1. wrap it in a closure because everybody loves closures
  2. allow you to call the plugin on multiple elements (i.e. $('p').getTextSize() would work "correctly" on multiple paragraphs, as they could differ)
  3. get width or height (rather than just width)
  4. or get any font property rather than just 'width' and 'height'

you can kinda see a comparison in the fiddle.

Posted to Why never use new Array in Javascript over 1 year ago

I'm going to agree with both @jjperezaguinaga and @creationix -- while new Array(n) is most of the time unnecessary, it is faster than just attaching items to non-existant indexes, and certainly faster than pushing.

Also, I "fixed" and extended @jjperezaguinaga perf tests to demonstrate this more clearly, as well as nearly doubling the performance of the original tailmap (why arguments.callee rather than just tail_map recursion?).

http://jsperf.com/tail-vs-iterative/2

Posted to Empty a DOM element over 1 year ago

that's what i thought i was pointing to -- your ref is newer than latest, so it's a little different. i was only mentioning it as a comparison between your tip and how jQuery does it.

Posted to Safe serialize & unserialize PHP over 1 year ago

doesn't base64 also result in ~20% larger content? json_*code ftw, since you can use it directly in the frontend.

Posted to PHP5 Micro Frameworks over 1 year ago

@xeoncross I randomly came across your framework, used it, and thought it was awesome. In fact, I borrowed a bunch of it to try to make WP development easier.

Posted to Empty a DOM element over 1 year ago

looks similar to jQuery('something').empty().

search for empty: function in the source to see how they do it

Posted to Intercepting JavaScript methods over 1 year ago

every time i see underscore.js used somewhere, it just gets more awesome.

Posted to So you want to choose an IDE eh? over 1 year ago

I've found that Visual Studio 2012 (with the Web Essentials extension and/or Mindscape Web Workbench for preprocessors) is surprisingly a really great front-end IDE -- and don't let the MS scare you :)

It's got most of the stuff you mention, and the Express edition is free. Scott Hanselman has some great blog posts about the new features.

Thoughts? http://codepen.io/zaus/pen/nfEKg

Let me know if I'm citing you enough :)

Some updates, made as plugin on GitHub -- see post https://coderwall.com/p/ziynxq

Yeah I was thinking about that with the .clone+adjacent idea, now need to do it manually. Good call.

Update font seems to include line-height at least. I've added an option to extend the font value passed to include other properties

Just wrote what I think is a more comprehensive test scenario:

Note that the performance varies between the nested and flat DOMs.

@philfreo Good call on nth-child; also goes for appending it to parent rather than bottom of page.

But I can see how getting the font each time would be beneficial, as it's guaranteed to adjust to external effects. Some playing around: http://jsfiddle.net/drzaus/J2PhC/11/

It could probably be more accurate if you cloned the current element and appended it right next to it, hidden, so that it gets targeted by the exact same CSS rules as the target element. Then you wouldn't need to manually copy the css.

Posted to Splitting lists with CSS3 over 1 year ago

Good idea, but doesn't work for larger elements, or as @sembrestels said for longer lists: http://jsfiddle.net/S8NBy/7/

Posted to SASS/SCSS - Index Lookup in Loops over 1 year ago

You can also do something similar with multidimensional lists -- http://stackoverflow.com/questions/6572588/sass-each-with-multiple-variables

wth coderwall -- roman numerals? nested numbering?

Posted to Ajaxify a function in ASP.Net over 1 year ago

weird!

Posted to One line browser notepad over 1 year ago

@paulnormannz whoa, font styles! ctrl+s doesn't actually save the content for me, just the blank datauri page.

Posted to One line browser notepad over 1 year ago

Hm...seems Chrome throws security errors when trying to access localStorage from data-uri. Otherwise you'd just tack on:

<script>(function(b,l,k){b.innerHTML=l.getItem(k);b.addEventListener("keypress",function(e){l.setItem(k,b.innerHTML)},false)})(document.body,localStorage,"bkmlt.ntpd")</script>
Achievements
841 Karma
93,332 Total ProTip Views