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
#!/bin/bash | |
# requires inotify-tools and tree be installed | |
# --CONFIG-- | |
INDEXDIR="$(pwd)" # change this to where you have the directory you want to index mounted | |
URL="https://generichost.example/~/person/assets" # change this to where the urls go | |
TITLE="stuff - %s" # %s represents the current directory | |
# below is the css to apply to the files. you can touch it if you wanna | |
# but i'd just recommend replacing the directory listing creator entirely lol |
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
/* Example: | |
var someUnsafeStr = '<img>'; | |
var result = escapeHTMLTag`<input value="${someUnsafeStr}">`; | |
console.log(result); // <input value="<img>"> | |
// Questions? rob {at} robwu.nl | |
// */ | |
function escapeHTML(str) { | |
// Note: string cast using String; may throw if `str` is non-serializable, e.g. a Symbol. |