Skip to content

Instantly share code, notes, and snippets.

View vinhjaxt's full-sized avatar
🏠
Working from home

🇻🇳 vinhjaxt

🏠
Working from home
View GitHub Profile
@vinhjaxt
vinhjaxt / README.md
Created June 3, 2024 17:00 — forked from valyala/README.md
Optimizing postgresql table for more than 100K inserts per second

Optimizing postgresql table for more than 100K inserts per second

  • Create UNLOGGED table. This reduces the amount of data written to persistent storage by up to 2x.
  • Set WITH (autovacuum_enabled=false) on the table. This saves CPU time and IO bandwidth on useless vacuuming of the table (since we never DELETE or UPDATE the table).
  • Insert rows with COPY FROM STDIN. This is the fastest possible approach to insert rows into table.
  • Minimize the number of indexes in the table, since they slow down inserts. Usually an index on time timestamp with time zone is enough.
  • Add synchronous_commit = off to postgresql.conf.
  • Use table inheritance for fast removal of old data:
@vinhjaxt
vinhjaxt / frida_multiple_unpinning.js
Created December 19, 2023 16:25 — forked from akabe1/frida_multiple_unpinning.js
Another Android ssl certificate pinning bypass for various methods
/* Android ssl certificate pinning bypass script for various methods
by Maurizio Siddu
Run with:
frida -U -f <APP_ID> -l frida_multiple_unpinning.js [--no-pause]
*/
setTimeout(function() {
Java.perform(function() {
console.log('');

Vinh's GitHub stats

Welcome, You are my Visitor Count visitor, Thank You! 🎉🎉

import escpos.printer as printer
cups_conn = printer.CupsPrinter(host="192.168.2.1",port=631,printer_name="XP-58IIH") # Default CUPS printer
cups_conn.textln("Hello CUPS!") # or any python-escpos command
cups_conn.close()
# remote
./cloudflared --url tcp://127.0.0.1:3389
# local
./cloudflared access tcp --hostname uncertainty-saints-newark-martin.trycloudflare.com --url 127.0.0.1:3388
# rdp to 127.0.0.1:3388
@vinhjaxt
vinhjaxt / http-benchmark.md
Created October 27, 2023 05:44 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@vinhjaxt
vinhjaxt / cloudflared.sh
Created August 16, 2023 11:35
Cloudflared Tunnel docker
docker run -d --name "cloudflared" \
--restart=unless-stopped \
--add-host=host.docker.internal:host-gateway \
cloudflare/cloudflared:latest \
--url http://host.docker.internal