Skip to content

Instantly share code, notes, and snippets.

View wyatt8740's full-sized avatar
💭
I get better every day, I hope. Energetic.

Wyatt Ward wyatt8740

💭
I get better every day, I hope. Energetic.
View GitHub Profile
; -------------------------------------------------------------------------
;
; Sega Genesis/Mega Drive Hardware/Emulator Detection
; By Novedicus 2019
;
; -------------------------------------------------------------------------
; -------------------------------------------------------------------------
; Emulator/hardware IDs
#EXTM3U
#EXTINF:6,Vidya Intarweb Playlist - 1272 Tracks (Last Update: Jun 6 19)
https://vip.aersia.net/mu/vip.m4a
#EXTINF:0,MOTD 12/18/18 - V10P!
https://vip.aersia.net/mu/rayman-stageclear.m4a
#EXTINF:0,Changelog - vip.aersia.net/changelog.txt
https://vip.aersia.net/mu/earthbound-okssuka.m4a
#EXTINF:0,Notice - 2 SONGS PLAYING AT ONCE? DISABLE FLASHBLOCK OR WHITELIST THE SITE IT'S PLAYING IN.
https://vip.aersia.net/mu/freespace-m2aarv2.m4a
#EXTINF:0,Notice II - CHROME TRYING TO DOWNLOAD SWF? ENABLE FLASH PLAYER FOR CHROME.
@wyatt8740
wyatt8740 / asoundrc problems
Last active June 23, 2019 11:59
SB Live hangs
# I have three sound cards to choose from right now :|
# hopefully, this helps.
defaults.pcm.dmix.rate 48000
defaults.pcm.dmix.format "S16_LE"
defaults.dmix.Audigy2.period_size 1024
defaults.dmix.Audigy2.period_time 0
defaults.dmix.Audigy2.buffer_size 4096
defaults.dmix.Live.period_size 1024
defaults.dmix.Live.period_time 0
<Response><Say voice="alice">Hello, wyatt, this call is to confirm your appointment which is scheduled on May 30 at null. If you need to make a change, please contact 311-555-2368 between
the hours of 12 noon. and 9 P.M., seven days a week. That's 311-555-2368.
Thank you!</Say></Response>
@wyatt8740
wyatt8740 / banish-annoyances.sh
Created November 30, 2018 03:00
Hide annoying notification bubble from OS X Mojave preferences app icon
#! /bin/bash
# clear the notification badge on the settings app in OS X Mojave (or MacOS, whatever)
# until next update check. It was bothering me too much to be allowed to live.
# this was really annoying to find, so I'm putting it here for the future.
defaults write com.apple.systempreferences AttentionPrefBundleIDs 0
# the following may not be necessary:
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist LastUpdatesAvailable 0
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist LastRecommendedUpdatesAvailable 0
sudo defaults delete /Library/Preferences/com.apple.SoftwareUpdate.plist RecommendedUpdates
@wyatt8740
wyatt8740 / pokemon-type-matchup-calc.lisp
Created November 7, 2018 03:54
A generation II-through-V Pokémon type matchup strength calculator.
#! /usr/bin/sbcl --script
;; Pokémon Generation II through V type matchup calculator
;; Written as my first Common Lisp program. There are definitely things I'd
;; change/rearrange/put into additional functions, but overall I'm pretty happy
;; with it!
;;
;; Tested in SBCL (Steel Bank Common Lisp), but should run in any Common Lisp
;; compliant Lisp.
;;
;; I wrote it so I'd have a calculator on my laptop and Android phone that
@wyatt8740
wyatt8740 / types_v1.lisp
Created November 7, 2018 00:59
Pokemon type matchups in Common Lisp - incomplete
#! /usr/bin/sbcl --script
;; Generation II-V Pokemon type matchup calculator
;; association lists! Yay!
;; association list so that each type has an ID.
;; coincidentally, these ID's are from the order they appear in the pokemon
;; crystal disassembly, but they are not 1:1 mapped, as the 'bird' type and
;; several dummy type slots (all labeled "Normal") are skipped, as is the
;; 'curse' (???) type.
(defconstant super-effective 2.0)
@wyatt8740
wyatt8740 / backlight-toggle.sh
Created October 28, 2018 17:33
Turn the backlight on and off on intel GPU laptops with LVDS displays (like my thinkpad x201). Depends on intel-gpu-tools (intel_backlight) and dc (the unix reverse polish calculator) being installed.
#! /bin/sh
# backlight-toggle.sh: a script to turn the backlight on and off on Intel
# backlit systems by using intel_backlight from:
# https://gitlab.freedesktop.org/drm/igt-gpu-tools
# or
# https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/
# Since LVDS-based systems running newer versions of the Linux kernel don't
# allow turning the backlight off independently of the video encoder (at least
# via sysfs), intel_backlight is used to poke the correct register on the GPU
# directly.
@wyatt8740
wyatt8740 / adblock youtube prefs.txt
Created October 16, 2018 13:57
hide youtube annoyances
youtube.com##.ytp-ce-element
youtube.com##.ytp-ce-covering-overlay
youtube.com##.ytp-ce-element-shadow
youtube.com##.ytp-ce-covering-image
youtube.com##.ytp-ce-expanding-image
youtube.com##.ytp-ce-element.ytp-ce-video.ytp-ce-element-show
youtube.com##.ytp-ce-element.ytp-ce-channel.ytp-ce-channel-this
youtube.com##.ytp-cards-teaser
youtube.com##.iv-click-target
@wyatt8740
wyatt8740 / getCommentInfo.sh
Created October 8, 2018 14:00
Get imgur comment information from the API
#! /bin/bash
# usage:
# getCommentInfo [comment-id]
# https://api.imgur.com/3/comment/{ID}
# requires cURL to get the JSON object, and uses node.js to pretty-print it.
# If you don't require pretty printing, just running `echo "$RESPONSE"` should
# obviate the need for node.
# the client ID will vary between users and need to be set after registering
# the client at https://api.imgur.com/oauth2/addclient .