Skip to content

Instantly share code, notes, and snippets.

@caot
caot / ida-analysis.py
Created October 15, 2025 13:53 — forked from geekman/ida-analysis.py
simple IDAPython script for scripting automated binary analysis
#
# ida-analysis.py
# a simple IDAPython binary analysis script
# 2020.05.24 darell tan
#
# invoke with:
# idat64 -c -A -S"ida-analysis.py $HOME/analysis.txt" <file.bin>
#
import sys
@caot
caot / vita-clion.md
Created October 7, 2025 03:35 — forked from DionKill/vita-clion.md
CLion setup for PlayStation Vita development using VitaSDK on Linux

immagine immagine

How to setup CLion for PS Vita development

Someone else did this before me, but I can't find the gist anymore so I'll make another one. I'm going to be using this for my personal projects in the future, including this one. This is going to be a Linux tutorial, and for now I've been using Fedora, but it should be cross-distro compatible. Actually this is for CLion, but looking at it once more, I think it is applicable to other IDEs, as well as just manually doing it on your own. But I won't help you with that!

Get and install VitaSDK

@caot
caot / Tech prefs.md
Created September 15, 2025 23:01 — forked from CTimmerman/Tech prefs.md
Technology preferences / tech prefs.

My Technology Preferences

For those who don't bother to remember.

Hardware

Personal Computer

A laptop/notebook with 16+ GB RAM, Nvidia GPU for stability (hardware manufacturers seem notoriously bad at software, but Nvidia is relatively good if you ignore the Experience app that demands your data, and training AI needs 50 GB VRAM nowadays but 80 GB is 10x the price of 24 GB so the 1+k USD cheaper AMD or Apple 128GB are better), Linux and Wine and/or Windows 10 > expensive, hard-to-customize MacBook with MacOS (needs Spectacle and HyperSwitch to almost be as good as Windows 10), flimsy adapter wire and too many proprietary connectors. Preferably a 14+" matte Full HD (UHD is only useful at 23+" or equivalent in VR) [Supe

@caot
caot / Server.py
Created February 17, 2025 02:01 — forked from hailangx/Server.py
A simper python http server can handle mime type properly
# -*- coding: utf-8 -*-
#test on python 3.4 ,python of lower version has different module organization.
import http.server
from http.server import HTTPServer, BaseHTTPRequestHandler
import socketserver
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
@caot
caot / Wayland.md
Created May 31, 2024 22:09 — forked from probonopd/Wayland.md
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@caot
caot / workaround-podman-issue19913.sh
Created March 7, 2024 15:33 — forked from rugk/workaround-podman-issue19913.sh
Workaround script for podman rm (--force) does not work anymore ("container state improper"/"invalid argument" when unmounting) and start neither, see https://github.com/containers/podman/issues/19913
#!/bin/bash
#set -x
# Define the list of containers you want to remove
containers=("nextcloud_redis_1" "nextcloud_db_1" "nextcloud_nc_1")
for container in "${containers[@]}"; do
echo "Now handling $container..."
# First attempt to forcefully remove the container
podman rm --force "$container"
@caot
caot / django_error_test_database_1005.md
Created September 19, 2023 20:10 — forked from rminderhoud/django_error_test_database_1005.md
Fix mysql error 1005 when running django tests

#Django Test Database Error 1005 8/1/2015

Environment

  • Django 1.8.3
  • MySQL 5.5

When running python manage.py test I was receiving the following error

@caot
caot / LoginRequiredMiddleware.py
Created May 12, 2023 13:26 — forked from brianlittmann/LoginRequiredMiddleware.py
Django middleware component that wraps the login_required decorator around all URL patterns be default, with exceptions. Can also require user to belong to a group ("admin" in this gist) or be adapted if using the Django admin app.
"""
Middleware component that wraps the login_required decorator around all URL patterns be default, with exceptions.
Define PUBLIC_URLS and ADMIN_URLS using regex in settings.py, where:
PUBLIC_URLS do not require user to be logged in.
ADMIN_URLS require user to be in admin group.
Source: http://stackoverflow.com/a/2164224/720054
"""
# settings.py
PUBLIC_URLS = (
@caot
caot / decode_shadowpad_dns.py
Created April 18, 2023 15:42 — forked from fox-srt/decode_shadowpad_dns.py
Netsarang backdoor DNS payload decrypter
#!/usr/bin/env python
"""
Netsarang backdoor DNS payload decrypter
file: decode_shadowpad_dns.py
author: Fox-IT Security Research Team <[email protected]>
Usage:
$ cat dns.txt
sajajlyoogrmkllmuoqiyaxlymwlvajdkouhkdyiyolamdjivho.cjpybuhwnjgkhllm.nylalobghyhirgh.com
@caot
caot / detect-zoom.js
Created March 10, 2023 19:07 — forked from abilogos/detect-zoom.js
Getting browser Zoom level
//for zoom detection
px_ratio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
$(window).resize(function(){isZooming();});
function isZooming(){
var newPx_ratio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
if(newPx_ratio != px_ratio){
px_ratio = newPx_ratio;
console.log("zooming");