Skip to content

Instantly share code, notes, and snippets.

@tomshen
tomshen / sm64plus-steam-deck.md
Last active February 4, 2024 04:12
Instructions for compiling Super Mario 64 Plus on the Steam Deck
  1. Follow the instructions at https://github.com/MorsGames/sm64plus/wiki/Manual-Building-Guide, but at the dependency step, run the following before building:
sudo steamos-readonly disable
sudo pacman-key --init
sudo pacman-key --populate archlinux
sudo pacman -S sdl2 glew glibc linux-api-headers libusb libglvnd
  1. Add the sm64.us.f3dex2e file in build/us_pc as a non-Steam game.
  2. Pass in the gfx folder path as the second argument in the "Target" setting in Steam properties for the game.
@tomshen
tomshen / sf-mono.sh
Created December 18, 2017 22:40
Use SF Mono in apps besides Terminal/XCode
cp -R /Applications/Utilities/Terminal.app/Contents/Resources/Fonts/. /Library/Fonts/
"use strict";
// This file was originally written by @drudru (https://github.com/drudru/ansi_up), MIT, 2011
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var ANSI_COLORS = [[{ color: "0, 0, 0", "class": "ansi-black" }, { color: "187, 0, 0", "class": "ansi-red" }, { color: "0, 187, 0", "class": "ansi-green" }, { color: "187, 187, 0", "class": "an
@tomshen
tomshen / rename-files.md
Created August 8, 2017 08:23
How to rename multiple files with a find/replace

How to rename multiple files with a find/replace

for f in *Huge*; do mv $f ${f/Huge/Monstrous}; done

Source

@tomshen
tomshen / surf-macos.md
Created July 12, 2017 12:55
[WIP] Installing surf 2.0 on macOS 10.12.5
# Install dependencies
brew install cmake enchant gstreamermm gtk+3 libnotify libsecret libsoup webp
git clone git@github.com:hunspell/hyphen.git
cd hyphen
autoreconf -fvi
./configure
make
make install
@tomshen
tomshen / youtube-download.md
Created May 25, 2017 13:00
How to Download a YouTube Video in MP4 with Subtitles

How to Download a YouTube Video in MP4 with Subtitles

Install youtube-dl:

brew install youtube-dl
pip install youtube-dl

and run the following:

@tomshen
tomshen / ffmpeg-timelapse.md
Created May 25, 2017 12:57
How to Create a Time-lapse with ffmpeg

How to Create a Time-lapse with ffmpeg

Given a directory containing:

.
├── LRT_00001.jpg
├── LRT_00002.jpg
├── LRT_00003.jpg
├── LRT_00004.jpg
@tomshen
tomshen / bug.sml
Created March 28, 2016 03:46
Type the following into a SML/NJ REPL.
fun sml n j = (j+1, if n = j then j else j+1)
@tomshen
tomshen / learning.md
Last active August 29, 2015 14:07
Best-in-class tutorials and guides
@tomshen
tomshen / toolbelt.md
Last active December 14, 2015 16:10
Tom's Toolbelt

Very outdated.

Tom's Toolbelt

A highly opinionated list of the things I use to make other things.

I develop on OS X and deploy to Ubuntu. A Macbook Air with a retina display would be a perfect laptop. I use Sublime Text 3 to write almost all my code. Homebrew is my package manager of choice.

Table of Contents