Skip to content

Instantly share code, notes, and snippets.

View carlwood's full-sized avatar

Carl Wood carlwood

View GitHub Profile
@benfoxall
benfoxall / Julio.md
Last active December 20, 2015 08:29

Julio (card game)

Deal out all cards (if there are only two people, deal for three leave the extra hand) - the object of the game is to get rid of all your cards.

The person with the 3 of hearts starts (in later games it is the julio).

A player starts a round by playing a one or more of the same card. The next player must play a higher card, and the same number of them (pairs on pairs, etc), or the player can choose not to play (though they can't play for the rest of that round).

Once no-one can/wants to play - the last player gets to start a new round.

// bit of a hack to get lines mid-gutter
.row-fluid{
position: relative
}
[class*="span"]:before{
content:'';
border-right: 1px solid #fff;
position: absolute;
top:0;
height:100%;
@brandonb927
brandonb927 / image-2x.less
Last active December 1, 2019 15:38
@2x LESS CSS Mixin
/**
* I converted the SCSS mixin to LESS for the awesome coders like myself in response to a blog post on 37Signals - http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss
*
* Update: 2014-08-04 - Updated a long-standing bug where retina images were shown no matter what in the first background-image property.
* - Updated retina media query to be more reliable ()
* Update: 2013-11-13 - Picked up another technique thanks to reading this post from Tyler Tate, auto-fill in the second filename for the retina image, http://tylertate.com/blog/2013/06/11/retina-images-using-media-queries-and-LESS-CSS.html
* Update: 2013-04-16 - Have recently found a few use cases when using a retina pattern from Subtle Patterns on the <body>, this has come in handy
* Update: 2013-04-05 - Some research in the Wordpress Core(http://core.trac.wordpress.org/ticket/22238#comment:5) was pointed out that some tests may be redundant (Thanks @kbav) so I've cleaned these up
* Update: 2012-12-29 - U
@benfoxall
benfoxall / persistlocal.js
Created August 20, 2012 11:42
KO local persistence
var persistLocal = function(obj, storeKey, attrs){
var fromLocal = $.parseJSON(localStorage.getItem(storeKey)||'{}');
$.each(attrs.split(' '), function(i, attr){
obj[attr](fromLocal[attr]);
obj[attr].subscribe(function(v){
fromLocal[attr] = v;
localStorage.setItem(storeKey, JSON.stringify(fromLocal));
});
});
};