Skip to content

Instantly share code, notes, and snippets.

// HOW TO GET HURTBUBBLES IN RAM!!
struct hurtbubble { // size: 0x4c
float x1; // offset: 0x28
float y1; // offset: 0x2c
float z1; // offset: 0x30
float x1; // offset: 0x34
float y1; // offset: 0x38
float z1; // offset: 0x3c
}
@rweichler
rweichler / README.md
Last active December 15, 2017 22:54
mpv eqe.fm scrobbler

EQE scrobbler for mpv

Here's how to install this:

  • Put the scrobble.py script somewhere on your computer.
  • Put the mpv_eqe.lua script in ~/.config/mpv/scripts/.
  • Edit the variable at the top of mpv_eqe.lua to point to scrobble.py.

Then, create an account at eqe.fm if you haven't already.

local objc = require 'objc'
local ffi = require 'ffi'
local count = 0
function objc.GenerateClass(super, ...)
super = super or 'NSObject'
count = count + 1
local name = 'EQEAPP_'..count..super
if ... then
@rweichler
rweichler / postinst
Last active October 28, 2017 17:46
setuid
#!/bin/sh
#set permissions of setuid binary
chown root:wheel /path/to/setuid
chmod 6755 /path/to/setuid
@rweichler
rweichler / keyboard_tweak.m
Last active September 27, 2017 23:53
AW YISS
#import <Foundation/Foundation.h>
#import <substrate.h>
#import <objc/objc.h>
#import <objc/runtime.h>
#define Log(format, ...) NSLog(@"mobilevim: %@", [NSString stringWithFormat: format, ## __VA_ARGS__])
// CONVENIENCE SHIT
static void * ivar(id self, const char *name)
objc = require 'objc'
local count = 0
local function genclass(super)
super = super or 'NSObject'
count = count + 1
local name = 'GENERATEDCLASS_'..count..super
objc.class(name, super)
--Objecive-C runtime and bridgesupport binding.
--Written by Cosmin Apreutesei. Public domain.
--Ideas and code from TLC by Fjölnir Ásgeirsson (c) 2012, MIT license.
--Tested with with LuaJIT 2.0.3, 32bit and 64bit on OSX 10.9 and 10.7.
local ffi = require'ffi'
local cast = ffi.cast
local OSX = ffi.os == 'OSX'
local x64 = ffi.abi'64bit'
jit.off()
local USE_C = true -- change this
PATH = '/var/root/test'
package.path = PATH..'/?.lua;'..
PATH..'/?/init.lua;'..
package.path
package.cpath = PATH..'/?.so;'..
package.cpath
#!/bin/bash
myAppPath=$(dirname "$0")
exec "$myAppPath"/dpkg.exe_ "$@"

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would