Skip to content

Instantly share code, notes, and snippets.

@linuxfood
linuxfood / gist:1523175
Created December 27, 2011 09:47
Fan out task distribution test
/*
Results (Tests run on a Core i7 Mac with 8gb of RAM).
NOTE: These results are not meant to be statistically
significant, only to give a glimpse at the behavior of
the Rust scheduler so far. I've run each of the below
configurations more times than I show below, these are
just a sample of each. Independent runs show basically
the same behavior*.
@linuxfood
linuxfood / gist:1474361
Created December 13, 2011 23:02
Django ModelForm custom fields in ModelAdmin
from django.contrib import admin
from django import forms
class MyModelAdmin(admin.ModelAdmin):
# ...
def get_form(self, request, obj=None, **kwargs):
form_factory = super(MyModelAdmin, self).get_form(request, obj, **kwargs)
form_factory.base_fields['my_custom_field'] = forms.CharField(widget=forms.Textarea(), required=True)
# ...
def save_model(self, request, obj, form, change):
--- a/cttt.user.js
+++ b/cttt.user.js
@@ -339,7 +339,7 @@ function letsJQuery() {
};
return new _timer(interval, callback);
};
-
+ waitPlugins($);
posts = $('div.post')
max_post = posts.length