Skip to content

Instantly share code, notes, and snippets.

View Lathanao's full-sized avatar

Lathanao Lathanao

View GitHub Profile
@Lathanao
Lathanao / 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"
@Lathanao
Lathanao / 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
@Lathanao
Lathanao / 15 thing to check-Linux install.md
Last active January 21, 2024 22:11
15 things to do after a fresh Linux install

15 things to do after a fresh Linux install

1. Set low latency kernel

  • sudo apt-get install linux-lowlatency linux-headers-lowlatency

1. Configure Update Manager

  • choose best mirrors

2. Install Drivers

  • open driver manager
@Lathanao
Lathanao / 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;
@Lathanao
Lathanao / Install Mozjpeg 4 on Debian Ubuntu Mint
Last active March 19, 2024 14:07 — forked from Kelfitas/mozjpeg-install-debian
Install Mozjpeg 4 on debian / Ubuntu
#!/bin/bash
echo ""
echo "---------------------------------"
echo "| AUTO COMPILE MOZJPEG |"
echo "---------------------------------"
echo ""
echo "Apt update"
sudo apt update && apt upgrade && apt remove $(deborphan) && apt autoremove && apt clean
echo "Update"
sudo apt update
@Lathanao
Lathanao / my.cnf
Last active January 10, 2024 15:54
Percona Server 8.0 configuration file
#
# 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.
@Lathanao
Lathanao / 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);
@Lathanao
Lathanao / 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.
@Lathanao
Lathanao / 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';
@Lathanao
Lathanao / 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"