Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chebaby's full-sized avatar
🏠
Working from home

Nour-Eddine ECH-CHEBABY chebaby

🏠
Working from home
View GitHub Profile
@chebaby
chebaby / backup.sh
Last active March 23, 2021 16:33
Bash Script to backup all MySQL databases AND zip www folder WITH email notification
#!/bin/bash
NOW=$(date +"%m_%d_%Y")
MYSQL_USER="root"
MYSQL_PASSWORD="$(cat /etc/mysqlpass)"
DEST="/home/backups"
SITES_PATH="/var/www"
@chebaby
chebaby / Microsoft.PowerShell_profile.ps1
Last active March 28, 2022 16:59
My Powershell profile
# How to edit a profile
# To view a profile path, display the value of the $PROFILE variable.
# You can also use the $PROFILE variable in a command to represent a path.
# The $PROFILE variable stores the path to the "Current User, Current Host" profile.
# The other profiles are saved in note properties of the $PROFILE variable.
# To open the profile of the current user in the current PowerShell host application in Notepad, type:
@chebaby
chebaby / settings.json
Last active October 21, 2022 21:13
Windows Terminal Settings
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command": "paste",
"keys": "ctrl+v"
},
{
This file has been truncated, but you can view the full file.
{
"shops": [
{
"id": 8,
"name": "Kashmir",
"email": "r.cheema1973@gmail.com",
"phone": "030126948654",
"avatar": "https://www.foodcabby.de/storage/shops/nYBF3oPAC8NlIOyYXve5SQTLmLJvb54TbfGcDVSL.png",
"default_banner": null,
"description": "Kashmir Indische Spezialitäten, Vegan,Vegetarisch, Halal",
@chebaby
chebaby / user-aliases.cmd
Created November 22, 2019 12:04
Cmder personal aliases
p=vendor\bin\phpunit
pf=vendor\bin\phpunit --filter $*
gs=git status
ga=git add .
gc=git commit -m $*
pa=php artisan $*
make=php artisan make:$*
ru=php artisan route:list --name=user
@chebaby
chebaby / Preferences.sublime-settings
Last active October 27, 2019 12:38
Personal Preferences and settings in my sublime text editor
{
"always_show_minimap_viewport": true,
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
@chebaby
chebaby / rsync-openssh-windows.md
Last active October 17, 2018 15:00
SSH and Rsync within Cygwin

Cygwin Setup

This is not an in-depth guide for installing Cygwin; although, installing Cygwin is a fairly simple process. In or to implement SSH and rsync functionality, a few non-default Cygwin packages will need to be installed.

  1. Download and run the Cygwin setup.exe program from http://cygwin.com/install.html

    If you already have Cygwin installed, that should not be a problem. You can still run setup.exe to install additional Cygwin packages.

  2. Proceed through the Cygwin setup process until you get to the "Select Packages" screen. From there, make sure the following packages are selected:

@chebaby
chebaby / proftpd.md
Last active October 11, 2018 11:06
Install proftpd on debian 8 step by step
apt-get install proftpd openssl

Add user (default group named "websitename" will be created)

adduser websitename

Next we need to make the directory protected from removing and renaming its content by any user, so we will change the directory permissions as follows:

@chebaby
chebaby / GulpRevVersionStrategy.php
Created February 15, 2018 16:31
VersionStrategy for using assets versioned with gulp-rev in Symfony
<?php
namespace AppBundle\Twig;
use Exception;
use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface;
class GulpRevVersionStrategy implements VersionStrategyInterface
{
private $manifestFilename;