Skip to content

Instantly share code, notes, and snippets.

View k1ch's full-sized avatar

Keyvan Chamani k1ch

View GitHub Profile
@k1ch
k1ch / css-units-best-practices.md
Created September 13, 2022 17:59 — forked from basham/css-units-best-practices.md
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units

@k1ch
k1ch / mongodb_cheat_sheet.md
Created April 8, 2020 23:17 — forked from bradtraversy/mongodb_cheat_sheet.md
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@k1ch
k1ch / nodejs-tcp-example.js
Created February 27, 2020 01:46 — forked from tedmiston/nodejs-tcp-example.js
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');