Skip to content

Instantly share code, notes, and snippets.

View wtfbbqhax's full-sized avatar
🦧

Victor Roemer wtfbbqhax

🦧
View GitHub Profile
@wtfbbqhax
wtfbbqhax / JSON_transform.sh
Created November 5, 2016 15:24
Makefile -> JSON -> CMake-ish
#!/usr/bin/env bash
set -x
#Generate compile_commands.json
#gmake clean
#gmake -j
#gmake compile_commands.json
# Extract renderer_common source files
targets="tremulous
@wtfbbqhax
wtfbbqhax / Makefile
Created November 5, 2016 15:31
TOomuchMakefile
# This evaluates like this (but not really)
#
# SOURCES =
# ^
# / \
# | for f in Q3OBJ
# | .---^
# | `--- srcfiles -----.
# | .-----------------'
# | `---=> t2 => ---.
@wtfbbqhax
wtfbbqhax / files.c.diff
Created November 17, 2016 07:03
Search gamedir last, "base" first.
diff --git a/Makefile b/Makefile
index fb5e233..a333a50 100644
--- a/Makefile
+++ b/Makefile
@@ -2588,7 +2588,7 @@ UIVMOBJ = $(UIOBJ_:%.o=%.asm)
$(B)/$(BASEGAME)/ui$(SHLIBNAME): $(UIOBJ)
$(echo_cmd) "LD $@"
- $(Q)$(CC) $(SHLIBLDFLAGS) $(LDFLAGS) -o $@ $(UIOBJ)
+ $(Q)$(CC) -I${ASSETS_DIR}/ui $(SHLIBLDFLAGS) $(LDFLAGS) -o $@ $(UIOBJ)
@wtfbbqhax
wtfbbqhax / README.md
Created November 1, 2017 15:37
Rename a whole lot'a shit at once

Recursively s/SFXHASH/XHash/g in all .cc, .h and .c source files

rpl -R -x.cc -x.h -x.c SFXHASH XHash .

pcapfifo
https://github.com/wtfbbqhax/pcapfifo
backtrace
https://github.com/wtfbbqhax/backtrace
libunified2
https://github.com/wtfbbqhax/libunified2
u2json
@wtfbbqhax
wtfbbqhax / test.lua
Created December 27, 2017 18:06
Tremulous: Lua control of game entities
-- This script moves the Reactor into the positon of an Acid tube.
reactor = game.gentity_t.find(nil, 'team_human_reactor')
ent = game.gentity_t.find(nil, 'team_alien_acid_tube')
ent.health = 0
ent.die(ent, ent, ent, 100, 0)
reactor.origin = ent.origin
@wtfbbqhax
wtfbbqhax / set_rotation.lua
Last active December 28, 2017 18:30
Tremulous: set a rotation on the reactor via lua
reactor = game.gentity_t.find(nil, 'team_human_reactor')
reactor:set_rotation(0, 360, 0)
@wtfbbqhax
wtfbbqhax / PowerShell Notes.md
Last active June 14, 2018 21:22
PowerShell learning

Providers

Show all providers

Get-PSProvider

Working with the alias provider

@wtfbbqhax
wtfbbqhax / vim_luajit.patch
Created April 9, 2022 04:02 — forked from shirosaki/vim_luajit.patch
Add --with-luajit to link vim with luajit
diff --git a/src/Makefile b/src/Makefile
--- a/src/Makefile
+++ b/src/Makefile
@@ -376,18 +376,22 @@ CClink = $(CC)
# Uncomment the next line to fail if one of the requested language interfaces
# cannot be configured. Without this Vim will be build anyway, without
# the failing interfaces.
#CONF_OPT_FAIL = --enable-fail-if-missing
# LUA
@wtfbbqhax
wtfbbqhax / Dockerfile
Created April 24, 2022 19:52
AbcIP built for Webassembly runtime
FROM emscripten/emsdk:3.1.7 as emsdk
ENV LIBPCAP="libpcap-1.10.1"
RUN apt-get update
RUN apt-get install -y flex bison
RUN wget https://www.tcpdump.org/release/.tar.gz
COPY .sha .
#RUN sha256sum -c .sha