Skip to content

Instantly share code, notes, and snippets.

@0xssff
0xssff / kdz.py
Created July 6, 2025 21:18 — forked from iscgar/kdz.py
A correct extractor for LG's KDZ Android image files
# A simple and correct LG KDZ Android image extractor, because I got fed up
# with the partially working one from kdztools.
#
# Copyright (c) 2021 Isaac Garzon
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@0xssff
0xssff / README.md
Created June 16, 2025 22:56 — forked from warewolf/README.md
Phison drive mode configuration

Phison PS2251-xx USB flash drive controller mode configuration

Overview

Phison based flash drives have various modes that dictate how they operate;

  1. as a regular flash drive (mode 3)
  2. as a dual-volume flash drive (mode 7)
  3. as a single volume flash drive + cdrom (mode 21)
@0xssff
0xssff / eco-friendly-tiny-server-patterns.md
Created September 2, 2024 13:29 — forked from coderofsalvation/eco-friendly-tiny-server-patterns.md
My favorite (awesome) eco-friendly server patterns

tiny servers: the serverpark killers

auto-suspend-wakeup webservices

stop wasting cpu/mem-resources on idling services:

#!/bin/sh
while sleep 1s; do
 set +e
@0xssff
0xssff / vanilla-js-cheatsheet.md
Created September 2, 2024 13:10 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
@0xssff
0xssff / gist:76c3467657137937e3332853280035c1
Created June 1, 2024 11:21 — forked from vms20591/gist:b8b17b3c44fc9b62ff734c0b588014db
Virtualbox - Arch Linux installation - Full Disk Encryption with detached LUKS header & unecrypted boot

Pre-Requisites

  1. Arch Linux iso
  2. Virtualbox
  3. Two virtual HDDs - 8G (main) & 1G (detached header & boot) respectively

Preparing the disks

Step 1

@0xssff
0xssff / mpvctl
Created October 20, 2020 19:22 — forked from dwgill/mpvctl
A small script for controlling mpv via the JSON IPC. Intended to resemble playerctl.
#!/usr/bin/env bash
# This script requires:
# - that the directory $HOME/.mpv exist
# - that the program socat be installed
# - that you start mpv with the unix socket feature pointing at that directory
# I recommend an alias in your .bashrc or equivalent file:
# alias mpv="mpv --input-unix-socket=$HOME/.mpv/socket"
socket="$HOME/.mpv/socket"
@0xssff
0xssff / aliases.sh
Created April 1, 2020 15:55
aliases
# Easier navigation: .., ..., ~ and -
alias ..="cd .."
alias ...="cd ../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"
# List all files colorized in long format, including dot files
alias la="ls -Gla"
# List only directories
@0xssff
0xssff / corsproxy.php
Created March 30, 2020 16:18 — forked from dropmeaword/corsproxy.php
simple CORS proxy in php
<?php
error_reporting( error_reporting() & ~E_NOTICE ); // evil
// config
$enable_jsonp = false;
$enable_native = false;
$valid_url_regex = '/.*/';
// ############################################################################