Skip to content

Instantly share code, notes, and snippets.

@rglepper
rglepper / jquery.ba-tinypubsub.js
Created May 29, 2012 05:52 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
/*!
* jQuery Tiny Pub/Sub - v0.X - 11/18/2010
* http://benalman.com/
*
* Original Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*
* Made awesome by Rick Waldron
*
@rglepper
rglepper / gist:3097345
Created July 12, 2012 10:42 — forked from sgreenfield/gist:1557278
Compass font-face mixin
@mixin font-face(
$name,
$font-files,
$eot: false,
$weight: false,
$style: false
) {
$iefont: unquote("#{$eot}?iefix");
@font-face {
font-family: quote($name);
%display-block-hacked {
display: block;
*zoom: 1;
}
%clear-both {
clear : both;
}
%blank-as-table {
@rglepper
rglepper / git-delete-merged-branches.txt
Created September 25, 2014 05:19
Delete all merged branches
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
@rglepper
rglepper / git-track-all-remotes.txt
Created September 25, 2014 05:21
Git track all remote branches
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do git branch --track ${branch##*/} $branch; done
<?php if (($wp_query->current_post +1) == ($wp_query->post_count)) {
echo 'This is the last post';
} ?>
<?php if (($wp_query->current_post +1) != ($wp_query->post_count)) {
echo 'This is the not the last post';
} ?>