Skip to content

Instantly share code, notes, and snippets.

#lis_login {
position: absolute;
top: -195px;
right: 18px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
jQuery.fn.exists = function() {
return (this.length > 0)
}
jQuery.fn.doAwesomeScrollingThing = function() {
return this.each(function() {
$(this).click(function(event) {
target = $('#' + this.href.split('#')[1])
@fixlr
fixlr / .rspec
Created March 2, 2011 16:25
Collection of files I like to have in new ruby projects
--color
--format nested
@fixlr
fixlr / gist:838108
Created February 22, 2011 02:29
Reading list

Clean Code

Metaprogramming in Ruby

usage: git flow <subcommand>
Available subcommands are:
init Initialize a new git repo with support for the branching model.
feature Manage your feature branches.
release Manage your release branches.
hotfix Manage your hotfix branches.
Try 'git flow <subcommand> help' for details.
@fixlr
fixlr / dialog.js
Created December 30, 2010 14:24
Pseudo-code example of something I'm working on
$('.button.dialog').click(function() {
$('#dialog').load(this.href, function() {
$('#dialog .close').click(function() {
$('#dialog').hide().html('');
return false;
});
$(document).keyup(function(e) {
if (e.keyCode == 27) { $('#dialog .close').click(); } // esc
});
@fixlr
fixlr / colors
Created November 17, 2010 17:15
[color]
diff = auto
status = auto
branch = auto
@fixlr
fixlr / gist:661645
Created November 3, 2010 20:19
modal stuff
// Modal Window //
$('#dialog').hide;
//select all the a tag with name equal to modal
$('a[name=modal]').click(function(e) {
$('#dialog').show;
//Cancel the link behavior
e.preventDefault();
var divid = "#dialog";
var lnk = $(this).attr('href');
var title = $(this).attr('title');
$(document).ready(function() {
$('.labels-inside input[type="text"]').add('.labels-inside textarea').each(function() {
var label = $(this).prev('label[for="'+$(this)[0].id+'"]').hide().html();
$(this).focus(function() {
if ($(this).val() == label) {
$(this).val('').removeClass('description');
}
});
$(this).blur(function() {
@fixlr
fixlr / gist:593698
Created September 23, 2010 14:30
Clear & fill search input field
$(document).ready(function() {
$('#search').focus(function() {
if ($(this).val() == $(this)[0].title) {
$(this).val('');
}
});
$('#search').blur(function() {
if ($(this).val() == '') {
$(this).val($(this)[0].title);