Skip to content

Instantly share code, notes, and snippets.

require 'fileutils'
require 'sqlite3'
require 'uri'
require 'net/http'
require 'set'
require 'thread'
chrome_history_location = "#{ENV['HOME']}/Library/Application\ Support/Google/Chrome/Default/History"
temp_location = "/tmp/Chrome_history"
FileUtils.cp(chrome_history_location, temp_location)
A RELUCTANT HERO'S UNTOLD ADVENTURES
[aka. "Project RHUA"]
_______________________________________________________________________________
class Deck
attr_accessor :needs_shuffle
def initialize(cards = [%w(x2 miss), %w(2 -2), %w(1 -1) * 5, %w(0) * 6].flatten)
@orig_cards = cards
shuffle!
end
def add(cards)
@orig_cards += cards
self
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfBasicSetCollectionInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<BasicSetCollectionInfo>
<SetName>Classic</SetName>
<Cards>
<CardInCollection>
<AmountNonGolden>2</AmountNonGolden>
<AmountGolden>0</AmountGolden>
<CopiesInDecks>0</CopiesInDecks>
<DesiredAmount>0</DesiredAmount>
@jamie
jamie / attendease.yml
Created August 2, 2019 20:28
tmuxinator configuration
# /.config/tmuxinator/attendease.yml
name: attendease
root: ~/code/attendease
# Optional tmux socket
# socket_name: foo
# Note that the pre and post options have been deprecated and will be replaced by
# project hooks.
players / spoken to
1 2 3 4 5 6 7
7 66% 40% 80% 60% 100%
8 71% 48% 86% 71% 100%
9 75% 53% 89% 79% 100%
10 67% 42% 77% 60% 88% 76% 100%
11 70% 47% 82% 67% 92% 83% 100%
12 73% 51% 85% 72% 94% 88% 100%
13 66% 42% 76% 59% 85% 73% 93%
14 69% 46% 80% 65% 88% 78% 95%
@jamie
jamie / dirty_cop.rb
Created April 30, 2025 04:51
Differential Rubocop runner
#!/usr/bin/env ruby
## Stolen from https://gist.github.com/skanev/9d4bec97d5a6825eaaf6
## Tested against Rubocop 1.65.1
# A sneaky wrapper around Rubocop that allows you to run it only against
# the recent changes, as opposed to the whole project. It lets you
# enforce the style guide for new/modified code only, as opposed to
# having to restyle everything or adding cops incrementally. It relies
# on git to figure out which files to check.