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
/* Print a binary string `str` of `len` bytes safely by printing | |
* non-printable characters as red hex codes. */ | |
void safe_print(unsigned char *str, size_t len) { | |
unsigned char *it = str; | |
while (len--) { | |
if (isprint(*it)) { | |
putchar(*it); | |
} else { | |
printf("\33[31m%02X\33[0m", *it); |
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
(defun mwheel-scroll (event) | |
(interactive (list last-input-event)) | |
(let ((button (mwheel-event-button event))) | |
(cond ((eq button mouse-wheel-down-event) | |
(undo-tree-undo)) | |
((eq button mouse-wheel-up-event) | |
(undo-tree-redo))))) | |
;; ^ global override for all scrollwheel events | |
;; to do it only for shift+scroll, try: |
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
#!/usr/bin/env bash | |
# Port of https://github.com/tj/node-prune to bash | |
# Also, | |
# - fixed "*.ts" being overzealous and killing .d.ts files | |
# - added some more file types from https://github.com/npm/npm/issues/5264#issuecomment-259800486 | |
# | |
# See also: | |
# - https://github.com/timoxley/cruft | |
# - https://yarnpkg.com/en/docs/cli/autoclean | |
# - https://github.com/ModClean/modclean |
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
describe("Level 1", () => { | |
before(() => console.log("before 1")); | |
beforeEach(() => console.log("beforeEach 1")); | |
before(() => console.log("before 2")); | |
beforeEach(() => console.log("beforeEach 2")); | |
after(() => console.log("after 1")); | |
afterEach(() => console.log("afterEach 1")); | |
after(() => console.log("after 2")); | |
afterEach(() => console.log("afterEach 2")); |
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
#!/usr/bin/env bash | |
( | |
while ((1)); do | |
gcloud --format=json compute instances list --filter="name~'nlp-workers-.*'" | \ | |
jq -rc '.[]|select(.status=="RUNNING").name' > workers.hosts.txt | |
sleep 30s | |
done | |
) & # (or, just run this watcher in a separate script) |
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
function* xpathLazy(q) { | |
const x = document.evaluate( | |
q, | |
document, | |
null, | |
XPathResult.UNORDERED_NODE_ITERATOR_TYPE, | |
null | |
); | |
let n = x.iterateNext(); | |
while (n) { |
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
11 fuzz.online | |
9 www.1sttheworld.com | |
8 www.justfab.co.uk | |
8 www.justfab.com | |
6 www.simplycarbonfiber.com | |
6 www.shoedazzle.com | |
6 www.fabletics.ca | |
6 topcoat.store | |
6 sugarandcotton.com | |
6 savethebeesproject.com |