Skip to content

Instantly share code, notes, and snippets.

View Pathoschild's full-sized avatar

Jesse Plamondon-Willard Pathoschild

  • Montréal, Canada
View GitHub Profile
@Pathoschild
Pathoschild / prepare-repo-for-nullable-reference-types.md
Last active March 2, 2023 00:50
Prepare repo for nullable reference types
@Pathoschild
Pathoschild / create-translation-summary.md
Last active March 2, 2023 00:50
Create Stardew Valley mod translation summary
@Pathoschild
Pathoschild / split-spritesheet.md
Last active March 2, 2023 00:51
Split Stardew Valley spritesheet
@Pathoschild
Pathoschild / translate-event-files.md
Last active March 2, 2023 00:51
Translate Stardew Valley event files
@Pathoschild
Pathoschild / stardew-mod-recommendations.md
Last active August 5, 2025 18:47
Stardew Valley mod recommendations

Here are the mods I recommend. These are all compatible with the latest versions of SMAPI and Stardew Valley on Linux/macOS/Windows. See the player's guide to using mods if you're interested.

Base frameworks

@Pathoschild
Pathoschild / parse-sdv-event-conditions.js
Last active January 29, 2018 16:47
Parse Stardew Valley event conditions
var input = "95/e 93/k 94/t 1800 1950/i 136/y 2";
(function(conditionString) {
"use strict";
let conditions = conditionString.split("/");
// define parsers
let parsers = [
// event ID
// <id>
@Pathoschild
Pathoschild / generate github wiki page toc.js
Created October 2, 2015 20:19
Generate GitHub wiki table of contents
/**
* This script generates a Markdown table of contents for a GitHub wiki page.
* The end result is a block like this:
*
* ## Contents
* * [Header](#header)
* * [Subheader](#subheader)
* * [Sub-subheader](#sub-subheader)
* * [Sub-subheader 2](#sub-subheader-2)
* * [Header 2](#header-2)
@Pathoschild
Pathoschild / google-sheets-color-preview.js
Last active August 1, 2024 21:43
A Google Sheets script which adds color preview to cells. When you edit a cell containing a valid CSS hexadecimal color code (like #000 or #000000), the background color is changed to that color and the font color is changed to the inverse color for readability.
/*
This script is meant to be used with a Google Sheets spreadsheet. When you edit a cell containing a
valid CSS hexadecimal color code (like #000 or #000000), the background color will change to that
color and the font color will be changed to the inverse color for readability.
To use this script in a Google Sheets spreadsheet:
1. go to Tools » Script Editor;
2. replace everyting in the text editor with this code;
3. click File » Save;
@Pathoschild
Pathoschild / scanactivity.sh
Last active December 14, 2015 03:39
A bash script which connects to the toolserver.org database and generates a report on the latest activity dates for every bureaucrat across every Wikimedia wiki.
#!/usr/bin/env bash
# Retrieves the dates of the latest edit and log action for every bureaucrat
# across every Wikimedia wiki. This generates a TSV dataset that can be imported
# into Google Fusion Tables or processed into another format.
# SQL which generates TSV data (with fields for Google Fusion)
wikiSql="SELECT dbname, server, lang, family, domain, size, is_closed FROM toolserver.wiki ORDER BY dbname"
scanSql="SELECT /* SLOW_OK */ *, GREATEST(last_edit, last_log) AS last_edit_or_log, COALESCE(DATE_FORMAT(last_edit, '%d/%m/%y %H:%i'), 'never') AS last_edit_us, COALESCE(DATE_FORMAT(last_log, '%d/%m/%y %H:%i'), 'never') AS last_log_us, COALESCE(DATE_FORMAT(GREATEST(last_edit, last_log), '%d/%m/%y %H:%i'), 'never') AS last_edit_or_log_us FROM (SELECT user_name, (SELECT COALESCE(MAX(rev_timestamp), 'never') FROM revision WHERE rev_user = user_id) AS last_edit, (SELECT COALESCE(MAX(log_timestamp), 'never') FROM logging_ts_alternative WHERE log_user = user_id AND log_type IN ('abusefilter', 'block', 'delete'
@Pathoschild
Pathoschild / generate-git-tfs-author-file.cs
Created February 18, 2013 15:52
A small console app that generates a git-tfs author file for users on a TFS server. This is used by the git-tfs bridge to map TFS users to git users when migrating a repository.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net;
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Framework.Client;
using Microsoft.TeamFoundation.Framework.Common;
using Microsoft.TeamFoundation.Server;
using Microsoft.TeamFoundation.VersionControl.Client;