Skip to content

Instantly share code, notes, and snippets.

View bjankord's full-sized avatar
🎵
Chillin'

Brett Jankord bjankord

🎵
Chillin'
View GitHub Profile
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@bjankord
bjankord / gist:4245356
Created December 9, 2012 14:43 — forked from anonymous/gist:545079
Fix label click issue on iPad
//http://v4.thewatchmakerproject.com/blog/how-to-fix-the-broken-ipad-form-label-click-issue/
$(document).ready(function () {
if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i)) {
$('label[for]').click(function () {
var el = $(this).attr('for');
if ($('#' + el + '[type=radio], #' + el + '[type=checkbox]').attr('selected', !$('#' + el).attr('selected'))) {
return;
} else {
$('#' + el)[0].focus();
@bjankord
bjankord / mq.css
Created October 3, 2012 20:15 — forked from chriscoyier/mq.css
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
@bjankord
bjankord / css-responsive-images.html
Created May 2, 2012 01:12 — forked from necolas/css-responsive-images.html
Idea for CSS-only responsive images using CSS3 generated content and attr() function. Added media query for high-resolution devices. No browser implementation as of May 2011
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS responsive images</title>
<style>
/* Doesn't stop original source image being
downloaded too */
@media (min-device-width:600px) {