Skip to content

Instantly share code, notes, and snippets.

@bashaus
bashaus / generate-pot.sh
Created January 3, 2018 15:52
Generates a .POT file to provide a template for translating a WordPress plugin or template
# Dependencies
# - *NIX or Mac operating system
# - gettext installed
#
# Instructions
# - Run this script in the root directory of your theme or plugin
#
# About WordPress L10N functions:
# @see https://codex.wordpress.org/L10n
#
@bashaus
bashaus / _interrupt.c
Last active August 29, 2015 14:27
Enable, disable and switch between interrupts (LCD, VBLANK) in GBDK (Game Boy C)
void (*VBLANKListener)();
void noop() { /* Do nothing */ }
void MainVBLANK() {
disable_interrupts();
(*VBLANKListener)();
enable_interrupts();
}
void main() {
@bashaus
bashaus / fade.c
Created June 13, 2015 13:33
Game Boy Color fade script
#include <gb/gb.h>
#include "fade.h"
UWORD FadePalette[32] = {
RGB(30,0,0), RGB(0,30,0), RGB(0,0,30), RGB(0,0,0)
};
void Fade(UWORD *org_p, FadeDirection direction, FadeColor color, UWORD speed)
{
UBYTE i,x;
# encoding: utf-8
xml.instruct!
# Drop this file in your source/ directory
#
# Uses the builder gem.
# Add this to the Gemfile:
# gem 'builder', '~> 2.0'
# Then run:
# builder install