Skip to content

Instantly share code, notes, and snippets.

* rid of lib/server.js
* create/format lib/settings.js
* add a bin-manage.js
* need to change config..tmpl to use that
* add body parsing middleware (knork's)
Unbreak My Build -> Unbreak My Heart - Toni Braxton
End of the Node -> End of the Road - Boyz II Men
You Make Me Wanna -> You Make Me Wanna - Usher
All My Lifetimes -> All My Life - K-Ci & JoJo
How Deep Is Your Callstack -> How Deep Is Your Love - Dru Hill
Ignition (Remix) -> Ignition (Remix) - R. Kelly
Can We Lock -> Can We Talk - Tevin Campbell
I Pair -> I Swear - All-4-One
This Is How We Do It -> This Is How We Do It - Montell Jordan
LAMP There It Is -> Whoomp There It Is -> Tag Team
@jefflembeck
jefflembeck / gist:0829b09ff66357949598
Created January 30, 2015 21:36
i++ vs. ++i vs i += 1

JavaScript has a few different ways to increment a digit by one, and it's important to understand how each of them work.

Examples:

var i = 0;
var a = i++;

What does a equal here?

### Keybase proof
I hereby claim:
* I am jefflembeck on github.
* I am jefflembeck (https://keybase.io/jefflembeck) on keybase.
* I have a public key whose fingerprint is FAA5 1B1B E9EA 5C12 95D1 B777 78B3 99C1 C44E 0460
To claim this, I am signing this object:
@jefflembeck
jefflembeck / Test case
Created May 28, 2014 16:46
Picture Test case - 100vw, multiple srcset
<img alt="[...]"
sizes="100vw"
srcset="
/case_gallery/smart_p.jpg 320w,
/case_gallery/smart_l.jpg 480w,
/case_gallery/tablet_p.jpg 768w,
/case_gallery/tablet_l.jpg 1024w,
/case_gallery/desktop.jpg 1280w
">

Keybase proof

I hereby claim:

  • I am jlembeck on github.
  • I am jefflembeck (https://keybase.io/jefflembeck) on keybase.
  • I have a public key whose fingerprint is FAA5 1B1B E9EA 5C12 95D1 B777 78B3 99C1 C44E 0460

To claim this, I am signing this object:

@jefflembeck
jefflembeck / gist:8413366
Created January 14, 2014 05:04
I feel like this functionality should and likely already does exist. I just can't seem to get it in my head.
Array.prototype.superMap = function( fn ){
return this.map( function( x ){
return fn.call(x);
}
};
First, I have to come clean. When [Scott tweeted about wanting a web app version of Grunticon](https://twitter.com/scottjehl/status/345618924219539458) a couple of weeks ago, I had never used Grunticon. Actually, still to this day I've never used Grunticon. Shocking...I know.
Of course, I had heard of it. I am a big proponent of using Grunt and use it everywhere to help automate my life. And I follow enough people on Twitter/read enough blogs/listen to enough podcast to have gotten ample exposure to Grunticon and it sounded really cool. So when I saw Scott's tweet I took to action.
Before reading on, if you're not familiar with [Grunticon](http://filamentgroup.com/lab/grunticon/) or [Grumpicon](http://www.grumpicon.com/), check those out first.
Here are kind of the steps on how Grumpicon works:
1. Handle drag and dropped SVG files
2. Read the SVGs
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
@jefflembeck
jefflembeck / gist:2040712
Created March 15, 2012 00:33 — forked from dangayle/gist:2040573
jquery slider loop thing
//Originally from http://trendmedia.com/news/infinite-rotating-images-using-jquery-javascript/
var InfiniteRotator =
{
itemInterval: 3000,
infiniteLoop: function() {
setInterval(function(){
$('.sliderItem').eq(currentItem).stop().transition({opacity: 0},2000);
//if at last item, reset currentItem to 0