Skip to content

Instantly share code, notes, and snippets.

@jgchristopher
jgchristopher / gist:3231943
Created August 2, 2012 00:38
Render dGrid Header Cell to have a dijit
renderHeaderCell: lang.hitch(this,function(node) {
var checkbox = new CheckBox({
value : false,
label : "Include All ?",
onClick: lang.hitch(this, function(state) {
this._selectAll(state);
}),
declaredClass: "invoice-grid-include-all",
class : "invoice-grid-include-all"
});
@rygorous
rygorous / magic_ring.cpp
Created July 22, 2012 03:55
The magic ring buffer.
#define _CRT_SECURE_NO_DEPRECATE
#include <stdio.h>
#include <string.h>
#include <Windows.h>
// This allocates a "magic ring buffer" that is mapped twice, with the two
// copies being contiguous in (virtual) memory. The advantage of this is
// that this allows any function that expects data to be contiguous in
// memory to read from (or write to) such a buffer. It also means that
@NZKoz
NZKoz / aa_instructions.md
Created May 2, 2012 03:07
Back Up All Your Gmail
  • Install getmail (aptitude install getmail4)
  • Set Up Your Imap Server (tl;dr)
  • getmail
  • ruby date_based_archive.rb ~/Maildir/.Archive