Skip to content

Instantly share code, notes, and snippets.

View ConnorBP's full-sized avatar
🔥
My code is lit! It crashes and burns 😉

Connor "segfault" Postma ConnorBP

🔥
My code is lit! It crashes and burns 😉
View GitHub Profile
@ConnorBP
ConnorBP / math.h
Created September 28, 2024 02:11
My minimal modern c++ (20+latest) math class
#pragma once
struct Vector2 {
float x, y;
Vector2 operator-(Vector2 other) {
x -= other.x;
y -= other.y;
return *this;
}
@ConnorBP
ConnorBP / anti_dbg.rs
Created September 18, 2024 13:27
bevy free trial demo
// A bevy 0.14 plugin which sets a date of death for an alpha release of your game.
// helps fight against old alpha builds from being used when product goes comercial.
// Somewhat of a "free trial" system, or a "birthday bomb" causing the program to fail.
// Especially effective in networked scenarios where system time cannot be changed as easily.
//
// Plugin Usage:
// App::new()
// .insert_resource(ClearColor(Color::NONE))
// .add_plugins((
// DefaultPlugins,
@ConnorBP
ConnorBP / fastfail.rs
Created September 18, 2024 13:17
fastfail.rs
// fast fail helper function
// kills the process fast (useful for anti-debug)
pub fn fastfail() {
#[cfg(target_os="windows")]
{
unsafe{asm!("int 29h");}
}
#[cfg(not(target_os="windows"))]
{
// exits "immediately" on linux
@ConnorBP
ConnorBP / keybase.md
Created December 11, 2016 11:51
Proving keybase identity

Keybase proof

I hereby claim:

  • I am ConnorBP on github.
  • I am pyrofox (https://keybase.io/pyrofox) on keybase.
  • I have a public key whose fingerprint is 1BC2 D247 146A CF44 E67A 873F E0A8 E16E D78E 3EA3

To claim this, I am signing this object: