Skip to content

Instantly share code, notes, and snippets.

View rofl0r's full-sized avatar

rofl0r

View GitHub Profile
@JShorthouse
JShorthouse / gba-gcc-compiling-linux.md
Last active May 25, 2024 18:19
Compiling GBA programs on Linux with GCC

Compiling GBA programs on Linux with GCC

There is a strange lack of guides and tools online for compiling Gameboy Advance homebrew programs on Linux. I didn't want to use devkitpro - their installation method of requiring you to use a forked version of pacman is extemely strange and I didn't want to install all of that on my system just to complile some programs.

The only other guides I found for Linux were this one and this one which both involve compiling custom versions of GCC and assosicated libraries. This lead me down a road of pain, after spending multiple hours fixing compiler errors only to create new errors I gave up. I thought that their had to be a simpler way, and there is!

The solution

Debian already has a version of GCC that can compile ARM programs in the repos, no manual compiling necessary! The package is called arm-none-eabi-gcc.

@kevinhendricks
kevinhendricks / python3_fixes_with_bs4_support.patch
Created August 30, 2015 17:47
google/gumbo-parser patch to allow gumboc.py to work with both python 2 and 3 and add BeautifulSoup4 support for both
diff --git a/python/gumbo/bs4_adapter.py b/python/gumbo/bs4_adapter.py
new file mode 100644
index 0000000..5a8d273
--- /dev/null
+++ b/python/gumbo/bs4_adapter.py
@@ -0,0 +1,183 @@
+# -*- coding: utf-8 -*-
+# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
+
+from __future__ import unicode_literals, print_function
#!/bin/awk -f
# use: print-pkg-build-order.awk <package> [<package>...]
# prints all packages that would be built by building <package>(s), in build order.
BEGIN {
if (!ENVIRON["S"]) {
error("$S is not set. be sure to source config: . ./config")
}
if (ARGC<2) {
error("please provide one or more packages to print the build order for.")
}
@codebrainz
codebrainz / c99.l
Created June 14, 2012 23:49
C99 Lex/Flex & YACC/Bison Grammars
D [0-9]
L [a-zA-Z_]
H [a-fA-F0-9]
E ([Ee][+-]?{D}+)
P ([Pp][+-]?{D}+)
FS (f|F|l|L)
IS ((u|U)|(u|U)?(l|L|ll|LL)|(l|L|ll|LL)(u|U))
%{
#include <stdio.h>
@carlohamalainen
carlohamalainen / shrink_pdf.sh
Created November 8, 2011 00:46
Shrink a PDF file by transferring to DJVU, then PS, then back to PDF.
#!/bin/bash
set -o nounset # explode on undefined variables
set -e # explode if any command fails
# Best way to shrink a PDF of scanned pages without losing quality. Found on
# http://ubuntuforums.org/archive/index.php/t-1133357.html
# example: ./shrink_pdf.sh big_file.pdf 600 small_file.pdf