CSS Regions are a mechanism used in web pages to separate content from its layout. Regions can be used to visually flow content from one element to another regardless of the content's original location in the DOM tree.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// returns a list of all elements under the cursor | |
// | |
function elementsFromPoint(x,y) { | |
var elements = [], previousPointerEvents = [], current, i, d; | |
// get all elements via elementFromPoint, and remove them from hit-testing in order | |
while ((current = document.elementFromPoint(x,y)) && elements.indexOf(current)===-1 && current != null) { | |
// push the element and its current style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Use, reuse but don't abuse! | |
Author: Razvan Caliman (razvan.caliman@gmail.com) | |
This is an example of a "Multiton" pattern; | |
Create a fixed number of instances of a class. | |
Use "lazy instantiation" to create objects only if needed. | |
If the maximum number of instances has been reached, return a random one from the ones created. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Supports = (function(){ | |
// all spaces are important! | |
var prefixes = ' -webkit- -moz- -o- -ms- '; | |
function getPrefixedProperties(property, prefixes) { | |
var properties = prefixes.join(property + " ").split(' '); | |
// ignore the last string which is empty. | |
return properties.slice(0, properties.length-1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const augment = callback => () => { | |
const useState = { | |
init: true, | |
value: void 0, | |
update(value) { | |
useState.value = value; | |
callback(hooks) | |
} | |
}; | |
const hooks = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<style media="screen"> | |
div { | |
animation: marker 0s 1; | |
} | |
@keyframes marker { to { outline-color: inherit } } | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/WICG/construct-stylesheets/issues/45#issuecomment-522879888 | |
'use strict'; | |
function isArrayIndex(string) { | |
if (typeof string !== 'string') { | |
return false; | |
} | |
const number = Number(string); | |
return Number.isSafeInteger(number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SSL self signed localhost for rails start to finish, no red warnings. | |
# 1) Create your private key (any password will do, we remove it below) | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Task: | |
Given an input string return true if the string is balanced, otherwise return false. | |
A string is balanced when every opening bracket "{", square bracket "[", and parenthesis "(" | |
has a matching closing character. | |
*/ | |
const string = "{[()]}"; | |
(function(input){ |
- An Introduction to the Five-Factor Model and Its Applications
- Personality Traits and Personal Values - free article
- The Big Five Personality Traits and the Life Course: A 45-Year Longitudinal Study
- The Five-Factor Theory of Personality book
- Higher-order factors of the Big Five
- Gender differences in personality traits across cultures
NewerOlder