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
/** | |
* Calculates the toFixed precision required for nicely displaying | |
* step intervals between the values given. | |
* | |
* @param int min Minimum value in set | |
* @param int max Maximum value in set | |
* | |
* @return int Number.toFixed precision | |
*/ | |
function calcRangePrecision(min, max) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>homebrew.mxcl.rabbitmq</string> | |
<key>Program</key> | |
<string>/usr/local/opt/rabbitmq/sbin/rabbitmq-server</string> | |
<key>RunAtLoad</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
<?xml version="1.0" encoding="UTF-8"?> | |
<phpunit backupGlobals="false" | |
backupStaticAttributes="false" | |
bootstrap="vendor/autoload.php" | |
colors="true" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="true" | |
convertWarningsToExceptions="true" | |
processIsolation="false" | |
stopOnFailure="false"> |
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
String.prototype.replace_nth = function (searchValue, replaceValue, n) { | |
let i = 0; | |
return this.replace(searchValue, function (match) { return (++i === n) ? replaceValue : match; }); | |
}; |
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
def expand_dict(dct, delimiter: str = '.') -> dict: | |
""" | |
Expand a (partially) flattened dot-notation dictionary. | |
:param dct: Dictionary/list to be expanded | |
:param delimiter: String that delimits flattened keys | |
:return: Expanded dictionary/list | |
""" | |
if isinstance(dct, dict): | |
stale_keys = [] |