Skip to content

Instantly share code, notes, and snippets.

Scoundrel Rules

Scoundrel is a single-player, rogue-like card game played with a standard deck of cards. The objective is to survive a dungeon crawl by battling monsters and managing your health.

Setup

  1. Prepare the Deck: Start with a standard 52-card deck. Remove all jokers, red face cards (Jacks, Queens, Kings), and red Aces. The remaining cards form the "Dungeon" deck.
  2. Starting Health: You begin with 20 health points.

Card Roles

@ngauthier
ngauthier / index.js
Created June 28, 2025 16:52
Drip MCP Server - Complete API Implementation
#!/usr/bin/env node
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
CallToolRequestSchema,
ListToolsRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";
import fetch from "node-fetch";
@ngauthier
ngauthier / index.js
Created June 28, 2025 14:49
Drip MCP Server
#!/usr/bin/env node
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
CallToolRequestSchema,
ListToolsRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";
import fetch from "node-fetch";
@ngauthier
ngauthier / timeout_and_tick.go
Created February 10, 2015 18:14
Golang timeout and tick loop
// keepDoingSomething will keep trying to doSomething() until either
// we get a result from doSomething() or the timeout expires
func keepDoingSomething() (bool, error) {
timeout := time.After(5 * time.Second)
tick := time.Tick(500 * time.Millisecond)
// Keep trying until we're timed out or got a result or got an error
for {
select {
// Got a timeout! fail with a timeout error
case <-timeout:
@ngauthier
ngauthier / README.md
Last active December 8, 2023 13:56
install ruby 2.0.0-p0 on ubuntu
@ngauthier
ngauthier / Gemfile
Created March 23, 2012 16:42
Demo Sinatra App
source :rubygems
gem 'sinatra'
@ngauthier
ngauthier / readme.md
Created December 24, 2011 04:30
Convert 3DS video for YouTube 3D

Assuming the file is named "source.avi":

ffmpeg -i source.avi  -map 0:2 -map 0:1 -vcodec rawvideo -s 480x480 right.avi
ffmpeg -i source.avi  -map 0:0 -map 0:1 -vcodec rawvideo -s 480x480 -vf pad=960:480:0:0:violet -y left.avi
ffmpeg -i left.avi -vf "movie=right.avi [ovl]; [in][ovl] overlay=480:0 [out]" -an -y -b 4096k done.avi

Then upload "done.avi" to youtube. View the video, click "Edit Info" => "3D Video" => "This video is already in 3D" => "Save Changes"

@ngauthier
ngauthier / README.md
Created July 5, 2012 20:10
Rdio "native" in linux

I like Rdio and linux. Rdio works great in a browser except for one thing: keyboard shortcuts!!!

When coding, I like to be able to play/pause my music quickly, meaning I don't want to switch windows. I figured out a way to do this:

Google Chrome --app

First, I made a file in my ~/bin called rdio that runs:

google-chrome --app=http://rdio.com
package fieldsampler
import (
"github.com/honeycombio/beeline-go/sample"
)
const (
// CustomSampleRateFieldName is the field to use to override the default Sample Rate
CustomSampleRateFieldName = "CustomSampleRate"
#!/usr/bin/env bash
set -e
USAGE="Usage: migrate <up|down|new|init>"
# http://www.postgresql.org/docs/9.5/static/libpq-envars.html
export PGDATABASE=${PGDATABASE:-meetspace}
cd `dirname $0`/../migrations