Skip to content

Instantly share code, notes, and snippets.

View Tanguy-SALMON's full-sized avatar

Tanguy Tanguy-SALMON

View GitHub Profile
@Tanguy-SALMON
Tanguy-SALMON / multiple_ssh_setting.md
Created June 8, 2018 10:32 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@Tanguy-SALMON
Tanguy-SALMON / Config Mysql5.7 for Magento 2.3
Created July 14, 2020 10:50
Config Mysql5.7 for Magento 2.3
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
@Tanguy-SALMON
Tanguy-SALMON / M2BootstrapSampleFile.php
Created November 19, 2020 06:58
M2 Bootstrap Sample File
<?php
/**
*
* M2 Bootstrap Sample File
*
*/
ini_set('display_errors', 1);
error_reporting(E_ALL);
require __DIR__ . '/../app/bootstrap.php';
@Tanguy-SALMON
Tanguy-SALMON / Clean Prestashop Database Queries.sql
Last active November 16, 2023 17:27
Clean Prestashop Database Queries
DELETE FROM ps_search_index
WHERE id_product not in (select id_product from ps_product);
DELETE FROM ps_search_word
WHERE id_word not in (select id_word from ps_search_index);
OPTIMIZE TABLE ps_search_index;
OPTIMIZE TABLE ps_search_word;
@Tanguy-SALMON
Tanguy-SALMON / mysql bootsrap class.php
Last active November 22, 2023 02:18
mysql bootsrap class for php
<?php
header('Content-type: text/html; charset=utf-8');
// header('Content-type: text/plain; charset=utf-8');
ini_set('display_errors', 1);
ini_set('track_errors', 1);
ini_set('html_errors', 1);
ini_set('realpath_cache_size', '5M');
ini_set('max_execution_time', 9999999900000);
@Tanguy-SALMON
Tanguy-SALMON / Miscellaneous Shell Alias for zsh.sh
Last active November 22, 2023 15:59
Miscellaneous Shell Alias for zsh
## Miscellaneous Shell Alias
alias df='df -h'
alias du='du -hs ./* | sort -hr'
alias duu='sudo du -Pshx /* 2>/dev/null'
alias free='free -m'
alias htop="sudo htop"
alias grep="grep --color"
alias history="history -E -10000"
alias sys="sudo systemctl --no-pager"
alias ch="sed -i '/: /!d' ~/.zhistory"
@Tanguy-SALMON
Tanguy-SALMON / Git Cheat Sheet.md
Last active November 28, 2023 14:31
Git sheet cheat / examples / tips / common setups.

Git sheet cheat

Initialisation

$ git init

Clone without the full history

$ git clone --depth 1
@Tanguy-SALMON
Tanguy-SALMON / .zshrc
Created February 24, 2024 07:42
Supercharge my shell with that in my .zshrc
expiration_password=$(passwd -S $USER | awk '{print $3}')
expiration_password_unix=$(date -d "$expiration_password" +%s)
date_actuelle=$(date +%s)
diff=$((date_actuelle - expiration_password_unix))
if [ $diff -gt 2592000 ]; then
echo "\e[36m\e[5m Password too old. Update it with $ passwd \${whoami}.\e[0m" | bat --style grid
fi
w | awk 'NR>2' | bat --style grid
@Tanguy-SALMON
Tanguy-SALMON / Build FalkorDB on Manjaro.md
Last active March 12, 2024 10:53
Compile FalkorDB on Manjaro

First:

$ pamac install cmake

Then:

$ cd ~/Download
$ wget https://www.piumarta.com/software/peg/peg-0.1.18.tar.gz
$ sudo tar -xzvf *.tar.gz