Skip to content

Instantly share code, notes, and snippets.

@Neui
Neui / fridayThe13th.lua
Created March 13, 2015 12:50
Calculate Friday the 13th on a per year basis (lua, maybe inaccurate)
-- Made by Neui
--[[ MIGHT BE INACCURATE
Calculates all friday the 13rd on a per year basis.
==========================================================
It does not depend on the lua date functions while
determing if there is a friday the 13rd in this month.
It is counting the days since year '0'. It seems to line
up with the dates since 1970.
==========================================================
Ueses the following externial functions:
@Neui
Neui / democont.cfg
Last active August 3, 2017 11:36
[CS:GO] Demo Control via numpad
// Made by Neui
// === DEMO CONTROL ===
// This script should help you controlling a demo
// using the keyboard (numpad).
// = BINDINGS =
// bind <key> "alias"
// KEYPAD: KP_HOME 7 (Home) +------+------+------+------+
// KP_UPARROW 8 (Up Arrow) | NUM |KP_ |KP_MUL|KP_ |
// KP_PGUP 9 (Page Up) | LOCK | SLASH|TIPLY | MINUS|
@Neui
Neui / playaround.cfg
Created October 4, 2015 12:30
[CS:GO] "Playaround" script for testing things. Also a WIP ingame help system
// Made by Neui
// playaround is a script that set settings
// for playin' around and testing
echo Loading Settings for playin' around
// Needed for settings
sv_cheats 1
// Set Roundtime to the max, 60 minutes
mp_roundtime 60
@Neui
Neui / .bash_cmd
Last active November 9, 2015 20:14
Bash: Windows-like command promt (PS1)
# Made by Neui
export PS1="\$(pwd | sed -e 's,/cygdrive/\([a-zA-Z0-9]\)\(/\)\?,\\\u\1:\\\\\\,' -e 's,^/\(home/\)\?root,C:\\\\\\Users\\\\\\\Administrator,' -e 's,^/home,C:\\\\\\Users,' -e 's,^/boot,C:\\\\\\\Windows,' -e 's,^/\(mnt/\|media/\)\?cdrom,D:\\\\\\,' -e 's,^/,C:\\\\\\,' -e 's,/,\\\\\,g')> "
# /cygdrive/x -> x:\
# / -> C:\
# /boot -> C:\Windows
# /home -> C:\Users (Vista+-like naming)
# /root /home/root -> C:\Users\Administrator
# /mnt/cdrom /media/cdrom /cdrom -> D:\
# All / -> \
@Neui
Neui / climagic-lights-counter.c
Created November 8, 2015 13:37
A counter for use with http://lights.climagic.com/ - Run with ./a.out > /dev/udp/lights.climagic.com/45444
#include <stdio.h> /* For printf, fflush and setbuf */
#include <unistd.h> /* For sleep'ing */
int main() {
int prev = 0, curr, changed, temp;
setbuf(stdout, NULL); // Unbuffered
for (curr = 0; curr <= 511; curr++) {
changed = curr ^ prev;
prev = curr;
@Neui
Neui / unused_variadic.c
Created October 31, 2019 17:23
Like the common `UNUSED(x)` C macro, but can "slience" multiple variables/parameters at once
#include <stdio.h>
/* Stolen from https://stackoverflow.com/a/2308651 */
#define PP_NARG(...) \
PP_NARG_(__VA_ARGS__,PP_RSEQ_N())
#define PP_NARG_(...) \
PP_ARG_N(__VA_ARGS__)
#define PP_ARG_N( \
_1, _2, _3, _4, _5, _6, _7, _8, _9,_10, \

Keybase proof

I hereby claim:

  • I am Neui on github.
  • I am neui (https://keybase.io/neui) on keybase.
  • I have a public key whose fingerprint is 679F 0FAE 003D 0C50 82AE 6C7A 6B25 ABEC 43BC 2A5D

To claim this, I am signing this object:

@Neui
Neui / RawMemoryAccess.cpp
Last active November 19, 2019 23:25
Convenient direct memory access, no dealing with endianess or sizes. Seems to compile OK: https://www.godbolt.org/z/acxV6_
#include<cstring>
#include<memory>
#include<cstdio>
#include<cstdlib>
#include<limits>
#include<cassert>
template<class T, bool be = false> struct RawMemoryAccess {
struct Proxy {
uint8_t *memory;
@Neui
Neui / Creating random YAMLs.md
Last active November 2, 2025 13:56
Archiplago tutorials

Creating random YAMLs

Not sure what game to play? Let Archipelago choose one at random for you.

  1. Have 2 YAMLs of different games. For this example, I choose Super Mario World and Yacht Dice.
  2. Create a new file that starts like this:
name: Peter{NUMBER}
description: Random games I like but cant decide