Skip to content

Instantly share code, notes, and snippets.

View nicholastay's full-sized avatar

Nicholas Tay nicholastay

View GitHub Profile
@nicholastay
nicholastay / copr-spec.user.js
Last active December 1, 2021 13:10
Copr RPM Spec Quickview
// ==UserScript==
// @name Copr RPM Spec Quickview
// @namespace nick@windblume
// @match https://copr.fedorainfracloud.org/coprs/*/*/
// @grant none
// @version 0.1.0
// @author Nicholas Tay <[email protected]>
// @description Quickly jump to the spec file for COPR packages (on the project's package page)
// @homepage https://gist.github.com/nicholastay/7a8d7883bb7e30ac36da344746b6126a
// @license Zlib
@nicholastay
nicholastay / setup.md
Last active December 31, 2021 02:52
Fedora install notes

Fedora setup

Done with Fedora 35 i3 spin on X230 laptop. Kind of a build log.

Initial setup (Anaconda)

BTRFS with subvolumes, using Custom. Encryption with LUKS2 enabled.

  • /
  • /home
@nicholastay
nicholastay / .emacs
Last active November 16, 2021 13:01
WIP emacs (tested on windows for now + to put in dotfiles)
(setq inhibit-startup-screen t)
(menu-bar-mode 0)
(tool-bar-mode 0)
(scroll-bar-mode 0)
(setq ido-enable-prefix t)
(ido-mode 1)
;; Line numbers + its colour
;;(set-face-foreground 'line-number-current-line "#FFFF00")
@nicholastay
nicholastay / via-iris-rev-4-nick.json
Last active August 14, 2021 15:14
VIA setup for my iris keeb - still experimenting and messing around, would be cool to see how this evolves (already has a few times!)
{
"name": "Iris Rev. 4",
"vendorProductId": 3406840406,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"MT(MOD_LALT,KC_ESC)",
"KC_1",
"KC_2",
"KC_3",
@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/*
@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,

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 / 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()
@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 / 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==