Skip to content

Instantly share code, notes, and snippets.

View keeferrourke's full-sized avatar
🎯
Focusing

Keefer Rourke keeferrourke

🎯
Focusing
View GitHub Profile
@keeferrourke
keeferrourke / install-google-fonts.sh
Last active May 22, 2023 12:38
A bash script to install all Google Fonts, system wide, on debian based systems (ex. Ubuntu)
#!/bin/sh
# Written by: Keefer Rourke <https://krourke.org>
# Based on AUR package <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-google-fonts-git>
# dependancies: fonts-cantarell, ttf-ubuntu-font-family, git
sudo apt-get install fonts-cantarell ttf-ubuntu-font-family git
srcdir="/tmp/google-fonts"
pkgdir="/usr/share/fonts/truetype/google-fonts"
giturl="git://github.com/google/fonts.git"
@keeferrourke
keeferrourke / Makefile
Last active November 20, 2020 21:49
Generic Makefile
# Generic makefile for a C project
# Written by Keefer Rourke <mail@krourke.org>
#
# This file is Public Domain or, in places where public domain works
# are not recognized, licensed as CC0. Legal text:
# <https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt>
#
# This Makefile should not rely and any GNU-specific functionality,
# though it is based on the GNU make documentation which is available
# at: <https://www.gnu.org/software/make/manual/make.html>
@keeferrourke
keeferrourke / flac2opus
Last active February 26, 2024 19:26
This is a script to convert all flac files in a given directory to ogg/opus. I wrote this because mp3 kinda sucks and opus is a free format that is pretty much taking over the internet.
#!/bin/bash
# Copyright 2017 Keefer Rourke <mail@krourke.org>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCNUMBERLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
@keeferrourke
keeferrourke / keybase.md
Last active November 29, 2017 12:39
Keybase authentication

Keybase proof

I hereby claim:

  • I am keeferrourke on github.
  • I am krourke (https://keybase.io/krourke) on keybase.
  • I have a public key ASAZ_FRl1jykR2lt8ZfCra7NvkslCSZS7wqtJD1nnYNIWgo

To claim this, I am signing this object:

@keeferrourke
keeferrourke / bin-reflected-graycode.go
Created December 15, 2017 15:57
This is a simple program to generate and print the binary reflected Gray code for n-digits. Supply "n" as the single argument when calling the program.
package main
import (
"fmt"
"log"
"os"
"strconv"
)
func grayCode(seed []string, len int) []string {
@keeferrourke
keeferrourke / .clang-format
Last active June 5, 2019 16:09
Easily accessible clang-format rules for my own sanity
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
@keeferrourke
keeferrourke / userChrome.css
Created May 20, 2018 21:43
User chrome styling to move window controls to the left for Firefox 60+ CSD on Linux
/* place in $HOME/.mozilla/firefox/<default profile>/chrome/
* you may need to create this directory
*
* credit goes to this answer on Ask Ubuntu https://askubuntu.com/questions/1035428/firefox-60-csd-window-buttons-left
*/
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#titlebar-max {
-moz-box-ordinal-group: 0;
}
@keeferrourke
keeferrourke / latexcompile
Created May 28, 2018 04:03
Simple bash script to compile a LaTeX document with pdflatex, and clean up auxillary output files.
#!/bin/bash
#
# latexcompile
# Keefer Rourke <mail@krourke.org>
#
# To the extent possible under law, the person who associated CC0 with
# latexcompile has waived all copyright and related or neighboring rights
# to latexcompile.
#
# See <http://creativecommons.org/publicdomain/zero/1.0/> for a copy of
@keeferrourke
keeferrourke / gitqstats.sh
Last active December 7, 2018 01:44
Quick script that generates some pretty stats about a git repository on a quarter-by-quarter basis. Written for some basic analysis of our many repositories over at https://rightmesh.io
#!/usr/bin/env bash
# exit codes
EX_OK=0
EX_ERR=1
EX_USAGE=64
# default argument values
since_year=2015
until_year=$(date +%Y)
@keeferrourke
keeferrourke / JvmAccessModifiers.kt
Created June 5, 2019 16:08
Make some sense of JVM access modifiers
import org.objectweb.asm.Opcodes
data class AccessModifier(val code: Int, val name: String)
enum class ClassPart {
CLASS,
METHOD,
FIELD,
MODULE,
MODULE_REQUIRES