Skip to content

Instantly share code, notes, and snippets.

@kris-g
kris-g / Twitter Bootstrap Radio Button Form Inputs.html
Created July 13, 2012 22:01
Clean way to bind result value of bootstrap radio buttons to a single form input
<form>
<div class="btn-group" data-toggle-name="is_private" data-toggle="buttons-radio" >
<button type="button" value="0" class="btn" data-toggle="button">Public</button>
<button type="button" value="1" class="btn" data-toggle="button">Private</button>
</div>
<input type="hidden" name="is_private" value="0" />
</form>
@kris-g
kris-g / gist.css
Created July 13, 2012 23:14
Tumblr Gist css
.gist {
color: #000000;
}
.gist div {
margin: 0;
padding: 0;
}
.gist .gist-file {
border: 1px solid #DEDEDE;
font-family: Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;
@kris-g
kris-g / gist.js
Created July 14, 2012 00:01
Tumblr Gist Embed JavaScript with Auto Hide footer
var gistPrefix = 'https://gist.github.com/',
cachedWrite = document.write,
body = $('body'),
gists = $('p.gist').map(function(n, p) {
p = $(p);
var a = $('a', p),
href = a.attr('href');
if (a.length && href.indexOf(gistPrefix) == 0) {