Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
from ipaddress import IPv4Address, IPv6Address
from random import randint
# Unicast MAC addresses can’t have an odd first octet. Also generate
# a whole bunch just to improve use in making a whole VM setup.
mac_mask = 0xFE_FF_FF_FF_FF_FF
print("MAC addresses:")
for i in range(0, 10):
mac = mac_mask & randint(0, 2 ** 48 - 1)
#urlbar[breakout-extend] {
top: calc(
(var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2
) !important;
left: calc(
(var(--urlbar-toolbar-width) - var(--urlbar-width)) / 2
) !important;
width: 100% !important;
}
[ExclusionList]
/lost+found
/*/.cache
/*/.local/share/Trash
@chungy
chungy / chocolate-doom-under-cygwin.adoc
Created February 3, 2017 20:19
Compiling Chocolate Doom under Cygwin

Intalling cygwin

Select the packages:

  • autoconf

  • automake

  • git

  • mingw64-i686-SDL2

  • mingw64-i686-SDL2_mixer

  • mingw64-i686-SDL2_net

[xboxdrv]
evdev = /dev/input/by-id/usb-Microsoft_Controller_7EED8FE138A3-event-joystick
mimic-xpad = true
evdev-grab = true
evdev-debug = false
silent = true
[evdev-absmap]
ABS_HAT0X = dpad_x
ABS_HAT0Y = dpad_y
@chungy
chungy / README.adoc
Last active July 31, 2023 19:18
minecraft systemd service

Use these files for managing a Minecraft server with systemd.

Place minecraft.service in /etc/systemd/system, and run systemctl daemon-reload. minecraft should go into /etc/conf.d or an equivalent directory (change the path in the service too). /etc/conf.d/minecraft should not have world permissions. chown root:root and chmod 600 the file.

The user and group minecraft should exist. The minecraft user should only be a member of the minecraft group, for system security.

@chungy
chungy / odamex.map
Created May 28, 2015 06:45
odamex authors
alexmax = Alex Mayfield <alex@outpostdesign.com> America/New_York
anarkavre = John Corrado <alex@outpostdesign.com> America/New_York
ghostlydeath = GhostlyDeath <ghostlydeath@remood.org> America/New_York
Russell = Russell Rice <russell@odamex.net> Pacific/Auckland
russellrice = Russell Rice <russell@odamex.net> Pacific/Auckland
som = Stephen McGranahan <somtwo@gmail.com> America/Chicago
deathz0r = Dean Joseph <deathz0r@odamex.net>
denis = Denis Lukianov <denis@voxelsoft.com>
dr_sean = Sean Leonard <sean@odamex.net>
hypereye = Mike Wood <mwoodj@huntsvegas.org>
#!/bin/sh -
if [ $# -eq 0 ]; then
git_commit_date="$(date -ud "@$(git show -q --format=%ct HEAD)" +%Y-%m-%dT%H:%M:%SZ)"
git_commit_email="$(git show -q --format=%ce HEAD)"
else
git_commit_date="$(date -ud "@$(git show -q --format=%ct "$1")" +%Y-%m-%dT%H:%M:%SZ)"
git_commit_email="$(git show -q --format=%ce "$1")"
fi
#include <windows.h>
#include <stdio.h>
int main(void)
{
static const char* (CDECL *pwine_get_version)(void);
HMODULE hntdll = GetModuleHandle("ntdll.dll");
if(!hntdll) {
puts("Running on Windows 9x.");
return 1;
#!/usr/bin/env bash
# Extracts thing from here: http://www.unforgettable.dk/
cat <<EOF
If you are not on a file system with features such as compression or
de-duplication, you will most likely run out of space! ... Unless you
happen to have 4.5PB to spare.
Will begin in 5 seconds. ^C now to abort.