Like PHP's htmlentities()/htmlspecialchars() functions, JavaScript is easy to implement it.
/**
Like PHP's htmlentities()/htmlspecialchars() functions, JavaScript is easy to implement it.
/**
(function (context, trackingId, options) { | |
const history = context.history; | |
const doc = document; | |
const nav = navigator || {}; | |
const storage = localStorage; | |
const encode = encodeURIComponent; | |
const pushState = history.pushState; | |
const typeException = 'exception'; | |
const generateId = () => Math.random().toString(36); | |
const getId = () => { |
rebase
vs merge
).rebase
vs merge
)reset
vs checkout
vs revert
)git rev-parse
)pull
vs fetch
)stash
vs branch
)reset
vs checkout
vs revert
)/// Helper for EQCSS Element Queries `@element` | |
/// | |
/// @author Jason Featheringham | |
/// @link https://gist.github.com/thejase/d2107285b6e10315dd6bc055115647fe Code source | |
/// @link http://elementqueries.com/ Plugin to parse EQCSS | |
/// @link https://gist.github.com/tomhodgins/6237039fa07c2e4b7acd1c8b0f9549a9 EQCSS syntax | |
/// | |
/// @param {String} $scope (&) - Optional scope. Defaults to current context | |
/// @param {List} $conditions (()) - 1+ of Maps of EQCSS conditions | |
/// @content rules to enclose in element query |
/** | |
* Generates a MongoDB-style ObjectId in Node.js. Uses nanosecond timestamp in place of counter; | |
* should be impossible for same process to generate multiple objectId in same nanosecond? (clock | |
* drift can result in an *extremely* remote possibility of id conflicts). | |
* | |
* @returns {string} Id in same format as MongoDB ObjectId. | |
*/ | |
function objectId() { | |
const os = require('os'); | |
const crypto = require('crypto'); |
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
Translations: (No guarantee that the translations are up-to-date)
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element
or the /deep/
path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {
#!/bin/bash | |
# node-reinstall | |
# credit: http://stackoverflow.com/a/11178106/2083544 | |
## program version | |
VERSION="0.0.13" | |
## path prefix | |
PREFIX="${PREFIX:-/usr/local}" |