Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View thejefflarson's full-sized avatar
👨‍👩‍👧‍👦
being a dad

Jeff Larson thejefflarson

👨‍👩‍👧‍👦
being a dad
View GitHub Profile
module Daybreak
class BackgroundCompaction
def initialize(file, options = {})
@db = Daybreak::DB.new(file)
@thread = Thread.new(&method(:run))
@options = options
end
def stop
@stop = true
require 'thread'
require 'zlib'
class Daybreak
include Enumerable
def initialize(file)
@file = file
@out = File.open(@file, 'ab')
@queue = Queue.new
+-----------------------------+
| ^^^^ / ~|
| ^^^ --------- /|
| ^^ Simple / -------- |
| / ~ / ** |
| / / **** |
| ---- ~ / ****** |
| / ~~ --- ****** |
| / / **** |
| / ~~ / ⌂⌂⌂⌂|
function(){
var $$ = function(query){
!!(query && query.nodeType == 1) ?
this.dom = [query]
:
this.dom = [].slice.call(document.querySelectorAll(query));
};
$$.prototype.remove = function(){
this.dom[0].parentNode.removeChild(this.dom);
(function(){
var $$ = function(query){
!!(query && query.nodeType == 1) ?
this.dom = query
:
this.dom = document.getElementById(query);
};
$$.prototype.remove = function(){
this.dom.parentNode.removeChild(this.dom);
(function(){
var $$ = function(query){
!!(query && query.nodeType == 1) ?
this.dom = query
:
this.dom = document.getElementById(query);
};
$$.prototype.remove = function(){
this.dom.parentNode.removeChild(this.dom);
(function(){
var $$ = function(query){
!!(query && query.nodeType == 1) ?
this.dom = query
:
this.dom = document.getElementById(query);
};
$$.prototype.remove = function(){
this.dom.parentNode.removeChild(this.dom);