Skip to content

Instantly share code, notes, and snippets.

View jtrussell's full-sized avatar

Justin Russell jtrussell

View GitHub Profile
const fs = require('fs')
const rawData = fs.readFileSync('./data.txt').toString()
const ix = {
Dis: 0,
Shadows: 1,
Logos: 2,
Mars: 3,
Brobnar: 4,
class Player extends GameObject {
// [... lots o' other stuff ...]
shuffleDeck() {
this.game.emitEvent(
'onDeckShuffled',
{ player: this }
)
this.deck = _.shuffle(this.deck)
if (

Setup

  • Key Cost: 6
  • Keys: 1
  • Aember: 0

Opponent may have 1 or 2 keys forged.

In Play

@jtrussell
jtrussell / user-script.js
Last active July 21, 2020 18:59
TCO Lobby Defaults
// ==UserScript==
// @name TCO Lobby Defaults
// @namespace http://tampermonkey.net/
// @version 0.6
// @description Set defaults for things like "Only show new games"
// @author jtrussell
// @include /https?://(www.)?thecrucible.online(\/.*)?/
// @grant none
// ==/UserScript==
// ==UserScript==
// @name TCO UI Beta Tester
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Monkeying around with some UI tweaks for TCO
// @author jtrussell
// @match https://www.thecrucible.online*
// @match https://thecrucible.online*
// @grant none
// ==/UserScript==
@jtrussell
jtrussell / cloudSettings
Last active April 28, 2022 16:00
VS Code Settings
{"lastUpload":"2022-04-28T16:00:13.048Z","extensionVersion":"v3.4.3"}
name: wingardium-leviosa
dependencies:
- python=3.7.3
- pandas
- requests
@jtrussell
jtrussell / get_fitness.py
Created June 20, 2019 17:56
Pseudo-ish code for service area fitness
def get_fitness(individual):
# Award a baseline score based on total volume
percent_volume = get_percent_volume(individual)
score = min(percent_volume, 0.75) * max_volume_score
if percent_volume >= 0.75:
# Award additional points for contiguity if we've met
# the volume threshold.
num_contiguous_blocks = get_num_contiguous_blocks(individual)
contiguous_bonus = get_contiguous_bonus(num_contiguous_blocks)
@jtrussell
jtrussell / ploty.bat
Last active October 15, 2017 20:43
A little script for plotting things using YAML front matter for cofiguration
#@echo off & python -x %~f0 %* & goto :eof
##!/bin/python
# Meant to be used as executable, i.e. place this file somewhere in your path
# and uncomment the first line as necessary.
#
# Data file are expected to be formatted as:
#
# x_0,y1_0,y2_0,...,yN_0
# ...
@jtrussell
jtrussell / index.html
Created October 24, 2016 20:34
React + Redux boilerplate
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>React + Redux Boilerplate</title>
</head>
<body>
<div id="mount"></div>
<script src="https://fb.me/react-with-addons-15.1.0.js"></script>