Skip to content

Instantly share code, notes, and snippets.

View lekro's full-sized avatar

Lekro lekro

View GitHub Profile
@lekro
lekro / tiny_bang_story.md
Created September 26, 2018 04:59
Running "The Tiny Bang Story" on Gentoo Linux

Writing this in case I or anyone else wants to play this game later. I got this game recently for free on Steam, and it wouldn't run without help.

I am on a x86_64 system and had already installed steam.

Quick steps:

  • Installed media-libs/sdl2-mixer-2.0.8-r2, which was the latest at the time of writing, with abi_x86_32 flag in /etc/portage/package.use/
  • The game didn't want to take my version of glew, so I grabbed the source for version 1.6.0 from sourceforge.

(6) The Login Challenge

+ edits from LCP's translation

Panel 1:

  • Ah, so you tried Gentoo as your first Linux distro!
  • Uh... W-well, the truth is, I pushed a button and it stopped working...

Panel 2:

@lekro
lekro / _terrariactl.sh
Last active May 28, 2018 05:27
Hacked together a set of scripts to run terraria servers using tmux. I don't recommend this. But it's cool since multiple people can use a console at once.
#!/bin/bash
# Place to put the server socket. Note that this should be owned by root
# but owned by, let's say, a group "terraria"
TMUX_ROOT=/var/tmux
# Root of terraria servers
TERRARIA_ROOT=/var/games/terraria
# Name of tmux socket to make
@lekro
lekro / reminder.sh
Created April 15, 2018 02:39
Send discord webhook using curl
#!/bin/sh
WEBHOOK_URL="put your url here"
PING="<@put your user id here>"
MESSAGE="$PING reminder"
JSON="{\"content\": \"$MESSAGE\"}"
curl -d "$JSON" -H "Content-Type: application/json" "$WEBHOOK_URL"
@lekro
lekro / bracket-11-11.tex
Created November 11, 2017 08:55
Had a little too much fun visualizing people's numbers in the MW bracket, 11/11.
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[>= stealth']
\begin{scope}[gray,->]
\draw (0,0) -- (4.3,0) node[xshift=4ex] {\(\Re\{z\}\)};
\draw (0,0) -- (0,4.3) node[yshift=2ex] {\(\Im\{z\}\)};
Replace roman numerals with arabic (hardcoded) - $replace($replace($replace($replace($replace($replace($replace($replace($if2(%part%,),VIII. ,8. ),VII. ,7. ),VI. ,6. ),IV. ,4. ),V. ,5. ),III. ,3. ),II. ,2. ),I. ,1. )