Skip to content

Instantly share code, notes, and snippets.

View Olliebrown's full-sized avatar

Seth Berrier Olliebrown

View GitHub Profile
@Olliebrown
Olliebrown / luaToJSON.js
Last active March 14, 2021 19:40
Convert some Lua tables to JS objects
/*
* A quick and dirty script to convert SOME lua tables to JSON objects
*
* This is NOT an attempt at a comprehensive Lua table converter. It
* will catch ones that I encountered a lot in my coding of tabletop
* simulator scripts specifically. I used this to scale and adjust
* hard-coded snap points and other data quickly so I wouldn't have to
* do it by hand
*/
@Olliebrown
Olliebrown / PortableRPIGitServer.md
Last active April 7, 2024 08:15
Setting up a Portable Git Server on an RPI 3B+

A Portable git Server on an RPI 3B+

For the past three years I participated in the GDC TrainJam, an event where a bunch of crazy game developers get on a train in Chicago and make games in teams with folks they've never met before! There are no winners and losers, only friends and good memories of exotic places during the 52 hour train ride.

Oh, and we also make a few games with very little in the way of outside access. The train has no usable internet and for a large portion of the ride there is also no cellular service. When there is, it is awful and not at all usable for serious things like syncing frequently to an external repo service like GitHub. The first year I played it by ear and got a live repo running on a thumb drive that we handed around between teammates. There were only two programmers on the team and even then we found this to be a real slog! Very tedious and some times merging was a nightmare.

The next year, I endeavored to do better, and have been pretty successful. I decided to s

@Olliebrown
Olliebrown / configMacPortsMongo.md
Last active March 24, 2024 21:44
Configuring MongoDB installed from MacPorts

This is based on https://github.com/codeforamerica/ohana-api/wiki/Installing-MongoDB-with-MacPorts-on-OS-X

the macports version of MongoDB does not come pre-configured and will not run after installing until you change some settings. The instructions linked above describe a way to fix this but they ignore the fact that many of the directories are already created and owned by the user "_mongo". It also runs the daemon as root rather than _mongo. Below is a modified approach that uses the _mongo user and avoids creating unnecessary directories.

Install and Configure MongoDB

  1. Install mongodb with sudo port install mongodb (you probably want to start with a sudo port selfupdate)
  2. Create configuration directory with sudo mkdir /opt/local/etc/mongodb/
  3. Create configuration file with sudo pico /opt/local/etc/mongodb/mongod.conf