Skip to content

Instantly share code, notes, and snippets.

View dealingwith's full-sized avatar

Daniel Miller dealingwith

View GitHub Profile
//force redraw for FF hot topic scrolling issue
//longer-term solution here is rework the markup towards more sanity
Collecta.Client.do_hot_topics_redraw = true;
$("#hot_topics").scroll(function(){
console.log("scroll");
//don't be doing this every scroll event,
//that's just a waste of good CPU
if (Collecta.Client.do_hot_topics_redraw === true) {
setTimeout(function() {
console.log("doing redraw");
@dealingwith
dealingwith / gist:883958
Created March 23, 2011 20:57
example sass
.goal_container {
background: #fff;
margin-bottom: 20px;
padding: 0 0 10px 0;
border: 1px solid $main_border;
width: 375px;
@include box-shadow(rgba(0,0,0,0.1), -2px, 2px, 4px);
@include border-radius;
&:hover {
@dealingwith
dealingwith / gist:883967
Created March 23, 2011 21:01
example backbone
Todoblin.Views.Stage = Backbone.View.extend({
initialize: function() {
var self = this;
this.completedTasks = 0;
_.bindAll(this, "render", "fetchGoals", "fetchRewards", "fetchPoints", "pointsUpdate");
this.render();
$("#goals").bind("points.update", function() {
self.completedTasks ++;
if(self.completedTasks % 3 == 0) {
new Todoblin.Views.Notice();
WARNING: Could not read configuration. Using defaults (and options).
No such file or directory - /Users/danielmiller/Documents/workspace/djdc/2010/_config.yml
Auto-regenerating enabled: /Users/danielmiller/Documents/workspace/djdc/2010 -> /Users/danielmiller/Documents/workspace/djdc/2010/_site
[2011-05-17 22:44:25] regeneration: 119 files changed
/Users/danielmiller/.rvm/gems/ruby-1.8.7-p302/gems/home_run-1.0.2/lib/date/format.rb:663: [BUG] Segmentation fault
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10.3.0]
-- control frame ----------
c:0030 p:---- s:0241 b:0241 l:000240 d:000240 CFUNC :_ragel_parse
c:0029 p:0017 s:0237 b:0237 l:000236 d:000236 METHOD /Users/danielmiller/.rvm/gems/ruby-1.8.7-p302/gems/home_run-1.0.2/lib/date/format.rb:663
var stuff = {
"name":""
,"showtimes":{
"Mon":""
,"Tue":""
,"Wed":""
,"Thu":""
,"Fri":""
,"Sat":""
,"Sun":""
@dealingwith
dealingwith / gist:1066514
Created July 6, 2011 03:43
"this code is overly clever"
// some shows have multiple times seperated by commas
// if there is no comma, split just returns an array with the single value in it
// this code is overly clever
todays_showtimes = todays_showtimes[0].split(",");
{
"name":"Mark Levin"
,"showtimes":{
"Mon":"12:00am-4:00am,11:00pm-12:00am"
,"Tue":"12:00am-4:00am,11:00pm-12:00am"
,"Wed":"12:00am-4:00am,11:00pm-12:00am"
,"Thu":"12:00am-4:00am,11:00pm-12:00am"
,"Fri":"12:00am-4:00am,11:00pm-12:00am"
,"Sat":"12:00am-1:00am"
// be able to sort show list
$("#showlist_list").sortable();
// reapply zebra striping to show list after resorting
$("#showlist_list").bind("sortupdate", function(event, ui) {
// construct order array
var sort_array = [];
$("#showlist_list li").each(function(){
modelLoadedCount: 0,
incrementAndCheckModelLoadedCount: function() {
this.modelLoadedCount++;
// do this better than hardcoding the count.
// maybe store models in an object or array and do a count?
// i don't like that idea any better than this at the moment
if (this.modelLoadedCount === 2) {
this.allModelsLoaded();
}
@dealingwith
dealingwith / gist:5681859
Created May 30, 2013 22:44
Undo the tweaked out Rdio designer's recent updates as best as I could
.Canvas_Blur canvas {
display: none !important;
}
.details * {
color: #404040 !important;
}
.bottom {
background: #999 !important;
}
.art_shield {