Skip to content

Instantly share code, notes, and snippets.

View caged's full-sized avatar
🎸

Justin Palmer caged

🎸
View GitHub Profile
// includes bindings for fetching/fetched
PaginatedCollection = Backbone.Collection.extend({
fetch: function(options) {
options || (options = {});
var self = this,
success = options.success;
options.success = function(resp) {
self.trigger("fetched");
if(success) { success(self, resp); }
@romannurik
romannurik / inline_worker_with_fallback.html
Created May 24, 2011 19:16
An example of using simple inline Web Workers with a fallback for browsers that can't support this technique.
<!DOCTYPE html>
<html>
<!--
Copyright 2011 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@jc00ke
jc00ke / nginx.conf
Created August 23, 2011 21:52 — forked from pogodan/tunnel.thor
thor/pow reverse SSH tunnel
server {
listen [YOUR IP]:80;
server_name *.dev.jc00ke.com;
location / {
if ($host ~* "(.*)\.dev\.jc00ke\.com" ) {
set $tunnel_app $1.lvh.me;
}
proxy_set_header X-Real-IP $remote_addr;
@benrasmusen
benrasmusen / statistics-distributions.js
Created October 4, 2011 15:44
JavaScript library for calculating critical values and upper probabilities of common statistical distributions
/*
* NAME
*
* statistics-distributions.js - JavaScript library for calculating
* critical values and upper probabilities of common statistical
* distributions
*
* SYNOPSIS
*
*

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@mbostock
mbostock / .block
Last active October 20, 2022 11:58 — forked from mbostock/.block
Canvas Geometric Zooming
license: gpl-3.0
<!DOCTYPE html>
<html>
<head>
<title>k-means in one dimension</title>
<script src="https://d3js.org/d3.v2.js"></script>
<script src="kmeans.js"></script>
<style>
body { margin: 0; padding: 0; font:normal 12px/20px sans-serif; }
#vis { width: 640px; }
rect.title {
@mbostock
mbostock / .block
Last active July 14, 2019 14:12 — forked from mbostock/.block
Gradient Encoding
license: gpl-3.0
redirect: https://observablehq.com/@d3/gradient-encoding
@mbostock
mbostock / .block
Last active July 14, 2019 14:08 — forked from mbostock/.block
Threshold Encoding
license: gpl-3.0
redirect: https://observablehq.com/@d3/threshold-encoding