Skip to content

Instantly share code, notes, and snippets.

View everget's full-sized avatar
🎯
Focusing

Alex Orekhov everget

🎯
Focusing
View GitHub Profile
@basham
basham / css-units-best-practices.md
Last active June 6, 2024 02:06
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

@lyuehh
lyuehh / quiz.md
Last active February 9, 2018 07:24
javascript quiz

part1

// http://dmitry.baranovskiy.com/post/91403200

//## 1
if (!("a" in window)) {
    var a = 1;
}
alert(a);
@FrancescaK
FrancescaK / gist:3945341
Created October 24, 2012 10:20
Encapsulating the Login Process
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
bcrypt = require('bcrypt'),
SALT_WORK_FACTOR = 10,
// these values can be whatever you want - we're defaulting to a
// max of 5 attempts, resulting in a 2 hour lock
MAX_LOGIN_ATTEMPTS = 5,
LOCK_TIME = 2 * 60 * 60 * 1000;
var UserSchema = new Schema({
@leostratus
leostratus / webkit-pseudo-elements.md
Created September 21, 2012 01:44
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;