Skip to content

Instantly share code, notes, and snippets.

View bburns's full-sized avatar
:electron:

Brian Burns bburns

:electron:
View GitHub Profile
@janpaul123
janpaul123 / SimpleBlobDetector.js
Last active May 21, 2023 09:21
OpenCV SimpleBlobDetector port to OpenCV.js
// Port of https://github.com/opencv/opencv/blob/a50a355/modules/features2d/src/blobdetector.cpp
// But with special `faster` option which has slightly different semantics,
// but is a whole bunch faster.
function diff(v1, v2) {
if (v1.x !== undefined) return { x: v1.x - v2.x, y: v1.y - v2.y };
return v1.map((value, index) => value - v2[index]);
}
function norm(vector) {
@jonlabelle
jonlabelle / npm_vs_yarn_command_translation_cheatsheet.md
Last active April 11, 2024 15:26
npm vs yarn command translation cheat sheet
@nicolasdao
nicolasdao / open_source_licenses.md
Last active May 9, 2024 10:14
What you need to know to choose an open source license.
@cwey
cwey / quantize.js
Last active March 22, 2019 01:45 — forked from nrabinowitz/quantize.js
Fixed the two issues reported by leeoniya and by iOSBrett * green is being used again here instead of blue. (line 233) * incorrectly used rval 3 times (line 189)
/*!
* quantize.js Copyright 2008 Nick Rabinowitz.
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
// fill out a couple protovis dependencies
/*!
* Block below copied from Protovis: http://mbostock.github.com/protovis/
* Copyright 2010 Stanford Visualization Group
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php
@anantn
anantn / firebase_chat.html
Created May 6, 2013 18:13
A simple, plugin-free chat room - build with Firebase
<html>
<head>
<script src="https://cdn.firebase.com/v0/firebase.js"></script>
</head>
<body>
<ul id="chat-list">
</ul>
<input type="text" id="msg"/>
<input type="button" id="send" value="Send"/>
<script>
@nikolaplejic
nikolaplejic / gist:3654637
Created September 6, 2012 10:36
How to copy/paste your password in PayPal's change password form
PayPal blocks copy/paste actions in their "change password" form,
citing some irrelevant security issues as the reason. That's a
load of crap, and they know it -- disabling copy/paste makes it a
lot harder to use a decent password generator and a lot easier to
screw up your pwd when retyping, especially if it's a long one
(as it should be!).
So, here's the quick'n'dirty way to use an externally generated
password in your PayPal account:
@migurski
migurski / polygonize.py
Created April 25, 2012 22:16
Polygonize a bag of lines
from sys import argv
from shapely.ops import polygonize
from shapely.geometry import asShape, LineString
import json
if __name__ == '__main__':
input = argv[1]
input = json.load(open(input))
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@drj42
drj42 / org-mode-reference-in.org
Created February 6, 2012 23:53
This is a cheat sheet for Emacs org-mode... in org-mode format!
@nrabinowitz
nrabinowitz / quantize.js
Created July 25, 2011 17:19
Javascript module for color quantization, based on Leptonica
/*!
* quantize.js Copyright 2008 Nick Rabinowitz.
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
// fill out a couple protovis dependencies
/*!
* Block below copied from Protovis: http://mbostock.github.com/protovis/
* Copyright 2010 Stanford Visualization Group
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php