Skip to content

Instantly share code, notes, and snippets.

View davidmars's full-sized avatar
☠️
looking for the skateboard emoji.

david davidmars

☠️
looking for the skateboard emoji.
View GitHub Profile
/**
* For slackers... Quick methos selectors pluggin dealing with attribute names and values.
* @author David Marsalone
* @example $(".myslector").findByAttr("my-attribute-name","my attribute value");
* @example $(".myslector").filterByAttr("my-attribute-name","my attribute value");
*/
(function ( $ ) {
/**
* Quick method to get the descendants of each element in the current set of matched elements, filtered by an attribute name and its value
* @param {string} attributeName The attribute name you are looking for.
@jayj
jayj / flexbox.less
Last active June 23, 2024 01:14
CSS3 Flexbox - LESS Mixins
// --------------------------------------------------
// Flexbox LESS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
// flex or inline-flex
.flex-display(@display: flex) {
display: ~"-webkit-@{display}";
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox
@michaelwills
michaelwills / gist:1053807
Created June 29, 2011 13:20
Extending a redbeanphp model to handle instantiation with IDE code hints
<?php
// in BaseSimpleModel.php
class BaseSimpleModel extends RedBean_SimpleModel {
/**
* Get or create a model with the bean set
* @static
* @param string $table