Skip to content

Instantly share code, notes, and snippets.

Avatar

Jesse Plamondon-Willard Pathoschild

  • Montréal, Canada
View GitHub Profile
@Pathoschild
Pathoschild / generate github wiki page toc.js
Created Oct 2, 2015
Generate GitHub wiki table of contents
View generate github wiki page toc.js
/**
* 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 / scanactivity.sh
Last active Dec 14, 2015
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.
View scanactivity.sh
#!/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 / parse-sdv-event-conditions.js
Last active Jan 29, 2018
Parse Stardew Valley event conditions
View parse-sdv-event-conditions.js
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-git-tfs-author-file.cs
Created Feb 18, 2013
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.
View generate-git-tfs-author-file.cs
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;
@Pathoschild
Pathoschild / split-spritesheet.linq
Created Nov 17, 2020
Split Stardew Valley spritesheet
View split-spritesheet.linq
<Query Kind="Program">
<NuGetReference>ImageProcessor</NuGetReference>
<Namespace>System.Drawing</Namespace>
<Namespace>ImageProcessor</Namespace>
<Namespace>ImageProcessor.Imaging</Namespace>
<Namespace>ImageProcessor.Imaging.Formats</Namespace>
</Query>
/*
@Pathoschild
Pathoschild / google-sheets-color-preview.js
Last active Dec 14, 2020
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.
View google-sheets-color-preview.js
/*
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 / translate-event-files.linq
Last active Dec 22, 2020
Translate Stardew Valley event files
View translate-event-files.linq
<Query Kind="Program">
<NuGetReference>Newtonsoft.Json</NuGetReference>
<Namespace>Newtonsoft.Json</Namespace>
<Namespace>Newtonsoft.Json.Linq</Namespace>
</Query>
/*
Overview
-------------------------------------------------
@Pathoschild
Pathoschild / stardew-mod-recommendations.md
Last active Apr 16, 2021
Stardew Valley mod recommendations
View stardew-mod-recommendations.md

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

Quality of life

I think the best mods are those which improve the game while maintaining its balance, lore, and style.

  • Better Sprinklers
    Customise the sprinkler radius, with a proportional change to their cost. If you're willing to mine all the ores you'll need, that makes the basic sprinklers useful early in the game and lets you do more than just watering crops every day.

  • Billboard Anywhere
    View the calendar and daily quest anywhere. See upcoming birthdays and festivals without needing to walk to the nearest calendar.