Skip to content

Instantly share code, notes, and snippets.

View Lathanao's full-sized avatar

Lathanao Lathanao

View GitHub Profile
@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 / 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"
@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 / 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 / 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 / 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 / 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"