Skip to content

Instantly share code, notes, and snippets.

View meandavejustice's full-sized avatar

Dave Justice meandavejustice

View GitHub Profile
@staltz
staltz / introrx.md
Last active April 21, 2025 04:15
The introduction to Reactive Programming you've been missing
;; Very quick hack to use `grasp` for searching js tokens in emacs.
;; Uses (compile) so when you get search results you can quickly step through them with (next-error) and (previous-error)
;; to install:
;; $ npm install -g grasp strip-ansi
(defun grasp-current-buffer (arg)
(interactive "MGrasp: ")
(compile (concat "grasp -H '" arg "' " (buffer-file-name) " | strip-ansi")))
@debasishg
debasishg / gist:8172796
Last active April 20, 2025 12:45
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
@zackbloom
zackbloom / gist:7774909
Created December 3, 2013 18:36
Bookmarklet to run sortable.js (http://github.hubspot.com/sortable/docs/welcome/) on every table on the page
javascript:(function()%7B(function()%7Bvar%20a%2Cb%2Cc%2Cd%2Ce%2Cf%3Ba%3D%22table%5Bdata-sortable%5D%22%2Cc%3D%2F%5E-%3F%5B%C2%A3%24%C2%A4%5D%3F%5B%5Cd%2C.%5D%2B%25%3F%24%2F%2Cf%3D%2F%5E%5Cs%2B%7C%5Cs%2B%24%2Fg%2Ce%3D%22ontouchstart%22in%20document.documentElement%2Cb%3De%3F%22touchstart%22%3A%22click%22%2Cd%3D%7Binit%3Afunction(b)%7Bvar%20c%2Ce%2Cf%2Cg%2Ch%3Bfor(null%3D%3Db%26%26(b%3D%7B%7D)%2Cnull%3D%3Db.selector%26%26(b.selector%3Da)%2Ce%3Ddocument.querySelectorAll(b.selector)%2Ch%3D%5B%5D%2Cf%3D0%2Cg%3De.length%3Bg%3Ef%3Bf%2B%2B)c%3De%5Bf%5D%2Ch.push(d.initTable(c))%3Breturn%20h%7D%2CinitTable%3Afunction(a)%7Bvar%20b%2Cc%2Ce%2Cf%2Cg%3Bif(1%3D%3D%3Da.tHead.rows.length%26%26%22true%22!%3D%3Da.getAttribute(%22data-sortable-initialized%22))%7Bfor(a.setAttribute(%22data-sortable-initialized%22%2C%22true%22)%2Ce%3Da.querySelectorAll(%22th%22)%2Cb%3Df%3D0%2Cg%3De.length%3Bg%3Ef%3Bb%3D%2B%2Bf)c%3De%5Bb%5D%2C%22false%22!%3D%3Dc.getAttribute(%22data-sortable%22)%26%26d.setupClickableTH(a%2Cc%2Cb)%3Breturn%20a%7D%7D
@pid
pid / create-bootable-tails-usb-stick
Last active June 8, 2021 05:37
CREATE BOOTABLE TAILS USB-STICK https://tails.boum.org/ (OSX) Tails is a live operating system, that you can start on almost any computer from a DVD, USB stick, or SD card. It aims at preserving your privacy and anonymity, and helps you to: use the Internet anonymously and circumvent censorship; Alle Internet-Verbindungen werden zwingend durch d…
#!/usr/bin/env bash
###########################################################
# create bootable tails usb-stick https://tails.boum.org/ #
# !!! Read the comments !!! CHANGE <diskN> placeholder #
###########################################################
# get iso
wget http://dl.amnesia.boum.org/tails/stable/tails-i386-0.21/tails-i386-0.21.iso
@jfdm
jfdm / xmonad-cheatsheet.tex
Created October 13, 2013 13:41
A simple xmonad cheatsheet.
\documentclass[pdftex, 12pt, a4paper, british, final]{article}
\usepackage[l2tabu,orthodox]{nag}
\usepackage{fixltx2e}
\usepackage{babel}
\usepackage[strict=true]{csquotes}
\usepackage{isodate}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[protrusion=true, expansion=true]{microtype}
@RobertAudi
RobertAudi / moc-on-osx.md
Last active February 18, 2025 03:52
This is a walkthrough on how to install the MOC command-line music player on OS X. The procedure was tested in Mountain Lion.

MOC on OS X

I waited for years for a Homebrew formula for MOC. I finally found one today, but it didn't work for me. So I decided to try to compile it from source.

Requirements

Here is a list of requirements, taken directly from the MOC README:

@justinabrahms
justinabrahms / gist:6027925
Last active December 19, 2015 22:29
Node.js script which transforms old-style AMD modules into modules with the sugar syntax outlined in http://requirejs.org/docs/whyamd.html#sugar The code is ugly and procedural, but it solves a need. *NOTE*: This hasn't yet been validated to work. Specifically it doesn't provide a return statement which the requirejs documentation indicates it s…
#!/usr/bin/env node
/**
* Transforms code from old-style requirejs modules into AMD sugared modules.
*
* define(['dep1','dep2'], function(arg1, arg2) {...})
*
* becomes:
*
* define(function(require) { var arg1 = require('dep1'), arg2 = require('dep2'); ... });
*
@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: