Skip to content

Instantly share code, notes, and snippets.

import com.squareup.okhttp.*;
import org.json.JSONObject;
import java.io.*;
import java.math.BigDecimal;
public class TestMainBHYT {
// private static final String LOGIN = "http://localhost:47503/api/token/take";
// private static final String SEND_FILE = "http://localhost:47503/api/egw/guiHoSoGiamDinh4210";
B1. Cai dat git bash https://git-scm.com/downloads
B2. Bat Git Bash. chay lenh
ssh-keygen -t rsa
enter
enter
enter cho den khi xong
B3. chay lenh "cat ~/.ssh/id_rsa.pub"
B4. Copy nhung thu tren man hinh gui cho a Tuan
@ledangtuanbk
ledangtuanbk / haproxy-redirect-base-on-payload
Last active February 21, 2022 17:39
Haproxy redirect request base on body
Based on this guide
https://stackoverflow.com/questions/23259843/how-to-route-traffic-reverse-proxy-with-haproxy-based-on-request-body
frontend http-in
bind *:80
option http-buffer-request
acl redirect_pingpong req.body -m reg [insert your regular expression here]
use_backend pingpong_backend if redirect_pingpong
default_backend web_bk
@ledangtuanbk
ledangtuanbk / prepare-commit-msg.sh
Created December 8, 2021 09:13 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@ledangtuanbk
ledangtuanbk / linux
Last active September 14, 2021 09:53
alias for linux
alias status='sudo systemctl status'
alias start='sudo systemctl start'
alias stop='sudo systemctl stop'
alias restart='sudo systemctl restart'
alias enable='sudo systemctl enable'
alias disable='sudo systemctl disable'
alias reload='sudo systemctl daemon-reload'
alias tarx='tar -xzvf'
alias tarc='tar -czvf'
alias psef='sudo ps -ef|grep '
@ledangtuanbk
ledangtuanbk / trial.md
Created August 19, 2021 11:33 — forked from satish-setty/trial.md
Beyond Compare 4 license for Linux

Beyond Compare 4.x

Licensed to: ASIO Allsoftinone Quantity: 1 user Serial number: 1822-9597 License type: Pro Edition for Linux

First delete away trial mode:

sudo sed -i "s/keexjEP3t4Mue23hrnuPtY4TdcsqNiJL-5174TsUdLmJSIXKfG2NGPwBL6vnRPddT7tH29qpkneX63DO9ECSPE9rzY1zhThHERg8lHM9IBFT+rVuiY823aQJuqzxCKIE1bcDqM4wgW01FH6oCBP1G4ub01xmb4BGSUG6ZrjxWHJyNLyIlGvOhoY2HAYzEtzYGwxFZn2JZ66o4RONkXjX0DF9EzsdUef3UAS+JQ+fCYReLawdjEe6tXCv88GKaaPKWxCeaUL9PejICQgRQOLGOZtZQkLgAelrOtehxz5ANOOqCaJgy2mJLQVLM5SJ9Dli909c5ybvEhVmIC0dc9dWH+/N9KmiLVlKMU7RJqnE+WXEEPI1SgglmfmLc1yVH7dqBb9ehOoKG9UE+HAE1YvH1XX2XVGeEqYUY-Tsk7YBTz0WpSpoYyPgx6Iki5KLtQ5G-aKP9eysnkuOAkrvHU8bLbGtZteGwJarev03PhfCioJL4OSqsmQGEvDbHFEbNl1qJtdwEriR+VNZts9vNNLk7UGfeNwIiqpxjk4Mn09nmSd8FhM4ifvcaIbNCRoMPGl6KU12iseSe+w+1kFsLhX+OhQM8WXcWV10cGqBzQE9OqOLUcg9n0krrR3KrohstS9smTwEx9olyLYppvC0p5i7dAx2deWvM1ZxKNs0BvcXGukR+/g" /usr/lib/beyondcompare/BCompare
1. Use online tool https://www.devglan.com/online-tools/aes-encryption-decryption
Encryption and Descryption:
- Mode ECB
- Key Size (Size of AES Encrypted Output) in Bits and Secret Key (length())
128 - 16
192 - 24
256 - 32
- Output default Hex (Ecryption)
- Decode to Plain (Decryption)
@ledangtuanbk
ledangtuanbk / ldt
Last active January 22, 2021 07:50
123456
password
12345678
12345
1234567
leonhan
dadmin
thanhnhan
nhdanh
leosupport
ladmin
ntgiang
padmin
sadmin
tadmin
123456
password
12345678
qwerty
123456789
12345
1234
111111
1234567
dragon