Skip to content

Instantly share code, notes, and snippets.

@antoneliasson
antoneliasson / keybase.md
Last active August 29, 2015 14:06
keybase.md

Keybase proof

I hereby claim:

  • I am antoneliasson on github.
  • I am antoneliasson (https://keybase.io/antoneliasson) on keybase.
  • I have a public key whose fingerprint is D32E 839A 9606 34A9 C8CA FC69 C69F CA8A B33E E3CB

To claim this, I am signing this object:

@antoneliasson
antoneliasson / kf2server.service.ini
Last active June 15, 2017 07:42
Killing Floor 2 Dedicated Server systemd service unit
[Unit]
Description=Killing Floor 2 Dedicated Server
[Service]
ExecStart=/usr/bin/unbuffer /usr/bin/wine "C:/steamcmd/kf2server/Binaries/Win64/KFServer.exe" kf-burningparis
# The user account that will run the server
User=kf2server
Group=kf2server
[5.0.7]anton@balder:~> od -t x1 shell_code
0000000 31 c0 83 ec 01 88 04 24 68 2f 7a 73 68 68 2f 62
0000020 69 6e 68 2f 75 73 72 89 e6 50 56 b0 0b 89 f3 89
0000040 e1 31 d2 cd 80 b0 01 31 db cd 80
0000053
[5.0.7]anton@balder:~> objdump -D -Mintel,i386 -b binary -m i386 shell_code
shell_code: file format binary
@antoneliasson
antoneliasson / minimal-domain-definition.xml
Created June 7, 2016 17:21
Minimal LXC domain definition
<domain type='lxc'>
<name>debian</name>
<memory unit="GiB">8</memory>
<os>
<type>exe</type>
<init>/sbin/init</init>
</os>
<vcpu>4</vcpu>
<devices>
<emulator>/usr/lib/libvirt/libvirt_lxc</emulator>
@antoneliasson
antoneliasson / lxc-console.sh
Created June 7, 2016 17:23
LXC console commands to set up guest TTYs for libvirt
#!/bin/bash
# Start the container with lxc-start and run this in the console to prepare the
# OS for libvirt.
set -e
# Disable getty on TTYs
systemctl mask getty-static
rm /etc/systemd/system/getty.target.wants/*
@antoneliasson
antoneliasson / kf2server-system.sh
Created June 7, 2016 17:32
Commands to run as root to set up my KF2 server
#!/bin/bash
# Start the container with libvirt and run this in the console to configure the
# system.
set -e
# jessie/contrib for winetricks
cat > /etc/apt/sources.list <<EOF
deb http://ftp.se.debian.org/debian/ jessie main contrib
EOF
@antoneliasson
antoneliasson / kf2server-user.sh
Created June 7, 2016 17:35
Commands to run as the unprivileged user to set up my KF2 server
#!/bin/bash
# Run this as the unprivilegied user in the container. Press "next, next,
# finish" and "OK" in the windows as applicable.
set -e
# Download and unpack SteamCMD
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip
unzip steamcmd.zip
mkdir .wine/drive_c/steamcmd
{
"key": {
"type": "array",
"value": [
{
"type": "array",
"value": [
{
"type": "array",
"value": [