Skip to content

Instantly share code, notes, and snippets.

View AlexBrasileiro's full-sized avatar

Alex Brasileiro AlexBrasileiro

  • Marlim.co
  • Sao Paulo, Brazil
View GitHub Profile
@endel
endel / number-pad-zero.js
Last active August 1, 2023 11:54
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"
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 28, 2024 02:47
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites