Skip to content

Instantly share code, notes, and snippets.

View htxuankhoa's full-sized avatar
🍇

Khoa Hoang htxuankhoa

🍇
View GitHub Profile
@htxuankhoa
htxuankhoa / wordpress_snippets.php
Created July 23, 2016 16:34
wordpress snippets
// Remove x-pingback header tag
function remove_x_pingback($headers)
{
unset($headers['X-Pingback']);
return $headers;
}
add_filter('wp_headers', 'remove_x_pingback');
// ===
@htxuankhoa
htxuankhoa / symfony3.md
Last active July 23, 2016 17:20
symfony3
@htxuankhoa
htxuankhoa / update_commands.sh
Last active June 22, 2018 08:35
Summary all update/upgrade commands
$ sudo composer global self-update
$ sudo composer global update # update all packages
$ composer global show -i # show installed packages
$ sudo composer global update "laravel/installer"
npm i -g npm@latest
npm -g update # update all global packages
npm i -g cordova
npm i -g ionic@latest
npm i -g @angular/cli
@htxuankhoa
htxuankhoa / get_tables_size.sql
Last active December 28, 2018 11:57
Get tables size
SELECT table_schema as 'Database Name',
sum( data_length + index_length ) as 'Size in Bytes',
round((sum(data_length + index_length) / 1024 / 1024), 4) as 'Size in MB'
FROM information_schema.TABLES
GROUP BY table_schema;
@htxuankhoa
htxuankhoa / linux.md
Last active September 6, 2019 06:22
Linux

List of Linux commands often use

Change owner & group

$ sudo chown -R user:group /path/to/directory/or/file

Tar

c : create
@htxuankhoa
htxuankhoa / create-nextjs-app.md
Created June 24, 2022 01:36
Create NextJS app