Skip to content

Instantly share code, notes, and snippets.

View MuntashirAkon's full-sized avatar
🚫
Not available

Muntashir Al-Islam MuntashirAkon

🚫
Not available
View GitHub Profile
@MuntashirAkon
MuntashirAkon / weblate-blacklist.md
Created June 4, 2025 22:18
List of users that were blocked and the reason for blocking them
Username Name Date Reason
@tymkolt Tymofii Lytvynenko Around 2022 Suspected machine translation, abuse of search/replace function
@alichaper67 Ali Momeni 17 April 2022 Attempted to poison the Persian translations
@antoniorolon77 Antonio Rolon 28 June 2022 Attempted to insert spammy texts in Esperanto strings
@garik23313 Garik Inkognito 09 July 2022 Attempted to insert BTC address in the Disclaimer title
@id Haerul Fuad 05 September 2022 Attempted to put his Weblate username in a string. Looking at his profile, he appears to have done the same in many other projects, including the Weblate project itself. (Also, how did he managed to get an username called id in first p
@MuntashirAkon
MuntashirAkon / github-blacklist.md
Created June 4, 2025 21:38
List of users that were blocked and the reason for blocking them
Username Name Date Reason
@brewmaster396 N/A 05 November 2022 Made offensive comment (here)
@drogga N/A Around 2023 Multiple offences: creates a fork just to mention the maintainers/other users, makes offensive comments if someone goes against them, sends emails containing offensive comments
@CamsShaft Cam 08 Apr 2024 Made an offensive comment and deleted it (here)
@GerbillLife N/A 01 Jun 2025 Cleared at least two issues (here and here) with history without explanation
@Worongodd1337 N/A 04 Jun 2025 Suspected [spammer](h
@MuntashirAkon
MuntashirAkon / get_dpi_scale.ps1
Created May 14, 2025 21:45
Get DPI scale for the main display in Windows 11 (24H2). This is useful if you have different DPI scale for different displays and configure VcXsrv and GDK to scale windows correctly in WSL2.
Add-Type @'
using System;
using System.Runtime.InteropServices;
using System.Drawing;
public class DPI {
[DllImport("gdi32.dll")]
static extern int GetDeviceCaps(IntPtr hdc, int nIndex);
public enum DeviceCap {
@MuntashirAkon
MuntashirAkon / restrict_win_version.ps1
Created May 14, 2025 21:34
Restrict Window 11 version to the current Windows version to prevent any major updates (which often break stuffs). Security and quality updates will still be provided.
# Get current Windows DisplayVersion (e.g., 24H2)
$CurrentVersion = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").DisplayVersion
# Define the target registry path
$RegPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"
# Create the registry key if it does not exist
if (-not (Test-Path $RegPath)) {
New-Item -Path $RegPath -Force | Out-Null
}
@MuntashirAkon
MuntashirAkon / guidelines.md
Last active July 11, 2023 10:44
Community guidelines for App Manager | Chat

Rules

  1. No PM to the maintainer/moderators without prior permission
  2. No spams, promotions and advertisements of any kind
  3. No NSFW or politics
  4. No crash reports in plain message (save it to a file and upload it)

Recommendations

  1. Keep messages clear and concise
@MuntashirAkon
MuntashirAkon / extract_pubkey_hash.sh
Created May 5, 2022 16:29
Get Base64 encoded SHA-256 checksum of a public key from a DER encoded certificate. This is useful for creating certificate pinning on Android. See https://developer.android.com/training/articles/security-config#CertificatePinning
#!/usr/bin/env bash
if [[ "$(uname)" == "Darwin" ]]; then
alias sha256sum="shasum -a 256"
fi
function extract_pubkey_hash() {
openssl x509 -inform der -in "$1" -pubkey -noout | sed -e 's/-----BEGIN PUBLIC KEY-----//' -e 's/-----END PUBLIC KEY-----//' | tr '\n' ',' | sed s/,//g | base64 -d | sha256sum - | awk '{ print $1 }' | xxd -r -p | base64
}
@MuntashirAkon
MuntashirAkon / hexify.cpp
Created January 29, 2022 17:52
Hexify in C/CPP
// Get a byte array as a hexadecimal character string
int hexify(const uint8_t *in, size_t in_size, char *out, size_t out_size) {
if (in_size == 0 || out_size == 0) return 0;
char map[16+1] = "0123456789ABCDEF";
int bytes_written = 0;
size_t i = 0;
while(i < in_size && (i*2 + (2+1)) <= out_size)
{
@MuntashirAkon
MuntashirAkon / ECDH.java
Last active March 25, 2024 12:48 — forked from zcdziura/Crypto Test
Encryption using Elliptic Curves and Diffie-Hellman key exchanges
import java.io.UnsupportedEncodingException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.PublicKey;
@MuntashirAkon
MuntashirAkon / delete_tweet.js
Created May 3, 2020 14:38
Delete all tweets from twitter
// NOTE: This script is far from complete, especially “Likes” section
// https://stackoverflow.com/a/2706236/4147849
function eventFire(el, etype) {
if (el.fireEvent) {
el.fireEvent('on' + etype);
} else {
var evObj = document.createEvent('Events');
evObj.initEvent(etype, true, false);
el.dispatchEvent(evObj);
@MuntashirAkon
MuntashirAkon / mmssms_to_qksms.php
Created April 25, 2020 14:26
Convert mmssms.db to QKSMS compatible json file
<?php
if(!isset($argv[1])){
echo "USAGE: ${argv[0]} <mmssms.db file>\n";
exit(1);
}
$db_file = $argv[1];
$db = new SQLite3($db_file);
$stmt = $db->prepare("SELECT * FROM sms");