Skip to content

Instantly share code, notes, and snippets.

View underhilllabs's full-sized avatar

Bart Lantz underhilllabs

View GitHub Profile
@underhilllabs
underhilllabs / game_skel.rb
Last active March 2, 2021 14:17
18xx.games Module Game skeleton
require_relative "../base"
require_relative "meta"
module Engine
module Game
module G18Example
class Game < Game::Base
include_meta(G18Example::Meta)
BANK_CASH = 10_000
document.addEventListener('turbolinks:load', () => {
$('.dynamic-fy').on("change", function () {
var fy_id = $(this).children("option:selected").val()
$.getJSON("/dynamic_select/" + fy_id + "/projects.json?request_type=supplemental_request", function( data ) {
$('.dynamic-project').empty();
$('.dynamic-report').empty();
$('.dynamic-project').append($('<option>', {value: 0, text: "-- select project --"}));
$.each(data, function(key, val) {
$('.dynamic-project').append($('<option>', {value: val["id"], text: val["current_title"]}));
});
@underhilllabs
underhilllabs / 1846-routes.txt
Last active September 12, 2019 12:18
1846-routes.txt
B16; 619; 4
C15; 297; 0
C13; 8; 0
D14; 619; 3
D12; 24; 1
D10; 9; 1
D6; 299; 0
D8; 23; 4
E15; 8; 4
E17; 297; 3
@underhilllabs
underhilllabs / seamuscon2.md
Last active March 14, 2019 14:35
Seamus Con 2 (2019)

Thursday 3/28

Friday Night 3/29

Saturday 3/30

Sunday 3/31

Tell me about a Recurring Nightmare that includes..

  • a hovering balloon
  • a whistling teapot
  • broken sunglasses
  • a mirror
  • waking up on a train
  • a basset hound
  • a Clown
  • a Raven/Owl
  • a hole in the ground
@underhilllabs
underhilllabs / games-bcon-2018.md
Last active August 28, 2018 15:08
Games for B-con

Game List for B-Con

whoop whoop!

Root Tea

Me

  • Root
  • Troyes
@underhilllabs
underhilllabs / Monthly-games.md
Last active August 4, 2018 15:33
Games to play at least once a month

once s month games

  • Concordia
  • Hansa Teutonica
  • Gloomhaven
  • Heaven and Ale
  • Yokohama
  • Inis
  • Anachrony
  • Gaia Project
  • Clans of Caledonia

AWS Stuff

Rails Stuff

Foreman

created a Procfile, Procfile.ec2

web: rails s -p 3000
@underhilllabs
underhilllabs / apache.conf
Created April 27, 2018 17:40
Set up basic http auth to block bots from dev server
<VirtualHost *>
<Directory /var/www/devsite/>
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</Directory>
</Virtualost>
@underhilllabs
underhilllabs / something.sql
Created April 5, 2018 16:17
find 10 largest tables in a Mysql database
SELECT CONCAT(table_schema, '.', table_name),
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
ORDER BY data_length + index_length DESC
LIMIT 10;