Skip to content

Instantly share code, notes, and snippets.

@magician11
magician11 / write-to-firebase.js
Last active June 28, 2022 10:24
Writing data to Firebase from Node.js
const admin = require('firebase-admin');
admin.initializeApp({
credential: admin.credential.cert('./movies-387bf-firebase-adminsdk-4hoi8-c52699119b.json'),
databaseURL: 'https://movies-387bf.firebaseio.com',
});
// Get a database reference to our blog
const db = admin.database();
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
5.1,3.5,1.4,0.2,Iris-setosa
4.9,3.0,1.4,0.2,Iris-setosa
4.7,3.2,1.3,0.2,Iris-setosa
4.6,3.1,1.5,0.2,Iris-setosa
5.0,3.6,1.4,0.2,Iris-setosa
5.4,3.9,1.7,0.4,Iris-setosa
4.6,3.4,1.4,0.3,Iris-setosa
5.0,3.4,1.5,0.2,Iris-setosa
4.4,2.9,1.4,0.2,Iris-setosa
4.9,3.1,1.5,0.1,Iris-setosa
@d3noob
d3noob / .block
Last active November 16, 2023 09:50
Sankey diagram with horizontal and vertical node movement
license: mit
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@jasondavies
jasondavies / .block
Last active February 4, 2024 12:38 — forked from mbostock/.block
Parallel Coordinates
license: gpl-3.0
@trongthanh
trongthanh / perspectiveProject.js
Created October 18, 2011 04:35 — forked from jsermeno/perspectiveProject.js
Three.js Transform 3D coordinates to screen coordinates and back in perspective projection - http://catchvar.com/threejs-game-transforming-isometric-screen-co
var
projector = new THREE.Projector(),
p3D = new THREE.Vector3(25, 15, 9),
p2D;
p2D = projector.projectVector(p3D, camera);
p3D = projector.unprojectVector(p2D, camera);
//need extra steps to convert p2D to window's coordinates
p2D.x = (p2D.x + 1)/2 * window.innerWidth;