Skip to content

Instantly share code, notes, and snippets.

View michaelb87's full-sized avatar

Michael Bierbaumer michaelb87

View GitHub Profile
@fjeldstad
fjeldstad / strip-non-printable-unicode-characters.js
Last active October 13, 2021 17:09
Removing all (or perhaps just "common") non-printable Unicode characters - except line breaks - from a string in JavaScript. (Adaptation of http://stackoverflow.com/questions/21284228/removing-control-characters-in-utf-8-string?lq=1)
const trimmed = problematicString.replace(/[\x00-\x09\x0B-\x0C\x0E-\x1F\x7F-\x9F]/g, '');
@willurd
willurd / web-servers.md
Last active May 23, 2024 08:59
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000