Skip to content

Instantly share code, notes, and snippets.

View saeidzebardast's full-sized avatar
👨‍💻
🎧

Saeid saeidzebardast

👨‍💻
🎧
View GitHub Profile
@saeidzebardast
saeidzebardast / sort-object.js
Created January 4, 2017 07:28
Sort object by key
/**
* Sort object by key
*
* @param unordered object
* @returns {Object} ordered object by key
*/
function sortObject(unordered) {
var ordered = {};
Object.keys(unordered).sort().forEach(function (key) {
ordered[key] = unordered[key];
@ebidel
ebidel / app.html
Last active May 1, 2021 15:42
Fast Polymer app loading - optimized for first render, progressively enhanced lazy loading
<!DOCTYPE html>
<html>
<head>
<style>
body.loading #splash {
opacity: 1;
}
#splash {
position: absolute;
top: 0;
@mbostock
mbostock / .block
Last active May 22, 2022 00:36
Every ColorBrewer Scale
license: gpl-3.0
redirect: https://observablehq.com/@d3/d3-color-schemes