Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
git config http.postBuffer 524288000
#!/bin/sh
git config --global credential.helper cache
# Set git to use the credential memory cache
git config --global credential.helper 'cache --timeout=7200'
# Set the cache to timeout after 1 hour (setting is in seconds)
#!/bin/bash
git reset --hard # removes staged and working directory changes
## !! be very careful with these !!
## you may end up deleting what you don't want to
## read comments and manual.
git clean -f -d # remove untracked
git clean -f -x -d # CAUTION: as above but removes ignored files like config.
git clean -fxd :/ # CAUTION: as above, but cleans untracked and ignored files through the entire repo (without :/, the operation affects only the current directory
const g = n => n + 1;
const f = n => n * 2;
const trace = label => value => {
console.log(`${ label }: ${ value }`);
return value;
};
const doStuff = x => {
const afterG = g(x);
const g = n => n + 1;
const f = n => n * 2;
const wait = time => new Promise(
(resolve, reject) => setTimeout(
resolve,
time
)
);
wait(300)