Skip to content

Instantly share code, notes, and snippets.

View EricRabil's full-sized avatar
🤕
abusing the swift runtime

Eric Rabil EricRabil

🤕
abusing the swift runtime
View GitHub Profile
@EricRabil
EricRabil / spdk
Last active April 17, 2017 01:10
Spotify Development Kit Helper - Simplifies de/recompilation of Spotify components
#!/bin/bash
# spdk - A script to pack/unpack spotify mini-apps
# Constants
UNPACK_ARG="unpack"
UNPACKALL_ARG="unpackall"
PACK_ARG="pack"
LIST_ARG="list"
BAD_ARGS="Usage: spdk [unpack|unpackall|pack] [application name]"
@EricRabil
EricRabil / icloudsdk.js
Created September 4, 2017 21:56
iCloud SDK
window.sdk = {
version: "0.0.1 Alpha",
drawIcon(name, icons = {notifications: "", appIcon: "", appIcon2x: ""}) {
var app = {
name,
notificationIcon: icons.notifications,
appIconUrl: icons.appIcon,
appIconUrl2x: icons.appIcon2x
}
COS.appsController._appsInfo[app.name] = COS.AppInfo.create(app);
@EricRabil
EricRabil / markord.js
Last active September 14, 2017 17:57
A Markov SelfBot for Discord.
const discord = require('discord.js');
const fs = require('fs');
const path = require('path');
const client = new discord.Client();
global.triggerWord = 'Beep boop, boop boop beep???'
const readline = require(`readline`)
if (!process.argv[2]) {
console.log(`Usage: node client.js <token>`)
process.exit(-69)
}
@EricRabil
EricRabil / discord.js
Created July 29, 2018 00:11
Discord scripts to make it more appealing for a marketing screenshot
Array.from(document.getElementsByClassName("guilds")[0].children).slice(5).forEach(n => n.remove());
document.getElementsByClassName("unread-mentions-indicator-bottom")[0].remove();
document.getElementsByClassName("friends-online")[0].innerText = "0 Online";
document.getElementsByClassName("friends-online")[0].previousSibling.children[1].remove();
Array.from(document.getElementsByClassName("iconBadge-2dji3k")).forEach(e => e.remove());
Array.from(document.getElementsByClassName("default-1VPH9n")).forEach(e => e.remove());
@EricRabil
EricRabil / Eric's Playbook.md
Created May 22, 2019 16:55
Instructions for anything I do that takes me more than 90 seconds

Free Adobe CC

2019 Windows

  1. Download AdobeCC.disc1.iso from smb://nas.etc.vpn/Cookbook/AdobeCC/AdobeCC.disc1.iso
  2. Mount & run the exe, enjoy
@EricRabil
EricRabil / simject-installer.sh
Last active June 5, 2019 04:49
my installer script for simject. ymmv
export THEOS=${THEOS:-~/theos}
export SIMJECT=${SIMJECT:-~/simject}
install_theos_deps() {
LDID_VERSION=$(brew ls --versions ldid)
XZ_VERSION=$(brew ls --versions xz)
if [ -z "$LDID_VERSION" ]
then
echo "has ldid: no";
BREW_ARGS=" ldid"
@EricRabil
EricRabil / gameslist.json
Created April 20, 2020 22:34 — forked from DeadSix27/gameslist.json
Discord Verified Games List
This file has been truncated, but you can view the full file.
[
{
"id": "259392830932254721",
"name": "SpeedRunners",
"icon": "cb48279ea90e86fb4f71c709d3236395",
"splash": "94e91cac9509fee1eb80a69b9503878a",
"overlay": false,
"overlayWarn": false,
"overlayCompatibilityHook": false,
Object.assign(typeof window === 'object' ? window : typeof global === 'object' ? global : typeof globalThis === 'object' ? globalThis : {}, {
hasKeys: function<Keys extends string[], Obj extends object>(obj: Obj, keys: Keys): obj is Obj & {
[key in ValueOf<Keys>]: unknown
} {
return keys.every(key => key in obj)
}
})
@EricRabil
EricRabil / thing.md
Created July 21, 2021 19:03
compilation of official apple bindings to private frameworks ❤️
@EricRabil
EricRabil / withUnsafeMutablePointerConstructing.swift
Created July 21, 2021 19:25
withUnsafeMutablePointer for safe allocation interoperability
/**
Helper function for efficiently initializing a value based on a pointer
- Parameter type: the type of value the pointers value will be cast to
- Parameter closure: block of code that will handle the pointer
- Returns: tuple of (value the pointer was given, return type of closure)
*/
func withUnsafeMutablePointer<T, R>(ofType type: T.Type, _ closure: (UnsafeMutablePointer<T>) -> R) -> (T?, R) {
let ptr = UnsafeMutablePointer<T>.allocate(capacity: 1)