Skip to content

Instantly share code, notes, and snippets.

View BomberFish's full-sized avatar
☹️
school

Hariz BomberFish

☹️
school
View GitHub Profile
@BomberFish
BomberFish / nextcloud-ctp.css
Created April 4, 2024 01:40
Catppuccin (Mocha Mauve) for Nextcloud Dashboard - Experimental!
:root {
--color-main-background: #11111b !important;
--color-main-background-rgb: 17, 17, 27 !important;
/* --color-main-background-translucent: rgba(
var(--color-main-background-rgb),
0.96
)!important;
--color-main-background-blur: rgba(var(--color-main-background-rgb), 0.8)!important;
--gradient-main-background: var(--color-main-background) 0%,
var(--color-main-background-translucent) 85%, transparent 100%!important; */
@BomberFish
BomberFish / BatteryInfo.swift
Last active March 13, 2024 14:53
Programmatically get advanced battery information on Apple devices
/// Rewrite of https://gist.github.com/leminlimez/ed3e3ee3a287c503c5b834acdc0dfcdc in Swift (the superior language)
/// NOTE: To use IOKit, you need to create a bridging header with the following contents: `#include <IOKit/IOKitLib.h>`
/// This requires you to have the (private) `systemgroup.com.apple.powerlog` entitlement.
func getBatteryInfo() throws -> [String:Any] {
var service: io_service_t? // Battery IOService
service = IOServiceGetMatchingService(kIOMainPortDefault, IOServiceMatching("AppleSmartBattery")) // iPhone 11+
if service == nil {
service = IOServiceGetMatchingService(kIOMainPortDefault, IOServiceMatching("IOPMPowerSource")) // Earlier iPhones
}
@BomberFish
BomberFish / find_xpc.sh
Created March 1, 2024 13:52
Find XPC Services vulnerable to CVE-2023-42942
#!/bin/bash
isMachO() {
if [[ $(file "$1") == *Mach-O* ]]; then
return 0
else
return 1
fi
}
@BomberFish
BomberFish / switch.css
Created August 26, 2023 19:01
nintendo switch ui in css (sorta)
/* bomberfish */
/* Basic Styling */
@import url('https://fonts.googleapis.com/css2?family=PT+Mono&display=swap');
html,
html.light {
--bg: #ebebeb;
--bg2: #fdfdfd;
--fg: #2e2e2e;
--mg: #c9c9c9;
--[[
PERLIN NOISE TERRAIN GENERATION
This script generates terrain using Roblox's built-in math.noise() function.
It creates small parts, which will act as terrain.
TO DO:
-Render around the player instead of rendering everything!
-Infinite worlds
@BomberFish
BomberFish / qrcodegen-file.py
Created December 27, 2021 23:46
The QR code generator I made some time ago, except it accepts files.
#importing pip like this will fail in the future, should be replaced.
for n in range(1):
try:
import pip
except ImportError as missing:
print("You don't have pip. Exiting...")
exit()
#install package function
def install(package):
@BomberFish
BomberFish / minecraftskindownloader.sh
Last active November 14, 2021 00:45
Really simple skin downloader that uses minecraftskinstealer.com
#!/bin/bash
name=$0
if [ -z "$1" ]
then
echo "Usage:"
echo $name "[username]"
else
wget https://minecraftskinstealer.com/api/v1/skin/download/skin/$1 -O $1.png
fi
#importing pip like this will fail in the future, should be replaced.
for n in range(1):
try:
import pip
except ImportError as missing:
print("You don't have pip. Exiting...")
exit()
#install package function
def install(package):