Skip to content

Instantly share code, notes, and snippets.

View ba0f3's full-sized avatar
🇻🇳
Paracel islands and Spratly islands belong to Vietnam

Huy Doan ba0f3

🇻🇳
Paracel islands and Spratly islands belong to Vietnam
View GitHub Profile
@ba0f3
ba0f3 / iemi.md
Created September 30, 2025 22:12 — forked from nibirrayy/iemi.md
[GUIDE] How to change IMEI on Snapdragon devices

[GUIDE] How to change IMEI on Snapdragon devices

FOR EDUCATIONAL PURPOSE ONLY, CHANGING IMEI IS ILLEGAL IN MOST COUNTRIES, MAKE SURE YOU CONVINCE YOUR ACTIONS BEFORE DOING THIS.

I DON'T RESPONSIBLE IF YOUR DEVICE IS BROKEN OR THE IMEI IS NOT CHANGED CAUSED BY YOU DIDN'T FOLLOW THE STEPS CAREFULLY OR HAVING A DIFFERENT EFS PARTITION SCHEME.

This guide was tested on Google Pixel 3, different device may also have a different EFS partition scheme, please make sure you adjust it with this guide. Other Google Pixel devices may use this guide without adjusting.

Prerequisites:

@ba0f3
ba0f3 / add-custom-ca.sh
Created September 5, 2025 16:10
add custom CA to browser for Linux
#install package, required for certutil
apt install -y libnss3-tools
# For Chromium, Firefox
certutil -L -d dbm:$HOME/.pki/nssdb
certutil -A -n "CA NAME" -t "TC,C,T" -i /path/to/ca.crt -d sql:$HOME/.pki/nssdb
# For Vivaldi
certutil -A -n "CA NAME" -t "TC,C,T" -i /path/to/ca.crt -d sql:$HOME/.config/vivaldi/
@ba0f3
ba0f3 / google-signin.filter
Created August 28, 2025 15:41
uBlock custom filter to disable "Sign in with google.com" popup
||accounts.google.com/gsi/client$3p
You are ChatGPT, a large language model based on the GPT-5 model and trained by OpenAI.
Knowledge cutoff: 2024-06
Current date: 2025-08-08
Image input capabilities: Enabled
Personality: v2
Do not reproduce song lyrics or any other copyrighted material, even if asked.
You're an insightful, encouraging assistant who combines meticulous clarity with genuine enthusiasm and gentle humor.
Supportive thoroughness: Patiently explain complex topics clearly and comprehensively.
Lighthearted interactions: Maintain friendly tone with subtle humor and warmth.
@ba0f3
ba0f3 / README.md
Last active September 4, 2024 16:01 — forked from fOmey/README.md
WSL : nl80211 not found fix & 8814au drivers

WSL : nl80211 not found fix & 8814au drivers

Quick facts

  • Do not save kernel source to a /mnt/c path, compile from the linux user home directory. Windows is case-insensitive, will cause random "file not found" compilation errors.
  • I'm using the Kali Windows store installation to do all these steps, this is especially important if you plan on using 8814au drivers (I don't believe they are compatible with Ubuntu)
  • Windows 10, latest windows updates & WSL.
  • The steps related to 8814au drivers can be modified as necessary.
  • For changes to take effect, WSL requires the "6 second rule" between restarts when modifying WSL related configuration files. Meaning if you issue a wsl --shutdown wait 6 seconds before issuing wsl.
@ba0f3
ba0f3 / enterprise_token.rb
Created April 17, 2024 02:51 — forked from markasoftware/enterprise_token.rb
OpenProject Enterprise mode for free
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ it doesn't show that enterprise mode is enabled in the settings, but all ################
############ enterprise mode features, such as KanBan boards, are enabled. ################
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2023 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
@ba0f3
ba0f3 / filetime.nim
Created February 26, 2021 17:54
Get FILETIME and convert posix time to windows FILENAME
const EPOCH_DIFF = 11644473600'i64
type FILETIME = object
dwLowDateTime: uint32
dwHighDateTime: uint32
proc toFileTime(tv: Timeval): FILETIME =
var mtime = EPOCH_DIFF + tv.tv_sec.int64
mtime = mtime + tv.tv_usec * 10;
mtime = mtime * 10_000_000
@ba0f3
ba0f3 / gist:f01f6c559ed952411c2eb2366a1350e3
Last active July 13, 2021 05:54 — forked from freyes/gist:dfc3f5232526a62bbc09adc816e0477d
bluetoothd: a2dp-sink profile connect failed for AA:BB:CC:DD:EE:00: Protocol not available
Source: https://g751jy.wordpress.com/about/parrot-zik-bluetooth-headset/
https://bbs.archlinux.org/viewtopic.php?id=194006
Cached: http://webcache.googleusercontent.com/search?q=cache:4stTobIXSD0J:https://g751jy.wordpress.com/about/parrot-zik-bluetooth-headset/+&cd=3&hl=en&ct=clnk&gl=us
Bug and possible solution: actually I found a bug in that make the headset unusable, it seems that the pulse audio module: module-bluetooth-discover works only if started after the X11 session is up. So I have a workaround.
Edit the file:
/etc/pulse/default.pa
@ba0f3
ba0f3 / mm.nim
Created July 18, 2020 11:29
MemoryModule wrapper for Nim
{.compile: "MemoryModule.c".}
type
HMEMORYMODULE* = pointer
HMEMORYRSRC* = pointer
HCUSTOMMODULE* = pointer
{.push: cdecl, importc, discardable.}
proc MemoryLoadLibrary*(loc: pointer, size: int): HMEMORYMODULE
@ba0f3
ba0f3 / mongo_bpipe.sh
Last active February 17, 2025 12:23
backup mongodb using BareOS' bpipe plugin
#!/bin/sh
# Save this file on the on FD
# /usr/lib/bareos/plugins/mongo_bpipe.sh
#DBNAMES=""
#DBUSERNAME=""
#DBPASSWORD=""
#DBAUTHDB=""