Login
bmatovu@home-pc:~# ssh root@xxx.xxx.xxx.xxx
root@ubuntu-512mb-nyc3-01:~$ sudo su
root@ubuntu-512mb-nyc3-01:~#
sudo apt-get update # update all repositories | |
# git setup | |
sudo apt-get install git | |
sudo apt-get install gitk # for GUI representation of git history | |
sudo apt-get install xclip # xclip is for saving shell output in clipboard | |
git config --global color.ui true # for colourful output in terminal | |
git config --global user.name "The Name" # write here your name and email | |
git config --global user.email "theemail@gmail.com" |
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=cotepara # <-- wordpress owner | |
WP_GROUP=cotepara # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
#!/usr/bin/env bash | |
# wp-backup-script.sh - Creates a complete, compressed backup of your WordPress database and files. You can then transfer it to your preferred location (local disk, cloud backup storage etc) | |
# Author: Praveen Palanisamy | Twitter: @PraveenPsamy | GitHub: https://github.com/praveen-palanisamy| Website: https://praveenp.com | |
# Dependencies: mailutils | |
# 0. Change the variables below to suit your environment | |
WP_FOLDER="$HOME/public_html/" # Folder where your wordpress root installation is | |
BACKUP_FOLDER="$HOME/backups" # Folder where you want to store the backups |
version: "3.2" | |
services: | |
traefik: | |
image: traefik:v1.3 | |
command: -c --docker=true | |
--docker.swarmmode=true | |
--docker.domain=traefik | |
--docker.watch=true | |
--web=true | |
--debug=true |
➜ hermes_jenkins cat docker-compose.yml | |
version: '2' | |
services: | |
mongo: | |
restart: always | |
image: mongo:latest | |
volumes: | |
- ./.db/mongo:/var/lib/mongodb |
# Stop all containers | |
docker stop `docker ps -qa` | |
# Remove all containers | |
docker rm `docker ps -qa` | |
# Remove all images | |
docker rmi -f `docker images -qa ` | |
# Remove all volumes |
My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
$ apt-get update && apt-get install qemu -y
$ qemu-img create -f raw windows10.img 16G
#!/bin/bash | |
mkdir -p deploy_log | |
file_name=deploy_log/deploy_$(date "+%Y_%m_%d_%H_%M_%S") | |
echo 'Deployment Started . . . . .' |& tee $file_name | |
chown -R www-data:www-data storage/ | |
chmod -R 777 storage/ | |
chown -R www-data:www-data bootstrap/cache/ |