Skip to content

Instantly share code, notes, and snippets.

View aminyuddin's full-sized avatar

Amin Yuddin aminyuddin

  • Kuala Lumpur
View GitHub Profile
@aminyuddin
aminyuddin / .env
Last active May 28, 2025 02:18
Minecraft discord bot for my kids.
TOKEN=
GUILD_ID=
ALLOWED_USERS=
XBL_API_KEY=
def combine_zpk_clear_components(component1, component2):
combined_key_bytes = bytearray(len(component1))
for i in range(len(combined_key_bytes)):
combined_key_bytes[i] = component1[i] ^ component2[i]
return combined_key_bytes
def hex_string_to_byte_array(hex_string):
length = len(hex_string)
byte_array = bytearray(length // 2)
for i in range(0, length, 2):
@aminyuddin
aminyuddin / ZPKClearComponentCombiner
Created June 23, 2023 09:35
ZPK Clear Component Combiner
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.SecretKeySpec;
public class ZPKClearComponentCombiner {
public static void main(String[] args) {
String zpkComponent1 = "XXX";
String zpkComponent2 = "YYY";
try {
@aminyuddin
aminyuddin / bash_strict_mode.md
Created February 15, 2023 04:10 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@aminyuddin
aminyuddin / EncryptSample.java
Created October 1, 2021 02:16 — forked from ozkansari/EncryptSample.java
PIN Block Creation
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class EncryptSample {
private static final String KEY = "AB1C11111111111AAAAAAADDDDD11111";
private static final int PIN_LENGTH = 6;
public static void main(String[] args) throws Exception {
@aminyuddin
aminyuddin / PinblockTool.java
Created October 1, 2021 02:16 — forked from Gilmor/PinblockTool.java
Pinblock ISO 9564 format 0
package cz.monetplus.mnsp.tools.misc;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.lang.StringUtils;
/**
* Tools for encoding a decoding pinblock
*
* @author Tomas Jacko <tomas.jacko [at] monetplus.cz>
@aminyuddin
aminyuddin / git-cheat-sheet.md
Created March 4, 2020 02:11 — forked from prograhammer/git-cheat-sheet.md
Git cheat sheet for some useful Git commands and command scenarios.
@aminyuddin
aminyuddin / commit_format_examples.txt
Created March 4, 2020 01:36 — forked from mutewinter/commit_format_examples.txt
Examples of my commit format.
chore: add Oyster build script
docs: explain hat wobble
feat: add beta sequence
fix: remove broken confirmation message
refactor: share logic between 4d3d3d3 and flarhgunnstow
style: convert tabs to spaces
test: ensure Tayne retains clothing
@aminyuddin
aminyuddin / .gitconfig
Created February 28, 2020 07:17
VSCode as git mergetool and difftool
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
@aminyuddin
aminyuddin / git.sh
Created February 17, 2020 07:44
Configure git config at the system level
$ git config --add --system http.sslCAInfo /etc/pki/tls/certs/ca-certificates.crt
$ git config --add --system http.sslCAPath /etc/pki/tls/certs
$ git config http.sslCAInfo
/etc/pki/tls/certs/ca-certificates.crt
$ git config http.sslCAPath
/etc/pki/tls/certs