Skip to content

Instantly share code, notes, and snippets.

View spoeken's full-sized avatar

Mathias Madsen Stav spoeken

View GitHub Profile
@wesbos
wesbos / tab-trigger.js
Created November 16, 2015 19:33
How to properly get a TAB trigger working with Emmet inside of JSX
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
"context": [
{
@jrgcubano
jrgcubano / gist:56e3204ecc661b09c16a
Last active August 13, 2017 12:51
Facial recognition and training with node js
// Starkflow comments + github project node js
// + https://github.com/jrgcubano/face-detection-node-opencv
// + http://blog.stevenedouard.com/stroll-node-facial-recognition-3rd-party-apis/
I believe that you're using the node-opencv library ? You will need some more steps. You have to train your opencv system which than allows you to use the method "predictSync" from FaceRecongizer().
The node-opencv library has a FaceRecognizer Object which you first initialize.
Initialize FaceRecognizer: var FaceRecognizer = new cv.FaceRecognizer();
You have to read all the images, create a specific array and train your FaceRecognizer with that. For my purpose, I'm saving each user in a DB and they get a unique ID which I'm using to create a specific subfolder and this is later used. Here is my code:
@staltz
staltz / introrx.md
Last active August 1, 2024 08:51
The introduction to Reactive Programming you've been missing
@rtt
rtt / tinder-api-documentation.md
Last active July 30, 2024 16:31
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@StuPig
StuPig / water_ripple_canvas.js
Created February 8, 2014 02:27
Use JavaScript and canvas to create water ripple effect
/*
* Water Canvas by Almer Thie (http://code.almeros.com).
* Description: A realtime water ripple effect on an HTML5 canvas.
* Copyright 2010 Almer Thie. All rights reserved.
*
* Example: http://code.almeros.com/code-examples/water-effect-canvas/
* Tutorial: http://code.almeros.com/water-ripple-canvas-and-javascript
*/
@LeaVerou
LeaVerou / vunits.js
Created November 8, 2011 11:05
Static polyfill for vw, vh, vm units
/**
* Polyfill for the vw, vh, vm units
* Requires StyleFix from -prefix-free http://leaverou.github.com/prefixfree/
* @author Lea Verou
*/
(function() {
if(!window.StyleFix) {
return;