Skip to content

Instantly share code, notes, and snippets.

@siddharth
siddharth / dbm.cnf
Last active October 19, 2020 10:48
Automating daily backups of mysql server on backup server running on same network using credentials file
[client]
user="testuser"
password="password"
host="192.168.1.1"
@siddharth
siddharth / xtrabackup_full_increment_restore.sh
Created October 16, 2020 05:39 — forked from SQLadmin/xtrabackup_full_increment_restore.sh
Automate xtrabackup for FULL/Incremental and restore
#!/bin/bash
# This is my production backup script.
# https://sqlgossip.com
set -e
set -u
usage() {
echo "usage: $(basename $0) [option]"
echo "option=full: Perform Full Backup"
@siddharth
siddharth / ChecksumGen.java
Last active March 16, 2022 13:54
Replicating / Implementing Java's AES/CBC/PKCS5Padding encryption in PHP
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.Base64;
import java.io.ByteArrayOutputStream;
@siddharth
siddharth / .goaccessrc
Created July 23, 2015 11:30
Goaccess custom log-format for combined vhost with XFF, XUA
log-format %h %^ %^ %^[%d:%t %^] "%r" %s %b %^/%^/%D "%R" "%u" "%^"