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
var rmdirRecurseSync = function(dir) { | |
var list = fs.readdirSync(dir); | |
for(var i = 0; i < list.length; i++) { | |
var filename = path.join(dir, list[i]); | |
var stat = fs.statSync(filename); | |
if(stat.isDirectory()) { | |
// rmdir recursively | |
rmdirRecurseSync(filename); | |
} else { |
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
/* | |
* Convert a string into a human readable title | |
* | |
* This function borrows heavily from sugar.js | |
* http://sugarjs.com/ | |
* | |
* titleize("man from the boondocks") -> Man from the Boondocks | |
* titleize("x-men: the last stand") -> X Men: The Last Stand | |
* titleize("TheManWithoutAPast") -> The Man Without a Past | |
* titleize("raiders_of_the_lost_ark") -> Raiders of the Lost Ark |
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
# requires php v5.4 | |
php -Slocalhost:3000 |
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
@font-face { | |
font-family: "Fura Code"; | |
font-weight: 200; | |
src: url("https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/FiraCode/Light/complete/Fura%20Code%20Light%20Nerd%20Font%20Complete.otf?raw=true") format('opentype'); | |
} | |
@font-face { | |
font-family: "Fura Code"; | |
font-weight: 400; | |
src: url("https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/FiraCode/Regular/complete/Fura%20Code%20Regular%20Nerd%20Font%20Complete.otf?raw=true") format('opentype'); | |
} |
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 (!input?.query) { | |
dv.paragraph("You must pass a `query` to the view"); | |
return; | |
} | |
const pagesWithLists = await dv.tryQuery(input.query); | |
const HEADER_SIZE = input?.headerSize ?? 2; | |
/** |