Skip to content

Instantly share code, notes, and snippets.

View aleksandar-b's full-sized avatar
:electron:
Focusing

Alex Brajkovic aleksandar-b

:electron:
Focusing
View GitHub Profile
@sararob
sararob / data-structure.js
Last active April 26, 2022 22:21
Role-based security in Firebase
/*
This example shows how you can use your data structure as a basis for
your Firebase security rules to implement role-based security. We store
each user by their Twitter uid, and use the following simplistic approach
for user roles:
0 - GUEST
10 - USER
20 - MODERATOR
@PatrickStotz
PatrickStotz / README.md
Last active September 10, 2024 03:22
Spinning globe with glowing city markers in D3

A Spinning globe with glowing city markers in D3.

Note: This visualization constantly recalculates and reprojects the position of over 4000 markers and thus needs a lot of computation power. Older computer and mobile devices might struggle with the rendering process. Furthermore the visualization is only optimized for Chrome browsers and might look different than expected when opened in other browsers.

Inspired by Curran Kelleher's idea to plot a world map in D3 by using the GeoNames database as seen in his great Introdction to D3 video.

JavaScript resources, all free online. They're ordered in diffuculty from top to bottom.
http://jsforcats.com/
https://www.youtube.com/playlist?list=PLeL6uTxQ-uX_5BpOb2FDNgG6SxjCs59Kv
https://www.youtube.com/watch?v=hQVTIJBZook
https://www.khanacademy.org/computing/computer-science/algorithms
http://speakingjs.com/es5/index.html
http://eloquentjavascript.net/index.html
http://superherojs.com/
https://www.youtube.com/watch?v=8aGhZQkoFbQ
@royshouvik
royshouvik / Full Stack JavaScript.md
Last active February 24, 2026 02:11
Learn Full Stack JavaScript Web Development for FREE using resources like YouTube, Udacity and NodeSchool
@bendc
bendc / isNumber.js
Last active October 26, 2015 08:29
isNumber() checks if its argument represents a numeric value
const isNumber = x =>
!Number.isNaN(parseInt(x)) && Number.isInteger(Math.trunc(x));
@jfmengels
jfmengels / lodash-fp-documentation.md
Last active January 15, 2025 00:34
Generated docs for Lodash/fp. Help make them better at https://github.com/jfmengels/lodash-fp-docs
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active March 7, 2026 11:26
Vanilla JavaScript Quick Reference / Cheatsheet
@kawanet
kawanet / material-colors.json
Last active February 19, 2026 00:36
Material Design Style Color Palette as JSON
{
"red": {
"50": "#ffebee",
"100": "#ffcdd2",
"200": "#ef9a9a",
"300": "#e57373",
"400": "#ef5350",
"500": "#f44336",
"600": "#e53935",
"700": "#d32f2f",
@ryanbru0803
ryanbru0803 / squash-and-stretch.js
Last active February 26, 2020 08:46
The squash and stretch expression should make your animation a bit more alive by adding a proportional squash and stretch scale to your shapes or images.
maxDev = 13; // max deviation in pixels
spd = 30; //speed of oscillation
decay = 1.0; //how fast it slows down
t = time - inPoint;
x = scale[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t);
y = scale[0]*scale[1]/x;
[x,y]
@akbstone
akbstone / .block
Last active February 6, 2018 14:37 — forked from mbostock/.block
Closest Point on Path
license: gpl-3.0