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
@vuthaihoc
vuthaihoc / system_usage_log.sh
Last active June 23, 2020 09:54
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")
@vuthaihoc
vuthaihoc / create_mysql5_db.sh
Last active September 28, 2020 01:42
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`
@wojteklu
wojteklu / clean_code.md
Last active May 12, 2025 20:22
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method: