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"
  • Boot into clover off of the USB
  • Start up the Clover EFI shell
  • Pull the USB (saves confusion in the next step)
  • Type "map" (no quotes)
  • Look at the drives and apply some thinking about which one is the drive where your Clover EFI drive is - the drive# from disk util will help if you have several drives/partitions showing up. Once you've got it, note the drive - e.g. mine was "FS2"
  • Type "bcfg boot dump" (no quotes)
  • You'll see each boot entry proceeded with a number. For the love of Pete, don't use any of those - determine the next number up. My highest was 03, so I used 04 in the next step.
  • Type the following to create the boot entry:
  • bcfg boot add 04 FS2:\EFI\CLOVER\CLOVERX64.EFI CloverUEFI
  • In the above step, the path is helped out by having checked my mounted EFI drive on my system. The last part, "CloverUEFI" above is how the boot entry will appear in BIOS - name this as you will.

You'll need to get an access token first. The easiest way to do this is:

  1. Open Chrome
  2. Open devtools
  3. Go to the network inspector, and in the filter type "get_access_token"
  4. Navigate to https://open.spotify.com in that tab
  5. Click on the network request that shows up, then copy the entirety of the cookie header in the Request headers.

These access tokens expire, but the cookies appear to expire less frequently or not at all, so we will hold onto the cookies.

Whenever you need to get an access token, make a request to https://open.spotify.com/get_access_token?reason=transport&amp;productType=web_player with the cookie header we extracted previously.

@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,
"aliases": [],
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)
}
})