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:
// 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`; |
class Deferred extends Promise { | |
constructor(executor) { | |
super(executor) | |
// These will be overwritten by the creator function | |
this._resolve = null | |
this._reject = null | |
} | |
resolve(value) { |
I hereby claim:
To claim this, I am signing this object:
#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 { |
package ziptable; | |
/** | |
* | |
* @author Dale Diaz | |
*/ | |
import java.util.Scanner; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.BufferedReader; |
#include "net_manager.h" | |
#include <Windows.h> | |
#include <assert.h> | |
#include "snp_packets.h" | |
namespace sbat { | |
namespace snp { | |
// TODO(tec27): We need a better way of logging errors from this |
// Replaces a single instance of magic_bytes in the function_bytes | |
// Works most efficiently if magic_bytes contains no repeated values, but works fine either way | |
// replacement_bytes is assumed to be the same length as magic_bytes here | |
bool ReplaceMagicBytes(byte* function_bytes, const size_t function_length, const byte* magic_bytes, | |
const size_t magic_bytes_length, const byte* replacement_bytes) { | |
// first we construct a table that says how much to jump ahead/back by for any given byte value | |
int jump_by[256]; | |
// for most values (assuming magic_bytes contains few characters), we can skip | |
// MB_length bytes | |
for(int i = 0; i < 256; i++) { |
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> | |
#include <stdlib.h> | |
#include <string> | |
#include <fstream> | |
#include "../Shared/FuncHook.h" | |
using namespace std; | |
HINSTANCE selfInstance; |
JSON.stringify( | |
Array.prototype.slice.call($('.halfbox > li > a > img').map(function(i, img) { | |
var $img = $(img), | |
$link = $img.parent(), | |
host = document.location.protocol + '//' + document.location.host, | |
imgParts = $img.attr('src').split('/'), | |
imgName = imgParts[imgParts.length-1]; | |
return { | |
name: $link.attr('title'), | |
thumb: host + $img.attr('src').replace('/dota2/images/', '/dota2/images/thumb/') + '/68px-' + imgName, |
import java.util.BitSet; | |
public class Euler10 { | |
private static BitSet runSieve(int limit) { | |
BitSet bits = new BitSet(limit+1); | |
int sievingLimit = (int)Math.ceil(Math.sqrt(limit)); | |
for(int n = 2; n <= limit; n = bits.nextClearBit(n+1)) { | |
if(n > sievingLimit) break; // any composites will be past the limit | |
for(int m = n*n; m > n && m <= limit; m += n) { | |
bits.set(m, true); |