Skip to content

Instantly share code, notes, and snippets.

Carsten Teibes carstene1ns

View GitHub Profile
@carstene1ns
carstene1ns / dnsmasq.conf
Created May 1, 2018
Minimal dnsmasq configuration for Nintendo Switch homebrew launcher (https://switchbrew.github.io/nx-hbl/)
View dnsmasq.conf
#/etc/dnsmasq.conf
no-resolv
no-hosts
address=/ctest.cdn.nintendo.net/<IP of your Webserver>
#log-queries
@carstene1ns
carstene1ns / dump_romfs.rb
Created Apr 26, 2018
Simple tool to get a romFS image out of a .NRO file
View dump_romfs.rb
#!/usr/bin/env ruby
#
# dump_romfs.rb by carstene1ns, 2018 - under ISC License
#
# See http://switchbrew.org/index.php?title=NRO for reference
MAGIC = "NRO0"
HEADER = "ASET"
# helper
@carstene1ns
carstene1ns / fonts-noaa.conf
Created Oct 29, 2017
Better font rendering for RPG_RT.exe in wine
View fonts-noaa.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- load default settings -->
<include>/etc/fonts/fonts.conf</include>
<!-- disable anti-aliasing -->
<match target="font">
<edit mode="assign" name="rgba">
<const>none</const>
</edit>
@carstene1ns
carstene1ns / discord-bot-bridge.pl
Last active Aug 18, 2017
HexChat plugin to map bot messages in `<nick> message` format to messages coming from nick directly instead
View discord-bot-bridge.pl
# Name: discord-bot-bridge.pl
# Author: carstene1ns < dev f4ke de >
# Date: 2017-08-04
# License: This code is put in the public domain.
use strict;
use warnings;
use utf8;
use v5.26.0;
use HexChat;
@carstene1ns
carstene1ns / write_room_pics.rb
Created Jun 23, 2017
Creates the room description bars in the EasyRPG Testgame
View write_room_pics.rb
#!/usr/bin/ruby
rooms = Array[
"Message",
"Message options",
"Show face",
"Choices",
"Number input",
"Switch operation",
"Variable operation",
@carstene1ns
carstene1ns / libmad-pkg-config.diff
Created Oct 12, 2015
libmad pkg-config patch, adapted from Arch Linux package. Needs to run autoreconf.
View libmad-pkg-config.diff
diff -Naur libmad-0.15.1b.orig/configure.ac libmad-0.15.1b/configure.ac
--- libmad-0.15.1b.orig/configure.ac 2004-01-23 10:41:32.000000000 +0100
+++ libmad-0.15.1b/configure.ac 2015-10-12 05:51:12.514078692 +0200
@@ -26,7 +26,7 @@
AC_CONFIG_SRCDIR([decoder.h])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([foreign])
@carstene1ns
carstene1ns / unxxd.rb
Last active Jun 5, 2018
`xxd -i` creates header files with hexdumps of any raw file. This simple ruby script saves the content of the header file in raw form.
View unxxd.rb
#!/usr/bin/env ruby
# read
xxd = IO.read('file.xxd')
# values are comma separated
chars = xxd.split(',')
# with whitespaces
chars.map! {|c| c.strip}
# in hex
chars.map! {|c| c.to_i(16)}
@carstene1ns
carstene1ns / .gitattributes
Last active Aug 29, 2015
git diff output for rpg maker files using easyrpg's lcf2xml tool
View .gitattributes
*.lmu diff=easyrpg
@carstene1ns
carstene1ns / recursive maildir-deduplicate
Created Nov 29, 2013
After migrating from google mail, I had a bunch of mails more than once. It happens because gmail uses tags that are converted to folders when moving with imapsync. The following one-liner shows (and optionally removes without '-n') all duplicated mails.
View recursive maildir-deduplicate
find $HOME/Maildir -type d -not \( -path "*/cur" -or -path "*/new" -or -path "*/tmp" -or -path "*/.Trash" \) -exec ./maildir-deduplicate.py -n {} +
You can’t perform that action at this time.