Skip to content

Instantly share code, notes, and snippets.

@Hiradur
Hiradur / ogre1.8osx.patch
Last active December 22, 2015 15:52
Patch to build Ogre 1.8 on OS X 10.10 Yosemite
diff -r edccf8cc52e3 CMakeLists.txt
--- a/CMakeLists.txt Fri Jun 20 00:53:20 2014 +0200
+++ b/CMakeLists.txt Sun May 24 15:45:17 2015 +0200
@@ -235,10 +235,6 @@
string (REPLACE "-msse" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
elseif (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
- # Set 10.5 as the base SDK by default
- set(XCODE_ATTRIBUTE_SDKROOT macosx)
- set(CMAKE_OSX_SYSROOT macosx)
@Hiradur
Hiradur / q3config.cfg
Last active February 29, 2016 09:21
OpenArena config optimized for Raspberry Pi: maximum fps without compromising usability
// generated by quake, do not modify
unbindall
bind TAB "+scores"
bind ENTER "+button2"
bind ESCAPE "togglemenu"
bind SPACE "+moveup"
bind + "sizeup"
bind - "sizedown"
bind / "weapnext"
bind 0 "weapon 10"
@Hiradur
Hiradur / Solarized Light Everywhere
Last active January 14, 2017 10:50
Userstyle for the Firefox addon Stylish which enables Solarized Light for every webpage (modification of Solarized Dark Everywhere by thedude, licensed under CC0)
/* Solarized Light Theme for every webpage for the Stylish addon for Firefox */
/* Adopted from the Solarized Dark Everywhere theme by thedude: https://userstyles.org/styles/98305/solarized-dark-everywhere */
/* AGENT_SHEET */
@-moz-document url-prefix(http://), url-prefix(https://), url-prefix(ftp://), url-prefix(file://), url(about:blank),
/* Best effort to exclude about pages that conflict with Australis-native styling */
regexp("about:(?!addons|app-manager|config|customizing|stylish-edit|downloads|permissions|preferences|sync-tabs|webrtc).*")
/*url-prefix("about:neterror")*/
@Hiradur
Hiradur / theme_toggle.sh
Created November 6, 2016 13:16
Shell script to toggle between Solarized Light/Dark theme in various applications
#!/bin/sh
# theme_toggle.sh
# Original author: Hiradur
# License: CC0
# Description: Toggle between two themes for various applications
# designed for the Solarized themes by Ethan Schoonover
# This script toggles between a light and a dark theme for various applications
# by replacing the corresponding option(s) in their config files
@Hiradur
Hiradur / glshim.sh
Last active September 12, 2021 07:56
Shell sript to build glshim and and run games with it on Raspberry Pi
#!/bin/sh
# Original author: Hiradur
# License: CC0
# Purpose: Build and update glshim, glues and TinyGLES, set up correct paths for programs
set -eu # stop script on errors
GLWRAPPER_INSTALL_DIR=~/glwrapper # source code and binary files will be placed here
# if no arguments are given
# download/update glshim, glues and tinygles code and compile
@Hiradur
Hiradur / toggle_theme_gtk_qt.sh
Last active May 29, 2022 10:49
Shell script to toggle between light and dark theme for GTK and QT applications
#!/bin/sh
# toggle_theme_gtk_qt.sh
# Original author: Hiradur
# License: CC0
# This script toggles between light and dark theme for GTK and QT applications
if [ $(gsettings get org.gnome.desktop.interface gtk-theme) = "'Adwaita-dark'" ]; then
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita"
@Hiradur
Hiradur / toggle_stereo_surround.sh
Last active May 29, 2022 10:55
Shell script to toggle Pulseaudio output profile between stereo and surround sound on the same audio device
#!/bin/sh
# toggle_stereo_surround.sh
# Original author: Hiradur
# License: CC0
# This script toggles between stereo and surround output.
# It is useful e.g. if you your AVR only provides matrix-decoding of surround
# sound for stereo sources.
# The sink name might need to be changed based on what `pacmd stat` lists as
@Hiradur
Hiradur / toggle_av_setups.sh
Last active May 29, 2022 11:01
Shell script to toggle video and audio output between two setups (different displays and audio systems) using X.org and Pulseaudio
#!/bin/sh
# toggle_av_setups.sh
# Original author: Hiradur
# License: CC0
# This script toggles video and audio output between two setups:
# 1. monitor with stereo speakers on desk
# 2. TV with 5.1 surround sound
# only one of these screens is enabled at a given time
@Hiradur
Hiradur / adwaita_dark_everywhere_stylus.css
Created May 29, 2022 11:08
Color theme for the Stylus browser addon using colors from the Adwaita Dark theme
@-moz-document url-prefix("file://"), regexp("https?:\\/\\/(?!(www\\.)?(computerbase?!(\\/forum)|docs\\.google|forum\\.xda-developers|github|startpage|steamcommunity|userstyles|youtube)\\..*).*") {
/*
* Global Adwaita-dark Stylus theme
* This theme applies a color scheme similar to Adwaita-dark to every webpage
* This theme is based on Solarized Dark Everywhere by thedude (CC0 licensed):
* https://userstyles.org/styles/98305/solarized-dark-everywhere
* which in turn was based on Midnight Surfing Alternative by luckymouse (CC0 licensed)
* https://userstyles.org/styles/47391/midnight-surfing-alternative
*
* Author of this theme: Hiradur
@Hiradur
Hiradur / setup_ambisonics_on_gpu.sh
Last active May 29, 2022 17:12
Guide for setting up an Ambisonics playback system on GNU/Linux using consumer equipment such as a GPU and an AV-receiver
#!/bin/sh
# Setting up an Ambisonics listening rig using consumer hardware
# This guide was tested on Ubuntu Linux using an Nvidia GPU, a consumer-grade 5.1 av-receiver and audio transmission via HDMI.
# install necessary software
sudo apt install qjackctl ambdec mpv
# launch Qjackctl and start JACK on a sound card that is not the GPU
qjackctl