Skip to content

Instantly share code, notes, and snippets.

@coldcode-moon
coldcode-moon / number-pad-zero.js
Created February 12, 2019 14:04 — forked from endel/number-pad-zero.js
Simplest way for leading zero padding in JavaScript
Number.prototype.pad = function(size) {
var s = String(this);
while (s.length < (size || 2)) {s = "0" + s;}
return s;
}
(1).pad(3) // => "001"
(10).pad(3) // => "010"
(100).pad(3) // => "100"
@coldcode-moon
coldcode-moon / baseConverter.js
Created August 28, 2018 00:56 — forked from faisalman/baseConverter.js
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <[email protected]>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@coldcode-moon
coldcode-moon / ie67891011-css-hacks.txt
Created July 14, 2018 01:50 — forked from vidaaudrey/ie67891011-css-hacks.txt
IE CSS hacks - IE6, 7, 8, 9, 10, 11
IE6 Only
==================
_selector {...}
IE6 & IE7
==================
*html or { _property: }
IE7 Only
==================
@coldcode-moon
coldcode-moon / index.html
Created July 5, 2018 06:56 — forked from CodeMyUI/index.html
Nearly CSS3 Animated Search Input
<!-- Design inspired by: https://dribbble.com/shots/1992789 -->
<form>
<input type="text" />
<div class="after"></div>
<input type="submit" />
</form>
<h4>&nbsp;</h4>
<p>Click search, Enter to submit</p>
// Place your settings in this file to overwrite default and user settings.
{
"editor.wrappingColumn": 0,
"files.exclude": {
"**/node_modules": {},
"typings": {},
"**/*.map": {},
"**/*.js": {
"when": "$(basename).ts"
}
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",

Array<T>

Legend:

  • ✏️ method changes this.
  • 🔒 method does not change this.

Array<T>.prototype.*:

  • concat(...items: Array: T[] 🔒 ES3