Scripts to run specific services
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
# fetch the changes from the remote | |
git fetch origin | |
# show commit logs of changes | |
git log master..origin/master | |
# show diffs of changes | |
git diff master..origin/master | |
# apply the changes by merge.. |
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
#!/bin/bash | |
su -c "sync; echo 3 > /proc/sys/vm/drop_caches && printf '\n%s\n' 'Ram-cache Cleared'" root | |
# su -c "sync; echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'" root |
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
var POST_URL = "http://localhost:3000"; | |
function onFormSubmit(e) { | |
var data = { | |
"form": { | |
"id": e.source.getId(), | |
"title": e.source.getTitle() ? e.source.getTitle() : "Untitled Form", | |
"is_private": e.source.requiresLogin(), | |
"is_published": e.source.isAcceptingResponses(), |
NewerOlder