Skip to content

Instantly share code, notes, and snippets.

@devnoname120
devnoname120 / My macOS setup.md
Last active January 23, 2025 13:25
My macOS setup

ℹ️ Enable iCloud end-to-end encryption:

  • Nobody knows that, but iCloud actually supports end-to-end encryption (see “Advanced Data Protection for iCloud”) but it's disabled by default. If you care about data privacy, you should turn it on.
    • System settingsApple IDiCloud → Set Advanced Data Protection to On.
    • System settingsApple IDiCloud → Disable Access iCloud Data on the Web.
  • It supports almost all the native Apple apps, with the notable exceptions of iCloud Mail, Contacts, and Calendars. See official data protection matrix for more info.

Quality of life improvements

Mouse:

@devnoname120
devnoname120 / macos_docker_xorg_forwarding.md
Last active January 21, 2025 18:12
Xorg/X11 forwarding on macOS and docker

Xorg/X11 forwarding on macOS and docker

In order to run Xorg apps on macOS you will need to install xquartz and configure it:

brew install --cask --no-quarantine xquartz
defaults write org.xquartz.X11 nolisten_tcp -bool false
defaults write org.xquartz.X11 no_auth -bool false

mkdir -p ~/.xinitrc.d
@devnoname120
devnoname120 / approve_all_pr_review_requests.md
Created January 16, 2025 14:27
Approve all pull requests where someone requested a review from me
  1. Go to https://github.com/issues?q=review-requested%3A%40me
  2. Open the dev console, run this, and copy the output:
const pulls = Array.from(document.querySelectorAll('a[id^=issue_]'))
const links = pulls.map(i => i.href.replace('//github.com/', '//api.github.com/repos/').replace('/pull/', '/pulls/') + '/reviews')
const curls = links.map(l => `curl -H "Authorization: Bearer $GITHUB_TOKEN" --data '{"event": "APPROVE"}' ${l}`)
console.log(curls.join("\n"))
  1. Run this in the terminal:
@devnoname120
devnoname120 / README.md
Created December 16, 2024 18:38
Fix Docker rclone plugin

This script aims to fix the following error:

$ docker compose up -d --build
Error response from daemon: get audiobookshelf_audiobooks: error while checking if volume "audiobookshelf_audiobooks" exists in driver "rclone:latest": error looking up volume plugin rclone:latest: plugin rclone:latest found but disabled
$ docker plugin enable rclone
Error response from daemon: dial unix /run/docker/plugins/7c5c781c3b705d4caf5418cc5ed462b8e1b81596df43129b0eac55ea2047ad2b/rclone.sock: connect: no such file or directory
@devnoname120
devnoname120 / RE prepare.py
Created June 9, 2016 11:50
uOFW: Extract function prototypes from the assembly and improve them and add documentation from header files
# Makeshift RE'ing base file creator. The code is really messy, don't expect it to be robust.
import re
asm = 'E:/Programmation/PSP/Reverse engineering/threadman - 660/threadman.s'
proto = ['E:/Programmation/PSP/Reverse engineering/threadman - 660/pspthreadman.h','E:/Programmation/PSP/Reverse engineering/threadman - 660/pspthreadman_kernel.h']
protos = {}
def protoBase():
global protos
#! /usr/bin/env python3
import json
"""
nidlist.txt:
0xF183726E _vshSblAimgrGetConsoleId
0xF1B7B34C sceBbmcTurnOn
0xF1C4D466 sceBtStopInquiry
...
@devnoname120
devnoname120 / db.log
Last active November 26, 2024 08:25 — forked from frangarcj/dbv2.json
Vitasdk dbv2.json validator
jsonschema -i dbv2.json db_schema.json > db.log 2>&1
0x8: '0x8' does not match '^0x[0-9A-F]{8}$'
0xCE: '0xCE' does not match '^0x[0-9A-F]{8}$'
0xCF: '0xCF' does not match '^0x[0-9A-F]{8}$'
0x0: '0x0' does not match '^0x[0-9A-F]{8}$'
0x71: '0x71' does not match '^0x[0-9A-F]{8}$'
0x3A: '0x3A' does not match '^0x[0-9A-F]{8}$'
0x38: '0x38' does not match '^0x[0-9A-F]{8}$'
0x3: '0x3' does not match '^0x[0-9A-F]{8}$'
0x5: '0x5' does not match '^0x[0-9A-F]{8}$'
@devnoname120
devnoname120 / main.c
Created July 12, 2017 17:47
Yifan oled brightness
#define DEVICE_BASE (0xE0000000)
#define IFTU0_BASE (DEVICE_BASE + 0x5020000)
uint *iftu0_base = NULL;
static inline void turnon_oled(int a2, int a3)
{
if (a2 == 128)
{
*(iftu0_base + 0x2000 + 32) = 0;
#include <stdio.h>
#include <arpa/inet.h>
int main()
{
struct sockaddr_in sa;
char str[INET_ADDRSTRLEN];
inet_pton(AF_INET, "192.168.0.1", &(sa.sin_addr));
printf("0x%x\n", sa.sin_addr.s_addr);
@devnoname120
devnoname120 / psv.h
Last active November 26, 2024 08:24 — forked from yifanlu/psv.h
/**
* Motivation: One unified .psv format for archiving (preserving) Vita games.
* The goal is to preserve as much of the original game structure while ensuring
* the all the information needed to decrypt and extract data can be derived
* from just the file and a hacked Vita.
*
* We want something akin to .nds or .3ds/.cia or .iso but for Vita games. The
* unique challenge is that Vita cart games require a per-cart key to decrypt
* and digital games require a similar key from activation. With just the raw
* game image, it is not possible to extract the game data.