Skip to content

Instantly share code, notes, and snippets.

View hoannc54's full-sized avatar

Nguyễn Công Hoan hoannc54

  • Hanoi
View GitHub Profile
Can I Remove MySQL Binary Log Yes, as long as the data is replicated to Slave server, it’s safe to remove the file. It’s recommend only remove MySQL Binary Log older than 1 month.
Besides, if Recovery of data is the main concern, it’s recommend to archive MySQL Binary Log.
There are several ways to remove or clean up MySQL Binary Log, it’s not recommend to clean up the file manually, manually means running the remove command.
Remove MySQL Binary Log with RESET MASTER Statement Reset Master statement is uses for new database start up during replication for Master and Slave server. This statement can be used to remove all Binary Log.
To clean up Binary Log on Master Server
@hoannc54
hoannc54 / Dockerfile
Created October 9, 2020 04:58 — forked from morgangiraud/Dockerfile
nginx-proxy to dynamically add/remove virtual host on docker & mac with ease
FROM nginx:alpine
COPY default.conf /etc/nginx/conf.d/.
@hoannc54
hoannc54 / system_usage_log.sh
Created June 17, 2020 07:07 — forked from vuthaihoc/system_usage_log.sh
System usage bash
#!/bin/bash
## Use : ss command
## variable for change :
##
##----------
Timetemp='%H%M'
Time=$(date +"${Timetemp}")
Date=$(date +"%y%m%d")
Yest=$(date --date="1 day ago" +"%y%m%d")
#Day=$(date +"%a")
@hoannc54
hoannc54 / create_mysql5_db.sh
Created June 17, 2020 07:07 — forked from vuthaihoc/create_mysql5_db.sh
Script create db, user and grant permission
#!/bin/bash
# sudo ./mysql-db-create.sh dbname dbuser password
# Functions
ok() { echo -e '\e[32m'$1'\e[m'; } # Green
EXPECTED_ARGS=3
E_BADARGS=65
MYSQL=`which mysql`
<?php
<<<CONFIG
packages:
- "symfony/process:^5.0"
CONFIG;
/**
* Created by PhpStorm.
* User: hocvt
* Date: 2020-04-03
@hoannc54
hoannc54 / home.blade.php
Created December 6, 2019 02:25
Laravel-todo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel Todo - Basic</title>
<!-- Fonts -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>AdminLTE 3 | Dashboard</title>
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Font Awesome -->
<link rel="stylesheet" href="/backend/plugins/fontawesome-free/css/all.min.css">
@hoannc54
hoannc54 / dashboard.blade.php
Last active October 6, 2019 17:47
Admin shop
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>AdminLTE 3 | Dashboard</title>
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Font Awesome -->
<link rel="stylesheet" href="/backend/plugins/fontawesome-free/css/all.min.css">
@hoannc54
hoannc54 / create.blade.php
Created September 28, 2019 06:12
Học nhóm laravel
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Add todo</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</head>
<body>
<nav class="navbar navbar-default">
@hoannc54
hoannc54 / countries_code
Created November 23, 2018 08:03
Countries and lannguages
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',