Skip to content

Instantly share code, notes, and snippets.

View a7993n's full-sized avatar
🎯
Focusing

Aymen a7993n

🎯
Focusing
View GitHub Profile
@a7993n
a7993n / development_tools.sh
Created October 5, 2025 13:19 — forked from vinicioslc/development_tools.sh
Things to do after install debian SO (setup dev env)
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"
@a7993n
a7993n / fix-wordpress-permissions.sh
Last active September 28, 2023 19:45 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/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}};
@a7993n
a7993n / digital-ocean-apache-php-mysql-https.md
Created May 10, 2023 06:17 — forked from mtvbrianking/digital-ocean-apache-php-mysql-https.md
Setup digital ocean apache web server php mysql

Prerequisties

Login

bmatovu@home-pc:~# ssh root@xxx.xxx.xxx.xxx

root@ubuntu-512mb-nyc3-01:~$ sudo su

root@ubuntu-512mb-nyc3-01:~#
@a7993n
a7993n / wp-backup-script.sh
Created May 9, 2023 18:58 — forked from praveen-palanisamy/wp-backup-script.sh
WordPress backup script: A bash script to compress and backup a complete wordpress site including the database
#!/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
@a7993n
a7993n / remove-all-from-docker.sh
Created February 27, 2023 07:30 — forked from beeman/remove-all-from-docker.sh
Remove all from Docker
# 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
@a7993n
a7993n / events.json
Created February 8, 2023 10:00
events.json
{"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"}
@a7993n
a7993n / cheatsheet-elasticsearch.md
Created January 16, 2023 14:03 — forked from ruanbekker/cheatsheet-elasticsearch.md
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl