Skip to content

Instantly share code, notes, and snippets.

View nicholastay's full-sized avatar

Nicholas Tay nicholastay

View GitHub Profile
@nicholastay
nicholastay / Picard.ini
Last active February 6, 2019 03:57
My settings for MusicBrainz Picard (win: appdata\musicbrainz)
[application]
version=2.0.4.final0
[setting]
ca_providers=@Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x1f\x80\x3X\x11\0\0\0\x43over Art Archiveq\0\x88\x86q\x1.), @Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x14\x80\x3X\x6\0\0\0\x41mazonq\0\x88\x86q\x1.), @Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x17\x80\x3X\t\0\0\0Whitelistq\0\x88\x86q\x1.), @Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x1d\x80\x3X\xf\0\0\0\x43\x61\x61ReleaseGroupq\0\x89\x86q\x1.), @Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x13\x80\x3X\x5\0\0\0Localq\0\x89\x86q\x1.)
acoustid_fpcalc=C:\\Program Files (x86)\\MusicBrainz Picard\\fpcalc.exe
local_cover_regex=^(?:cover|folder|albumart)(.*)\\.(?:jpe?g|png|gif|tiff?)$
caa_image_size=1200
caa_save_single_front_image=false
caa_approved_only=false
@nicholastay
nicholastay / math.tex
Last active April 16, 2019 13:29
My fairly basic math template for LaTeX
\documentclass{article}
% Document metadata - set here
\newcommand{\metatitle}{<++>}
\newcommand{\shorttitle}{<++>}
\newcommand{\metaauthor}{Tay, Nicholas}
\newcommand{\metaemail}{<++>}
\newcommand{\metadate}{<++>}
@nicholastay
nicholastay / colorOverrides.css
Last active June 10, 2019 05:09
ShadowFox customisations (win: %appdata%\Mozilla\Firefox\Profiles\*.default)
--accent-1: #ff80ff;
--accent-2: #910091;
--accent-3: #510051;
@nicholastay
nicholastay / quickofficepdf.cmd
Created June 17, 2019 12:40
Quickly read/convert MS Office generated documents as a PDF in Windows (LibreOffice + SumatraPDF)
@echo off
SET OUTPUTPATH=%USERPROFILE%\Desktop
if exist "%OUTPUTPATH%\%~n1.pdf" goto launch
echo Converting to PDF, saving to defined output path...
cd /D "%OUTPUTPATH%"
soffice --convert-to pdf %1 --headless
:launch
@nicholastay
nicholastay / op-gg-no-bat.user.js
Last active February 16, 2020 14:06
op.gg copy/paste command for spectate
// ==UserScript==
// @name op.gg spectate override
// @namespace http://nicholastay.github.io/
// @version 0.1.1
// @author Nicholas Tay
// @license MIT
// @match *://*op.gg/*
// @grant none
// ==/UserScript==
@nicholastay
nicholastay / fbgg.py
Created December 11, 2019 04:20
scuffed streamlink plugin for fb gaming links
import re
from streamlink.plugin import PluginError
from streamlink.plugin.api import useragents
from streamlink.plugins.facebook import Facebook
class Facebookgg(Facebook):
_gaming_url_re = re.compile(r'''https?://(?:www\.)?(?:fb\.gg|facebook\.com/gaming)/(?P<fb_page>.*)''')
_gaming_re = re.compile(r'''"permalinkURL":"(.*?)"''')
@nicholastay
nicholastay / lyrmerge.py
Created December 30, 2019 04:02
Quick tool to put together timed lyr file and a translation of the song given same lines
import sys
import re
lyrReg = re.compile('^\\[\\d+:\\d+\\.\\d+\\]\\s+?$', re.MULTILINE)
def readInFile(filename, isTiming=True):
out = []
with open(filename, 'r', encoding='UTF-8') as f:
for line in f:
line = line.strip()

My own notes for USB arch setups. Will update as more things happen or whatever.

Prerequisites

  • arch-install-scripts or live usb
  • gdisk
  • f2fs-tools
  • dosfstools

Partitioning

# gdisk /dev/sdX

@nicholastay
nicholastay / ffz-settings.json
Last active November 4, 2021 01:44
Twitch FFZ settings backup
{
"version": 2,
"type": "full",
"values": {
"p:0:chat.lines.borders": 3,
"fschat.top": "41px",
"p:0:layout.discover": false,
"p:0:i18n.format.date": "YYYY-MM-DD",
"p:0:chat.emote-menu.icon": true,
"p:0:metadata.player-stats": true,
@nicholastay
nicholastay / nexerq-message-history-ffz.user.js
Last active February 2, 2022 08:23
Twitch Chat History FFZ addon utilising robotty's service (known issue(s): 'chat history ends here' doesnt show properly always, slow loading where new chat messages are above old ones loaded in)
// ==UserScript==
// @name ChatHistory4FFZ
// @namespace nexerqdev
// @homepage https://gist.github.com/nicholastay/097ea9d54425dba474bf78747d976d56
// @version 0.1.2
// @description Chat history for FFZ with robotty's service
// @author Nexerq <[email protected]>
// @license Zlib/libpng
// @match *://twitch.tv/*
// @match *://www.twitch.tv/*