Skip to content

Instantly share code, notes, and snippets.

View Zer0xFF's full-sized avatar

Zer0xFF

View GitHub Profile
set(triple "x86_64-scei-ps4")
set(CMAKE_SYSTEM_NAME "FreeBSD")
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_C_COMPILER_AR "ar")
set(CMAKE_LINKER "clang")
set(CMAKE_ASM_COMPILER "clang")
set(CMAKE_FIND_ROOT_PATH "$ENV{PS4SDK}/usr" CACHE STRING "")
@Zer0xFF
Zer0xFF / README
Last active October 13, 2023 13:58
you'd need to download you're entitlements 1st
so login to PSN web store
then open this link https://store.playstation.com/kamaji/api/chihiro/00_09_000/gateway/store/v1/users/me/internal_entitlements?start=0&size=800&fields=game_meta,drm_def
save as JSON, i called them EU.json and USA.json as per region, then run through the script, not if you only have 1 account or of different region, adjust the script accordingly
#!/usr/bin/python
import binascii
import hashlib
import hmac
import sys
def GetHash(GameID):
byte_key = binascii.unhexlify('AD62E37F905E06BC19593142281C112CEC0E7EC3E97EFDCAEFCDBAAFA6378D84')
hash = hmac.new(byte_key, 'np_%s' % GameID, digestmod=hashlib.sha256)
@Zer0xFF
Zer0xFF / calc.py
Created April 16, 2022 06:13
moodle avg grade calculator
import csv
with open("feedback.csv") as f:
dict_reader = csv.DictReader(f)
total = 0
grade_total = 0
ytotal = {}
ygrade_total = {}
for data in dict_reader:
@Zer0xFF
Zer0xFF / PS2RedumpV.py
Created February 17, 2020 14:07
Verify Collection Of PS2 Dumps Against Redump
#!/usr/bin/env python3
# pip3 install --user filehash untangle
import os
import untangle
from filehash import FileHash
obj = untangle.parse('redump.ps2.dat')

tmp workaround

cd deps/Dependencies
git submodule add https://github.com/flathub/shared-modules.git
sudo apt update
sudo apt install flatpak flatpak-builder
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
@Zer0xFF
Zer0xFF / diskstatus.ps1
Last active July 1, 2021 14:46
Disk Status Health Report (can be used with dynamic disks)
function Report-Disk
{
param (
$name,
$disks
)
$body = ($disks | Out-String)
$body = "$($name) $($body)"
Send-MailMessage -From 'ME <ME@ME.ie>' -To 'ME <ME@ME.ie>' -Subject 'Potential Disk Failure' -SmtpServer "smtp.gmail.com" -Body $body -Port 587
}
@Zer0xFF
Zer0xFF / 0.osx.setup.sh
Last active March 28, 2021 02:36
My Essential Fresh OSX/Windows setup
xcode-select --install
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install b7zip cmake qt5 clang-format zsh mas watch git git-gui graphicsmagick ghostscript npm wget trash composer romkatv/powerlevel10k/powerlevel10k
brew install --cask vscodium vlc qt-creator keka db-browser-for-sqlite
brew install --cask adobe-acrobat-reader teamviewer
pip3 install requests
# pip3 install pandas pyodbc striprtf pathvalidate mysql-connector-python
asm(
"mov %0, %%rsi\n\t"
"mov %1, %%rdi\n\t"
"call _trumpoline\n\t"
:
:
"r" (m_code), "g"(context)
: "rsi", "rdi"
);
@Zer0xFF
Zer0xFF / rpcs3-updater.py
Last active July 7, 2020 21:55
RPCS3 update script linux/windows
import requests
import platform
api_url = ''
file_name = ''
if(platform.system() == 'Windows'):
from pyunpack import Archive
# pip install pyunpack
# pip install patool
api_url = 'https://api.github.com/repos/RPCS3/rpcs3-binaries-win/releases/latest'