Skip to content

Instantly share code, notes, and snippets.

View StaticPH's full-sized avatar
⚠️
Messing with things I don't fully understand

S.P.H StaticPH

⚠️
Messing with things I don't fully understand
View GitHub Profile
@StaticPH
StaticPH / moreReadableLabels.css
Last active August 24, 2022 18:30
Refined Github Custom CSS for issue labels on legacy browsers.
/*
When using the Refined Github extension on older browsers without full support for the CSS min() and max() functions,
the CSS used for issue labels is unable to correctly adjust the text color of labels to ensure legibility.
Using the following CSS in the Custom CSS field under Refined Github's options should help mitigate that by removing
the background fill from the labels in favor of applying it to the label borders and text color.
This first block works nicely for most colors, but may even make it harder to read particularly brightly colored labels.
ONLY TESTED ON A LIGHT THEME.
*/
:root .hx_IssueLabel, [data-color-mode=dark][data-dark-theme*=light] .hx_IssueLabel, [data-color-mode=light][data-light-theme*=light] .hx_IssueLabel {
--lightness-threshold: 0.453;
@StaticPH
StaticPH / bindings_are_hard.inputrc
Created February 24, 2021 02:36
Figuring out readline keybindings involving non-alphanumeric keys can be a royal pain.
## given show-all-if-ambiguous, The following line should allow you to tab through the expansion options
## (note: this will replace the default tab-complete behavior)
# TAB: menu-complete
## and the following line should then allow you to do so in reverse with shift+tab
#"\e[Z": "\e-1\C-i" #alternatively, "\e[Z": menu-complete-backward
###################################
$if mode=emacs
$if term=msys # RXVT
@StaticPH
StaticPH / FAQ.txt
Last active September 12, 2020 04:31 — forked from KnightMiner/FAQ.txt
Tinkers Construct Welcome and Rules Channel messages
Please read this FAQ before asking a question!
=>
**Question 1: I have a suggestion, can I post it here?**
We generally do not take suggestions as Tinkers' Construct mechanics are designed to work as is. New features will be added if they fulfil a need and we do not have other more important tasks to work on. Any suggestions on the issue tracker will typically be closed to keep the tracker clean, please keep discussion of ideas to the channels on this discord.
Currently, 1.12 is receiving no new updates, so please no suggestions related to that version. As 1.16 is unreleased, we are not taking suggestions for that version unless they relate to one of the pinned design docs in <#395801350731989003>. You are free to discuss ideas as long as they do not disrupt current conversations.
=>
@StaticPH
StaticPH / About Tags.txt
Created February 11, 2020 01:22
My notes on the rules for writing your own Minecraft DataTag files
— You CAN create, append to, remove from, and override tags in other namespaces
— If there is a vanilla tag that suits an item or block you created, please add it to that tag
— If there is a forge tag that suits an item or block you created, please add it to that tag
— Block and Item groupings should be plural, such as "logs" or "saplings"
— Use underscores in place of spaces in tag names
— Vanilla: "replace"
– use ' "replace": false ' to avoid overriding existing tag contents
– use ' "replace": true ' to override any contents of the specific tag loaded prior to the particular json file
— Vanilla: "values"
@StaticPH
StaticPH / Main.java
Created October 31, 2019 20:03
I have attempted to add a new variant of print to PrintStream, such that it could be called in the same manner as System.out.println; sadly, I seem to have failed.
package com.StaticPH.MicroAud;
import java.io.File;
import java.util.Scanner;
import com.StaticPH.MicroAud.extPrintStream;
public class Main {
private Scanner userInput = new Scanner(System.in);
@StaticPH
StaticPH / gist:f31112cf3bfd3edf363899ae6c7fbda2
Created October 28, 2019 20:00
I think this was my hacky workaround to install direnv for msys
# may need to substitute "/mingw64/lib/go/bin/go" for "go" in "go get github.com/direnv/direnv";
# "/mingw64/bin/go" seems to insist on looking for GOROOT in the wrong place, regardless of what the environment variable has been set to
go get github.com/direnv/direnv
# /mingw64/etc/profile.d/go.sh sets GOROOT=/mingw64/lib/go
GOBIN=${GOPATH:-~}/bin # I have no idea what GOPATH actually was when I used this, but apparently it was something that worked
if [[ ":$PATH:" != *":$GOBIN:"* ]]; then
export PATH=$PATH:$GOBIN
fi
cd ${GOPATH:-/mingw64/go}/src/github.com/direnv/direnv
make install
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
}
}
StaticPH ~/globtest $>
λ  ~/.cargo/bin/rg -uu -g '{*,}.foo{_*,}' --debug "\D"
DEBUG|globset|D:/msys2/home/StaticPH/.cargo\registry\src\github.com-1ecc6299db9ec823\globset-0.4.4\src\lib.rs:430: glob converted to regex: Glob { glob: "**/{*,}.foo{_*,}", re: "(?-u)^(?:/?|.*/)([^/]*)\\.foo(_[^/]*)$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Alternates([Tokens([]), Tokens([ZeroOrMore])]), Literal('.'), Literal('f'), Literal('o'), Literal('o'), Alternates([Tokens([]), Tokens([Literal('_'), ZeroOrMore])])]) }
DEBUG|globset|D:/msys2/home/StaticPH/.cargo\registry\src\github.com-1ecc6299db9ec823\globset-0.4.4\src\lib.rs:435: built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 1 regexes
DEBUG|globset|D:/msys2/home/StaticPH/.cargo\registry\src\github.com-1ecc6299db9ec823\globset-0.4.4\src\lib.rs:435: built glob set; 0 literals, 0 basenames, 11 extensions, 0 prefixes, 0 suffixes, 0 r
.c-icon--search-medium:before {
color: #1a434f;
content: "\E01B";
}
/* .c-icon--menu:before {
content: "\E159"
} */
.c-icon--text-format-menu:before {
content: "\E159"
}