Skip to content

Instantly share code, notes, and snippets.

@kcak11
kcak11 / App.md
Last active November 30, 2023 18:24
Country Codes

Country Codes

List of all Country Codes (ISO & Dialing) sorted in alphabetical order.

@znck
znck / shimmer.css
Last active August 13, 2020 17:21
CSS only shimmer
@keyframes placeHolderShimmer {
0% {
background-position: -80px 0;
}
100% {
background-position: 640px 0;
}
}

Bundling Design Systems/Component Libraries

First of all you need to decide who will be your target consumers based on the following:

  1. They have the same environment(webpack config, babel config) setup as you where you built your design system(this is mostly possible if you use monorepos/same configs where all the teams share the same environment).

  2. They don't have the same environment which is the case when you work in bigger teams and you want to distribute your design system as any other npm package which is already built and can be used directly.

If your use case falls under case no. 1 then you can just compile the source babel src -d build and leave the bundling to the consumer projects tools(webpack/rollup)

@a-barbieri
a-barbieri / README.md
Last active June 6, 2021 21:48
NextJS sitemap generator with dynamic URL

NextJS sitemap generator

Install

The current setup has been tested on Next Js 7.0.0.

You need to install Axios.

$ npm install axios
@heiswayi
heiswayi / webfonts.md
Last active January 30, 2023 23:00
Default font-family for web stuffs

Headings (H1-H6)

font-family: Roboto,-apple-system,BlinkMacSystemFont,"Helvetica Neue","Segoe UI","Oxygen","Ubuntu","Cantarell","Open Sans",sans-serif;

Body

font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
@folt
folt / gist:a98e9368dbe1dcbfce7198c16b862c92
Last active March 11, 2024 10:06
Balsamiq Mockups 3 crack
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!
@tralves
tralves / get_indexdb_sizes.js
Last active March 9, 2024 13:34
Calculate sizes of all IndexDB database and tables
var getTableSize = function(db, dbName){
return new Promise((resolve,reject) => {
if (db == null) {
return reject();
}
var size = 0;
db = event.target.result;
var transaction = db.transaction([dbName])
.objectStore(dbName)
.openCursor();

Font Stack

Font Device Targeted
-apple-system (San Francisco) iOS Safari, macOS Safari, macOS Firefox
BlinkMacSystemFont (San Francisco) macOS Chrome
Segoe UI Windows
Roboto Android, Chrome OS
Oxygen / Oxygen-Sans KDE
Fira Sans Firefox OS
@egamma
egamma / .eslintrc.json
Created February 25, 2016 21:57
Visual Studio Code default .eslintrc.json
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
@raelgc
raelgc / Email Server (Linux, Unix, Mac).md
Last active April 8, 2024 06:01
Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

1 - Point localhost.com to your machine

Most of programs will not accept an email using just @localhost as domain. So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:

127.0.0.1 localhost.com

2 - Install Postfix