Skip to content

Instantly share code, notes, and snippets.

Scott Young splintax

Block or report user

Report or block splintax

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@splintax
splintax / git-clean-smudge-filter.md
Last active Jul 15, 2019
sqlite3 smudge filter in git
View git-clean-smudge-filter.md

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
splintax / patch-foo-beefweb.sh
Last active Dec 22, 2018
Patch for foo_beefweb-0.3.fb2k-component so it works in iOS Safari
View patch-foo-beefweb.sh
# 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
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.