Skip to content

Instantly share code, notes, and snippets.

package ziptable;
/**
*
* @author Dale Diaz
*/
import java.util.Scanner;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.BufferedReader;
@tec27
tec27 / func_hook.hxx
Last active December 15, 2015 21:29
My new iteration on a Windows-based function hooking class, this time templated!
#ifndef SHARED_FUNC_HOOK_H_
#define SHARED_FUNC_HOOK_H_
#include <array>
#include <Windows.h>
#include "./types.h"
namespace sbat {
// Type for simpler VirtualProtect -> restore old protection usage.
class ScopedVirtualProtect {

Keybase proof

I hereby claim:

  • I am tec27 on github.
  • I am tec27 (https://keybase.io/tec27) on keybase.
  • I have a public key whose fingerprint is 253F E055 760E F791 ECEF 4358 5A96 5F28 C979 B983

To claim this, I am signing this object:

@tec27
tec27 / deferred.js
Created July 9, 2016 02:15
An extension of ES6 Promises that allows for easier deferred resolution/rejection
class Deferred extends Promise {
constructor(executor) {
super(executor)
// These will be overwritten by the creator function
this._resolve = null
this._reject = null
}
resolve(value) {
@tec27
tec27 / code.js
Created November 23, 2018 21:46
Transparent Streamlabs Tip Jar
// Enable Custom HTML/CSS here: https://streamlabs.com/dashboard#/jar
// Then copy-paste this into the JS tab (you probably want to replace all the existing content there)
// Adjust these to change the cup size
var CUP_WIDTH = 160;
var CUP_HEIGHT = 160;
// Transparent cup
jarEl.src = `data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D`;