Skip to content

Instantly share code, notes, and snippets.

Scott Young splintax

View GitHub Profile
splintax /
Last active Jun 24, 2020

If you configure git like this:

git config filter.sqlite3.clean 'sqlite3 %f .dump'
git config filter.sqlite3.smudge 'sqlite3 %f'
echo '*.db filter=sqlite3' >> .git/info/attributes

and you have an sqlite3 database in a *.db file:

splintax /
Last active Dec 22, 2018
Patch for foo_beefweb-0.3.fb2k-component so it works in iOS Safari
# Paste this into your shell in the same directory as foo_beefweb-0.3.fb2k-component.
# This script will create foo_beefweb-0.3.patched.fb2k-component, which you can then
# install in the foobar2000 GUI.
# The patch allows you to change tracks by clicking as well as double- clicking. This
# isn't the best on a desktop, but since double-clicking is broken in iOS Safari,
# something like this is needed to be able to change tracks.
unzip foo_beefweb-0.3.fb2k-component beefweb.root/bundle.js;
printf "\ndocument.addEventListener('DOMContentLoaded', _ => {\
splintax / pancakes.hs
Created Apr 16, 2016
Revenge of the Pancakes (Google Code Jam 2016, Qualification Round, Problem B)
View pancakes.hs
import Data.List
-- Code Jam boilerplate
main :: IO ()
main = getContents >>= putStr . showCases . tail . lines
showCase :: (Int, String) -> String
showCase (i, c) = "Case #" ++ show i ++ ": " ++ show (solve c)
You can’t perform that action at this time.