Skip to content

Instantly share code, notes, and snippets.

View Klairm's full-sized avatar

Ivan Garcia Klairm

View GitHub Profile
@sleirsgoevy
sleirsgoevy / ps4.html
Created October 27, 2021 16:06
PS4 WebKit exploit on 9.00
<script>
var PAGE_SIZE = 16384;
var SIZEOF_CSS_FONT_FACE = 0xb8;
var HASHMAP_BUCKET = 208;
var STRING_OFFSET = 20;
var SPRAY_FONTS = 0x1000;
var GUESS_FONT = 0x200430000;
var NPAGES = 20;
var INVALID_POINTER = 0;
var HAMMER_FONT_NAME = "font8"; //must take bucket 3 of 8 (counting from zero)
@jath03
jath03 / hue-game-sync.py
Created September 21, 2020 17:25
Sync the background color from the game Hue to OpenRGB with python and opencv
from PIL import ImageGrab
import numpy as np
from Xlib import display
import cv2
from openrgb import OpenRGBClient
from openrgb.utils import RGBColor
d = display.Display()
s = d.screen()
x, y = s.width_in_pixels, s.height_in_pixels
@pxdl
pxdl / listconvertertsvrap.py
Created December 12, 2019 01:18
Converts the NoPayStation TSV for PS3 Games to pkgi-ps3 format (needs "raps" folder with corresponding rap files)
import csv
import urllib.request
import binascii
from pathlib import Path
def downloadTSV():
print('Downloading PS3_GAMES.tsv...')
url = "http://nopaystation.com/tsv/PS3_GAMES.tsv"
urllib.request.urlretrieve(url, 'PS3_GAMES.tsv')
return 1
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active July 29, 2024 15:27
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@Unh0lyTigg
Unh0lyTigg / Container.java
Created May 21, 2014 09:26
Container.transferStackInSlot(EntityPlayer, int)
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) {
ItemStack itemstack = null;
Slot slot = (Slot)this.inventorySlots.get(par2);
if (slot != null && slot.getHasStack()) {
ItemStack itemstack1 = slot.getStack();
itemstack = itemstack1.copy();
if (par2 < this.tile.getSizeInventory())
if (!this.mergeItemStack(itemstack1, this.tile.getSizeInventory(), this.inventorySlots.size(), true))
return null;
else if (!this.mergeItemStack(itemstack1, 0, this.tile.getSizeInventory(), false))
@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@fogus
fogus / 0 - UNIX Fifth Edition
Created July 20, 2011 00:15
UNIX V5, OpenBSD, Plan 9, FreeBSD, and GNU coreutils implementations of echo.c
main(argc, argv)
int argc;
char *argv[];
{
int i;
argc--;
for(i=1; i<=argc; i++)
printf("%s%c", argv[i], i==argc? '\n': ' ');
}