Skip to content

Instantly share code, notes, and snippets.

Workin' on Rust Stuff

Lokathor Lokathor

Workin' on Rust Stuff
Block or report user

Report or block Lokathor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lokathor.nanorc
## An improved version of the "official" rust highlight file, Licensed GPL v3
syntax "rust" "\.rs"
comment "//"
# The order of these colorations is significant.
# Matches later down will re-color earlier matches.
# Thus, we place the most general matches first and allow them to be overriden later if necessary.
# Function definitions
use chlorine::*;
use core::convert::TryInto;
pub type chtype = u32;
type NCURSES_BOOL = c_uchar;
View toss-a-coin-to-your-loka.txt
🎵 When a humble Mem
graced a ride along
with Loka of Thoria
along came this song.
From when the Glider fought
a foreign-tongued repo
its unsynch'd globals
the ey pi ai's credo.

Cargo Crev Quickstart

You should consider using cargo-crev more often.

  • Installation: You need to obtain OpenSLL, and then cargo install cargo-crev
  • (All commands from here are for cargo-crev 0.13.0; command usage may change in the future)
  • Make Your ID: cargo crev id new --url [repo_url]
    • This prompts for a password that will protect the ID.
    • This is the cryptographic style "you can't ever recover this" type of password.
    • Keep it secret and keep it safe.
Lokathor /
Last active Dec 8, 2019
Blog post about how to build `cfg_if` style macro.

Diving in to cfg_if!

How exactly does the cfg_if! macro do its thing?

First of all what is the cfg_if! macro? It's a macro to help you pick a set of code based on compile-time configutation. There is a sample usage on the docs page:


Here are the steps to setup mgba as well as the development tools that you'll need to build GBA roms on your Raspberry Pi. I did this on a Pi4, but it should work on a Pi3 or even a Pi2 just as well.

  • un-comment the sources repo in /etc/apt/sources.list using your editor of choice (requires root of course).

  • sudo apt-get update to get fresh sources info

  • sudo apt build-dep mgba-qt to install all the dependencies of the Qt

View right_hand_pokemon.txt
> Rocket Leader Geovani's got troops on the water
> Thirty-two thousand troops in Fuchsia harbor
> Thirty-two thousand troops in Fuchsia harbor
> When they surround our troops (They surround our troops)
> When they surround our troops
As a kid in the Orange Islands I wished for a war
I knew that I was poor
I knew it was the only way to
> Rise up

Earthdawn Game

blank character sheet

General Rules

  • The rules will default to the Earthdawn 4e rules.
  • If a rule is missing from 4e but present in a previous edition then we might use the rule from the previous edition (if it's sane and such).

Specific House Rules

Lokathor /
Last active Nov 20, 2019
Installing SDL2 on rpi3

Here is an explanation of how to install a version of SDL2 that will let you run graphical programs straight from the console on a raspberry pi (including hardware acceleration). I got this from a blog post on choccyhobnob.

As a reminder, the RPI "hardware acceleration" is OpenGL ES 2. Some sites talk about an "experimental" OpenGL driver that you can install. That driver is for desktop mode only (X11). You do not need it to run SDL2 out of the console. In fact if you have it configured for use then it will hinder console based graphical programs from being able to use hardware acceleration (Retropie won't even start up, for example, until you disable the experimental driver and reboot).

Clear the default sdl2 installation (which is compiled for desktop mode):

sudo apt-get remove -y --force-yes libsdl2-dev
sudo apt-get autoremove -y
# There's also a version of 2.0.8 which you should archive
View USB,2-axis 8-button gamepad .cfg
input_device = "USB,2-axis 8-button gamepad "
input_driver = "udev"
input_a_btn = "0"
input_b_btn = "1"
input_x_btn = "2"
input_y_btn = "3"
input_l_btn = "4"
input_r_btn = "5"
input_select_btn = "6"
You can’t perform that action at this time.