Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am boppreh on github.
  • I am boppreh (https://keybase.io/boppreh) on keybase.
  • I have a public key ASBSbxSUYkYsfpiSezT6HRL-HaEFI6Zla-g5rH8sYtEFWAo

To claim this, I am signing this object:

golden_ratio = 0x9E3779B9
max_int = 2**32 - 1
def rotate_left_5(value):
return ((value << 5) | (value >> 27)) & max_int
def add_to_hash(hash_value, value):
return (golden_ratio * (rotate_left_5(hash_value) ^ value)) & max_int
def hash_simple(url):
@boppreh
boppreh / radar.js
Created January 10, 2018 19:15
Script for airma.sh to help aim. Moves enemies' flags to around you, like a radar, and their position compensates for leading time/distance. May have to change "mult" to suit your plane/upgrades.
let me = Players.getMe();
let mult = 1000;
(function(updateNameplate) {
me.__proto__.updateNameplate = function() {
let ret = updateNameplate.apply(this, arguments);
this.sprites.flag.scale.set(0.2, 0.2);
if (this == me) {
this.sprites.flag.position.set(me.pos.x, me.pos.y);
return ret;
}
@boppreh
boppreh / recorder.py
Created May 2, 2016 03:02
Keyboard recorder for screencasts
import sys
import keyboard
import pickle
import os
if len(sys.argv) == 1:
filename = input('Input filename to save/load events: ')
else:
filename = sys.argv[1]
@boppreh
boppreh / keyboard.js
Created May 4, 2015 21:47
Allow keyboard control in agar.io
var oldOnKeyDown = window.onkeydown
var canvas = document.getElementById('canvas');
var oldMouseMove = canvas.onmousemove
canvas.onmousemove = null;
var pressedKeys = {}
window.onkeydown = function (f) {
pressedKeys[f.keyCode] = 1;
oldOnKeyDown(f);
updateKey();
@boppreh
boppreh / balloontip.py
Created November 2, 2012 11:35 — forked from wontoncc/balloontip.py
Balloon tip module, Python, using win32gui. Display a notification in the tray bar and quits after 10 seconds.
# -- coding: utf-8 --
from win32api import *
from win32gui import *
import win32con
import sys, os
import struct
import time
class WindowsBalloonTip: