Skip to content

Instantly share code, notes, and snippets.

View brabao's full-sized avatar
😡
ggggrrrrrrrr

Danilo Ribeiro da Silveira brabao

😡
ggggrrrrrrrr
View GitHub Profile
@duiliogp
duiliogp / MySQLImport.sh
Last active September 14, 2023 19:27
MySQL Export Database
#####################
### Variables
#####################
SQL_FILENAME=""
IMPORT_HOST=""
IMPORT_USER=""
IMPORT_PASSWORD=""
IMPORT_PORT=""
IMPORT_DBNAME=""
@fevangelou
fevangelou / my.cnf
Last active July 14, 2024 17:45
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated December 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@tijnkooijmans
tijnkooijmans / crc16.c
Created April 17, 2014 12:53
CRC-16/CCITT-FALSE
uint16_t crc16(char* pData, int length)
{
uint8_t i;
uint16_t wCrc = 0xffff;
while (length--) {
wCrc ^= *(unsigned char *)pData++ << 8;
for (i=0; i < 8; i++)
wCrc = wCrc & 0x8000 ? (wCrc << 1) ^ 0x1021 : wCrc << 1;
}
return wCrc & 0xffff;