This file contains hidden or 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 | |
docker stop mongo-server | |
docker rm mongo-server | |
#start meteor with env variable MONGO_URL=mongodb://localhost:27017/yourDatabase | |
#meteor /db/ path is in .meteor/local/db/ | |
docker run --name mongo-server -it -d \ | |
-v /var/www/mongoData:/data/db \ | |
--net="host" \ |
This file contains hidden or 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 | |
docker stop mongo-express | |
docker rm mongo-express | |
#accesible from a host, if is a VM :0.0.0.0 | |
#auto restarts - it will reattach at every meteor server restart | |
#requires Docker | |
#address will be localhost:8081 or http://your.VM.ip:8081/db/meteor/ |
This file contains hidden or 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
#docker | |
#docker rmi $(docker images -q -f dangling=true)\ | |
docker system prune #it will remove any stopped containers, unused volumes and networks, and dangling images. | |
#Remove all images | |
#docker rmi $(docker images -q) | |
#Remove all containers | |
#docker rm $(docker ps -aq) | |
#node npm meteor | |
npm cache clean |
This file contains hidden or 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
FROM nginx:1.11.10 | |
COPY nginx.conf /etc/nginx/conf.d/default.conf | |
#your static website source is in /maintenace/src/, copy it inside the container | |
COPY src/. /usr/share/nginx/html |
This file contains hidden or 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
win+R (Run) | |
type shell:startup |
This file contains hidden or 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
#tangled images | |
docker rmi $(docker images -q -f dangling=true) |
This file contains hidden or 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
#Unfortunately you will lose any unpushed commits and stashed changes, however your working copy should remain intact. | |
cp -r . ../backupDontForget | |
rm -fr .git | |
git init | |
git remote add origin [your-git-remote-url] | |
git fetch | |
git reset --mixed origin/master | |
git branch --set-upstream-to=origin/master master | |
#commit and push |
This file contains hidden or 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
git diff HEAD..e37dbcc0d9 PathtoFile.cs | git apply --whitespace=fix --ignore-space-change --ignore-whitespace -v |
This file contains hidden or 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
zip -r testcat.zip ~/MyFolder -i '*XXX*.jpg' '*YYY*.png' |
This file contains hidden or 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
ssh-add | |
VBoxHeadless --startvm "box-dev-debian"& | |
sleep 5 | |
mkdir -p /Volumes/dev-box | |
sudo mount -t nfs -o resvport,rw 192.168.56.101:/var/www /Volumes/dev-box |