Skip to content

Instantly share code, notes, and snippets.

View gertoe's full-sized avatar

Gerrit Toehgiono gertoe

View GitHub Profile
@gertoe
gertoe / noSpacebarScroll.user.js
Created February 23, 2021 11:16
noSpacebarScroll Usercript - Improved
// ==UserScript==
// @name noSpacebarScroll
// @description Prevents the spacebar from scrolling the web page
// @namespace noSpacebarScroll
// @grant none
// @include *
// @exclude *github.com*
// @antifeature May break spacebar input on some web pages that rely on custom JavaScript inputs
// @version 2
// ==/UserScript==
@gertoe
gertoe / gtk.css
Created August 11, 2020 20:38
Rectangular scrollbars for Adwaita theme (GTK 3)
/* Custom scrollbar parameters */
/* $HOME/.config/gtk-3.0/gtk.css */
/* Enable legacy-style steppers (scrollbar buttons) */
* {
-GtkScrollbar-has-backward-stepper: true;
-GtkScrollbar-has-secondary-backward-stepper: true;
-GtkScrollbar-has-forward-stepper: true;
}
@gertoe
gertoe / selective-gallery.html
Created March 3, 2020 12:47
jekyll-gallery-generator.rb: Selectively include galleries in a Jekyll page
@gertoe
gertoe / Symlink: openjdk-8-openj9
Created November 13, 2019 11:39
Config files to install a custom java-vm in Gentoo Linux with support for java-config (Example: OpenJDK 8, OpenJ9)
@gertoe
gertoe / .block
Created May 26, 2018 18:39 — forked from mbostock/.block
Digital Clock
license: gpl-3.0
#!/bin/sh -x ## or just ` curl -Ls http://git.io/vRozn | sh `.
## Downloads the Mac OS X 10.10 Recovery Partition update,
## Copy's over the 10.10 version of Disk Utility.app, then
## use git to apply a binary patch so it will run on 10.11+.
cd /tmp
rm -rf DU1010
mkdir DU1010
@gertoe
gertoe / url_encode.rb
Created February 25, 2017 16:03 — forked from jonsuh/url_encode.rb
Jekyll URL Encode
# _plugins/url_encode.rb
require 'liquid'
require 'uri'
# Percent encoding for URI conforming to RFC 3986.
# Ref: http://tools.ietf.org/html/rfc3986#page-12
module URLEncode
def url_encode(url)
return URI.escape(url, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
end
@gertoe
gertoe / addFHD.sh
Last active September 18, 2021 02:11
helper scripts for switching monitor configuration on the fly
#!/bin/sh
if [[ $INTEL_DRV == true ]];
then
# intel driver --> not necessary (fhd-mode already included)
LVDS="eDP1"
#SWYM
exit 1;
else
# modesetting driver
#!/bin/sh
## returns string of percentage of memory used
bc <<< "(100*($(awk '/MemTotal/ {print $2}' /proc/meminfo) - $(awk '/MemFree/ {print $2}' /proc/meminfo) ) / $(awk '/MemTotal/ {print $2}' /proc/meminfo))";
exit 0;
@gertoe
gertoe / beweise_snippet.tex
Last active June 2, 2016 20:53
TeX-Snippet: zu-zeigen-Symbol
% definiere zu-zeigen-Symbol
\newcommand{\zz}{$\mathrm{z\kern-.3em\raise-0.5ex\hbox{z}}$}
\newcommand{\ZZ}{$\mathrm{Z\kern-.3em\raise-0.5ex\hbox{Z}}$}
% qed-Symbol für Text-Umgebung
\newcommand{\qed}{\hfill \ensuremath{\Box}}