Skip to content

Instantly share code, notes, and snippets.

@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.
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 / 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"));
@thanhtoan1196
thanhtoan1196 / .eslintignore
Created September 15, 2020 12:19 — forked from heyitsarpit/.eslintignore
ESlint and Prettier for React apps (Bonus - Next.js and TypeScript)
node_modules
@thanhtoan1196
thanhtoan1196 / login_messenger.py
Created July 15, 2020 06:25 — forked from south1907/login_messenger.py
Login facebook messenger and chat
from selenium.webdriver import Chrome, ChromeOptions
from selenium.webdriver.common.keys import Keys
import time
email = 'youremail@gmail.com'
password = 'yourpassword'
browser = Chrome()
url = 'https://www.facebook.com/'
browser.get(url)
#!usr/bin/python3
# created by namph
# link lyric file: https://zingmp3.vn/api/song/get-lyric?id=ZWAFE897&ctime=1592657865&sig=a79a3de95632ac37d116c01755f216e965784f2cf2ce13dac1ced62a3f08430438691484848bf685903c363a367eec12d1379c13f6d25288488b59b2fac1b091&api_key=38e8643fb0dc04e8d65b99994d3dafff
import json
import time
import os
with open('banhmikhong.json', 'r') as f:
song = json.loads(f.read())
@thanhtoan1196
thanhtoan1196 / process_chat_song.py
Created July 15, 2020 06:24 — forked from south1907/process_chat_song.py
Process main chat song messenger facebook by selenium
#!usr/bin/python3
# created by namph
from selenium.webdriver import Chrome, ChromeOptions
from selenium.webdriver.common.keys import Keys
import time
import json
import os
email = 'email1'
@thanhtoan1196
thanhtoan1196 / encode.sh
Created January 21, 2020 13:51 — forked from mikoim/README.md
YouTube recommended encoding settings on ffmpeg (+ libx264)
#/bin/sh
ffmpeg -i input -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low output
@thanhtoan1196
thanhtoan1196 / README.md
Created January 18, 2020 13:34 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@thanhtoan1196
thanhtoan1196 / README.md
Created January 18, 2020 13:28
A node js server which streams mkv to just mkv supported browsers

Setup

Get nodejs from Node

To run

node server.js