A Pen by MalachiMart on CodePen.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file contains hidden or 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
for(i=0;++i<101;)console.log(eval(String.fromCharCode(...'286925333f27273a2746697a7a27292b286925353f27273a2742757a7a27297c7c69'.match(/../g).map(n=>parseInt(n,16))))) | |
This file contains hidden or 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
#!/usr/bin/env node | |
/** | |
* Rock Paper Scissors | |
* ==================== | |
* Rock, paper, scissors on the command line with JavaScript/Node.js/readline. | |
* | |
* Usage | |
* ----- | |
* Place somewhere in path and make it executable | |
* (`chmod u+x ~/bin/rock-paper-scissors.js`). |
This file contains hidden or 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
/** | |
* formatDate(date, format) | |
* ======================== | |
* Returns a string representation of `date`, formatted according to the given | |
* `format` string based on [PHP date format](http://php.net/manual/en/function.date.php). | |
*/ | |
var weekdays = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday'.split(' ') | |
var months = 'January February March April May June July August September October November December'.split(' ') | |
var pad = n => (+n < 10 ? '0' : '') + n | |
var formats = { |
This file contains hidden or 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
/** | |
* getJSON( path, callback ) | |
* ------------------------- | |
* Asynchronously fetch and parse a JSON file. | |
* | |
* - path : A String specifying the location of the JSON file. | |
* - callback( data ): A Function to be executed when the JSON file is retrieved | |
* and parsed. The function will be passed the following | |
* arguments: | |
* |
This is a coding exercise proposed by the estimable [Nathan Beenken] to code the song, "Ninety-nine Bottles of Beer", with the somewhat peculiarity of outputting the numbers in their English word form (ninety nine) rather than the simpler numeric form (99).
The exercise is two parts: 1) the song, and 2) the routine to convert numbers to their English word form.
This file contains hidden or 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
if day is "Saturday" | |
sleep_late() | |
else | |
groan() |
NewerOlder