Skip to content

Instantly share code, notes, and snippets.

View jeffmicklos's full-sized avatar

Jeff Micklos jeffmicklos

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jeffmicklos on github.
  • I am jeffmicklos (https://keybase.io/jeffmicklos) on keybase.
  • I have a public key whose fingerprint is 38ED E876 4C8B BF73 A77E 2665 0881 B01F 3F4B BFFD

To claim this, I am signing this object:

$.extend(MyClass.prototype, {
method: function() {
var i = 0,
stacey = hair,
crazy = hair.length;
for(;1<=crazy;1++) {
console.log("Let's face it, this is an infinite loop");
}
@jeffmicklos
jeffmicklos / gist:1784946
Created February 10, 2012 01:04
menu model and controller
Menu = {
active: false,
activeID: null,
togglePairs: {
'menu': {
'trigger': $('#menu'),
'expandable': $('#menu-expandable')
},
@jeffmicklos
jeffmicklos / gist:1761762
Created February 7, 2012 20:30
child selector
.status-message {
width: 300px;
height: 30px;
color: #f1f1f1;
font-size: 12px;
font-weight: bold;
box-shadow: 0 0 0 1px #111;
border: 1px solid rgba(255, 255, 255, 0.1);
background-image: linear-gradient(bottom, rgb(44,44,44) 31%, rgb(57,57,57) 74%);
@jeffmicklos
jeffmicklos / gist:1329185
Created October 31, 2011 22:09
Programming 101 - if you fail this, I don't want you.
// 1) Write a loop that prints out 1 - 50
// 2) Now I want the same output but without a loop
// 3) Now if current number if a multiple of 3, print 'Fizz' instead of the number
// If it is a multiple of 5 print 'Buzz' instead of the number
// If it is a multiple of 3 and 5, print 'FizzBuzz' instead of the number
@jeffmicklos
jeffmicklos / python love
Created October 3, 2011 08:11
make one script file from all passed in
<%def name="js()">
${ h.javascript_link(
'/js/file1.js',
'/js/file2.js',
minified=True,
combined=True,
combined_filename='package') }
</%def>
@jeffmicklos
jeffmicklos / iterator
Created March 21, 2011 18:20
1 - 1000 without a loop
var iterator = function iterator(num) {
if(num < 1000) {
num++;
console.log(num);
iterator(num);
}
}(0);
<?php
//A short and simple controller/end-point for Mootube AJAX calls...
//This example uses cURL to fetch data but you can use file_get_contents or whatever you please...
//This example also uses PHP's json features, which are only available in PHP5+
//LASTLY, i love you.
$ids=explode('|',$_GET['ids']);
array_pop($ids);
$holder=array();