Skip to content

Instantly share code, notes, and snippets.

View larskarbo's full-sized avatar
🚀
:-)

Lars Karbo larskarbo

🚀
:-)
View GitHub Profile
@larskarbo
larskarbo / pull-db.sh
Created February 14, 2018 10:51
Script to pull remote database and overwrite local
function exit_script() {
echo $1
ssh -S db-sync-socket -O exit $REMOTE_CREDENTIALS 2> /dev/null
exit 1
}
function print_usage() {
echo "Usage: -d databasename -m host [-h]"
exit 0
}
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active May 1, 2024 23:17
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@jcxplorer
jcxplorer / uuid.js
Created February 12, 2011 16:58
UUID v4 generator in JavaScript (RFC4122 compliant)
function uuid() {
var uuid = "", i, random;
for (i = 0; i < 32; i++) {
random = Math.random() * 16 | 0;
if (i == 8 || i == 12 || i == 16 || i == 20) {
uuid += "-"
}
uuid += (i == 12 ? 4 : (i == 16 ? (random & 3 | 8) : random)).toString(16);
}