Skip to content

Instantly share code, notes, and snippets.

View bennycode's full-sized avatar
Working from home

Benny Neugebauer bennycode

Working from home
View GitHub Profile
bennycode / dump.js
Last active May 6, 2024 11:29
Dump text into JSON file (Node.js)
const payload = {name: 'text'};
(require('fs')).writeFileSync(`dump-${}.json`, JSON.stringify(payload));
tsiege / The Technical Interview Cheat
Last active May 14, 2024 04:49
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.


I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!


douglas /
Created October 14, 2011 15:04
Update all git repositories under a base directory
# store the current dir
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
mathiasbynens / unicodeEscape.js
Created September 26, 2011 19:50
Escape all characters in a string using both Unicode and hexadecimal escape sequences
// Ever needed to escape '\n' as '\\n'? This function does that for any character,
// using hex and/or Unicode escape sequences (whichever are shortest).
// Demo:
function unicodeEscape(str) {
return str.replace(/[\s\S]/g, function(character) {
var escape = character.charCodeAt().toString(16),
longhand = escape.length > 2;
return '\\' + (longhand ? 'u' : 'x') + ('0000' + escape).slice(longhand ? -4 : -2);