Skip to content

Instantly share code, notes, and snippets.

@pca2
pca2 / 538_2024.1h.rb
Last active July 1, 2024 00:21
538 2024 Election Model BitBar/xbar plugin
#!/usr/bin/env ruby
# <bitbar.title>538 Midterm Tracker</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Carleton Atwater</bitbar.author>
# <bitbar.author.github>pca2</bitbar.author.github>
# <bitbar.desc>Scrapes election odds from FiveThirtyEight's election tracker</bitbar.desc>
# <bitbar.image>https://imgur.com/bCF8fyg.png</bitbar.image>
# <bitbar.dependencies>ruby</bitbar.dependencies>
# This code is pretty hacky, but it was a fun 1 hour project to track something 20ish days away.
@pca2
pca2 / dominion_tracker.html
Created May 8, 2025 17:10
Dominion Tracker
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dominion Counter</title>
<style>
body {
font-family: 'Courier New', monospace;
background-color: #1f1f2e;