Skip to content

Instantly share code, notes, and snippets.

View bhaak's full-sized avatar

Patric Mueller bhaak

View GitHub Profile
@bhaak
bhaak / find_last_modified.sh
Created May 1, 2022 11:15
list last modified files from directory with modification timestamps
#!/bin/bash
DIRECTORY=.
TAIL=20
CMD=''
while (( "$#" )); do
if [[ ${1:0:2} = '-v' ]]; then
set -x
elif [[ ${1:0:2} = '-o' ]]; then
diff --git src/do.c src/do.c
index 9abbf7e3d..8246d5090 100644
--- src/do.c
+++ src/do.c
@@ -1493,6 +1493,16 @@ boolean at_stairs, falling, portal;
return;
}
+ /* Prevent the player from entering Minetown unless
+ * somethingsomethingsomething. */
348 2009
339 2010
220 2011
259 2012
736 2013
78 2014
42 2015
25 2016
78 2017
59 2018
139 11:knox_portal
146 12:knox_portal
152 13:knox_portal
120 14:knox_portal
95 15:knox_portal
69 16:knox_portal
44 17:knox_portal
39 18:knox_portal
41 19:knox_portal
34 20:knox_portal
root = true
[*]
charset=utf-8
end_of_line=lf
insert_final_newline=false
indent_style=space
indent_size=4
trim_trailing_whitespace = true
max_line_length=78
PREFIX=$(wildcard ~)/eh/install
HACKDIR=$(PREFIX)/games/lib/$(GAME)dir
SHELLDIR = $(PREFIX)/games
INSTDIR=$(HACKDIR)
VARDIR = $(HACKDIR)
POSTINSTALL=cp -n sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
CC=gcc-9.3.0
CFLAGS=-ggdb -O2 -Wall -Wextra -I../include -DNOTPARMDECL
20 2
105 3
223 4
78 5
998 6
44 7
720 8
756 9
642 10
20 11
themerooms = {
{
░-- the "default" room
~ ░ frequency = 1,
░ contents = function()
░ ░des.room({ type = "ordinary", filled = 1 });
░ ░end
},
_
function()
@bhaak
bhaak / fortify_example.s
Created March 4, 2020 10:36
gcc -O -S fortify_example.c
.file "fortify_example.c"
.text
.globl main
.type main, @function
main:
.LFB34:
.cfi_startproc
pushq %rbx
.cfi_def_cfa_offset 16
.cfi_offset 3, -16
@bhaak
bhaak / fortify_example.s
Created March 4, 2020 10:33
clang -S fortify_example.c
Lcfi2:
.cfi_def_cfa_register %rbp
subq $48, %rsp
movl $8, %eax
movl %eax, %edx
leaq -16(%rbp), %rcx
movq ___stack_chk_guard@GOTPCREL(%rip), %r8
movq (%r8), %r8
movq %r8, -8(%rbp)
movl $0, -20(%rbp)