View gibberish.rake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
require(File.join(File.dirname(__FILE__), 'config', 'boot')) | |
require 'rake' | |
require 'rake/testtask' | |
require 'rake/rdoctask' | |
require 'tasks/rails' | |
require 'fileutils' | |
View CSS for Mad Libs styie forms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.mad-lips label { | |
white-space: nowrap; | |
padding: 0 0 .5em; | |
display: -moz-inline-stack; | |
display: inline-block; | |
vertical-align: top; | |
zoom: 1; | |
*display: inline; | |
} |
View jQuery_reverse.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.reverse = [].reverse; |
View trim.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add trim to String Object | |
String.prototype.trim = function() { | |
return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '') | |
} |
View make_a_block_clickable.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MAKE the whole block actionable with CSS only. | |
<div id="block" title="read more about ..."> | |
<h3><a href="...">Some title here</a></h3> | |
<p>bla bla bla .... bla!</p> | |
</div> | |
*/ |
View gregor-multiple-group-bys-sort-by-sumd-group-values.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- http://stackoverflow.com/questions/3585467/multiple-group-bys-sort-by-sumd-group-values | |
SELECT | |
project_name, service_name, project_minutes, minutes | |
FROM | |
( | |
SELECT | |
projects.id as project_id, | |
projects.name as project_name, | |
services.name as service_name, |
View mite.add_all_projects_for_timetracker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:void(function(){$("#user_allow_project%20optgroup").each(function(){var%20optgroup=this;$(optgroup).find('option').each(function(){$('form%20ul.remove_children_on_reset').append('<li%20class=""><input%20type="hidden"%20value="'+this.value+'"%20name="user[allowed_projects_ids][]"><strong>'+$(this).text()+'%20('+optgroup.label+')'+'</strong><a%20class="remove_project"%20href="#">x</a></li>')});$(optgroup).remove()})})(); |
View safari5_bugreport.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Preconditions: | |
* set your timezone to Auckland, New Zealand. | |
Description | |
There is a bug with the Date Object. »new Date("2010/9/26")« returns | |
»Sat Sep 25 2010 23:00:00 GMT+1200 (NZST)« |
View mite.load_billable_time_for_today.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.get( | |
'/time_entries.json?at=today&billable=true&group_by=day', | |
function(data) { alert($mite.minutes.minToStr(data[0].time_entry_group.minutes))} | |
); |
View jquery.focus_select.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.fn.focus_select = function() { | |
return this.each(function(){ | |
var $this = jQuery(this); | |
if ( $this.is('select') ) { | |
$this.focus() | |
} else { | |
$this.select() | |
} | |
}) | |
} |
OlderNewer