Skip to content

Instantly share code, notes, and snippets.

Avatar

ObserverOfTime

View GitHub Profile
@ObserverOfTime
ObserverOfTime / css-inject.js
Last active Mar 29, 2019 — forked from 1j01/README.md
GitHub Desktop Dark Theme - NO LONGER MAINTAINED
View css-inject.js
/**
* To apply the theme:
* 1) Open dev tools with CTRL + SHIFT + I
* 2) Go to the console
* 3) Paste the following code
* Note: You will have to do this again whenever Github Desktop updates
*/
const fs = require('fs');
const path = require('path');
@ObserverOfTime
ObserverOfTime / WA2-Mac.md
Last active Sep 5, 2019
Install and patch White Album 2 on Mac
View WA2-Mac.md

Install and patch White Album 2 on Mac

This gist is deprecated. You can find the latest instructions here.

1: Japanese locale and fonts

Japanese locale should be enabled by default on Mac.

You can check by running:

@ObserverOfTime
ObserverOfTime / BDLinux.md
Last active Jul 6, 2022
Install BetterDiscord on Linux
View BDLinux.md

Install BetterDiscord on Linux

This Gist contains simple instructions on how to install, update, and uninstall BetterDiscord on Linux.

For more thorough documentation, take a look at betterdiscordctl's README.

Do NOT submit issues here as I don't check the comments. You should submit them here instead.

@ObserverOfTime
ObserverOfTime / WA2-Ubuntu.md
Last active Nov 6, 2020
Install and patch White Album 2 on Linux
View WA2-Ubuntu.md

For Ubuntu and other Debian-based distros

This gist is deprecated. You can find the latest instructions here.

1: Enable Japanese Locale

Check whether it's already enabled:

$ locale -a | grep ja
View semver.sh
#!/bin/bash -e
###
# Semantic version comparison using semver specification http://semver.org/
# This bash script compares pre-releases alphabetically as well
#
# returns 1 when A greater than B
# returns 0 when A equals B
# returns -1 when A lower than B
#
@ObserverOfTime
ObserverOfTime / userContent.css
Created Oct 17, 2019
Dark new tab for Firefox
View userContent.css
/* Dark new tab */
@-moz-document url("about:newtab") {
body {
background-color: #2A2A2E !important;
}
.top-site-outer .title span {
color: #F9F9FA !important;
}
.collapsible-section .section-title.grey-title,
.collapsible-section .section-title span {
@ObserverOfTime
ObserverOfTime / svgimagefield.py
Last active Oct 28, 2020 — forked from ambivalentno/svgimagefield.py
A form field to handle validation of image + svg.
View svgimagefield.py
from xml.etree import cElementTree as et
from django.core.exceptions import ValidationError
from django.forms import ImageField
class SVGImageField(ImageField):
"""A Django ImageField that accepts SVG images."""
def to_python(self, data):
"""
@ObserverOfTime
ObserverOfTime / travis-ci-webhook.sh
Last active Dec 28, 2020
Travis CI Discord webhook
View travis-ci-webhook.sh
#!/bin/bash
if [[ -z $1 ]]; then
printf '[Webhook]: ERROR! Missing webhook URL argument.\n'
exit 1
fi
if [[ -n $2 ]]; then
LANG_VAL="$2"
LANG_REF="TRAVIS_${2^^}_VERSION"
@ObserverOfTime
ObserverOfTime / XCompose
Last active Mar 16, 2022
My XCompose configuration
View XCompose
# UTF-8 (Unicode) compose sequence
# {keys...} : "{glyph}" {unicode number} # {unicode name}
# Dashes & spaces {{{
<Multi_key> <asciicircum> <underscore> : "¯" U00AF # MACRON
<Multi_key> <minus> <minus> <period> : "–" U2013 # EN DASH
<Multi_key> <minus> <minus> <minus> : "—" U2014 # EM DASH
<Multi_key> <minus> <minus> <space> : "­" U00AD # SOFT HYPHEN
<Multi_key> <space> <space> : " " U00A0 # NO-BREAK SPACE
<Multi_key> <minus> <underscore> <minus> : "⍽" U237D # SHOULDERED OPEN BOX