Skip to content

Instantly share code, notes, and snippets.

@thanhtoan1196
thanhtoan1196 / Crypt.java
Created June 14, 2021 15:35 — forked from kobeumut/Crypt.java
AES128 CBC mode in Java, Kotlin and Ruby
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.util.Base64;
public class Encryptor {
public static String encrypt(String key, String initVector, String value) {
try {
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");
IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));
Note: I don't know where does this thread belongs. If I'm on the incorrect section, move it to the correct one.
Many people are literally just selling this method and I feel like sharing this out so that you don't have to pay because the seller just don't do a minute of work to get you the drive.
So moving straight towards the method:
Step I:
Go to this link: https://td.fastio.me/ (mirrors to be left at the last)
Step II:
Type your desired drive's name at the first field and your Gmail on the bottom field.
@thanhtoan1196
thanhtoan1196 / Caddyfile
Created February 14, 2023 04:58 — forked from ducan-ne/Caddyfile
Dockerfile "zero-config" over 35 frameworks. "One Dockerfile to rule them all"
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.
@thanhtoan1196
thanhtoan1196 / mysql2-m1.md
Created December 30, 2024 09:15 — forked from fernandoaleman/mysql2-m1.md
How to install mysql2 gem on m1 Mac

Problem

Installing mysql2 gem errors on Apple silicon M1, M2 or M3 Mac running macOS Sonoma.

Solution

Make sure mysql-client, openssl and zstd are installed on Mac via Homebrew.

Replace mysql-client with whichever mysql package you are using

@thanhtoan1196
thanhtoan1196 / README.md
Created January 14, 2025 04:16 — forked from tuanchauict/README.md
Archive Quick Access Button

Archive Quick Access Button

A simple JavaScript script that adds a floating "Archive" button to specific news websites, allowing quick archiving via archive.md.

image image
@thanhtoan1196
thanhtoan1196 / RSS.md
Created March 15, 2025 05:55 — forked from thefranke/RSS.md
A list of RSS endpoints, readers and resources

The RSS Endpoint List

Please refer to this blogpost to get an overview.

Replace *-INSTANCE with one of the public instances listed in the scrapers section. Replace CAPITALIZED words with their corresponding identifiers on the website.

Social Media

Twitter