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 |
var Arlina={init:function(n){this.run(n),document.cookie="nct=0;"},readData:function(n){for(var e=n+"=",t=decodeURIComponent(document.cookie).split(";"),o=0;o<t.length;o++){for(var c=t[o];" "==c.charAt(0);)c=c.substring(1);if(0==c.indexOf(e))return c.substring(e.length,c.length)}return""},run:function(n){for(var e=n.click,t=n.interval,o=document.getElementsByClassName("Arlina"),c=0,r=o.length;c<r;c++)o[c].addEventListener("click",function(){tn=Arlina.readData("nct"),po=tn-1+2,Arlina.changer(e,t)?document.cookie="nct="+po+";":Arlina.n("pointer-events:none;")})},changer:function(n,e){return tc=this.readData("nct")-1+2,tc!=n||(setTimeout(function(){document.cookie="nct=0;",Arlina.n("pointer-events:cursor;")},e),!1)},n:function(n){for(var e=document.getElementsByClassName("Arlina"),t=0,o=e.length;t<o;t++)e[t].style=n}}; |
#!/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 |
{"id":"6e06240d-eeb8-402f-ae71-8cd663c05b4f","title":"JS for beginners","description":"Test","dateD":"2023-02-07T10:46:55.415Z","dateF":"2023-02-07T10:46:55.415Z","membersId":["16fb0b35-91ca-4fa8-b1ab-f70f2d76590c,16fb0b35-91ca-4fa8-b1ab-f70f2d76590c"],"adminsId":["16fb0b35-91ca-4fa8-b1ab-f70f2d76590c"],"status":"ENDED","time":"Expired","createdAt":"2023-02-07T10:46:55.420Z"} |
My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)