Skip to content

Instantly share code, notes, and snippets.

☕️

Carsten Teibes carstene1ns

Block or report user

Report or block carstene1ns

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@derrekr
derrekr / tex.c
Created Jul 26, 2018
3ds texture swizzling pseudo code
View tex.c
// stolen from smdhtool (which stole it from 3ds_hb_menu)
static const u8 tileOrder[] =
{
0, 1, 8, 9, 2, 3, 10, 11, 16, 17, 24, 25, 18, 19, 26, 27,
4, 5, 12, 13, 6, 7, 14, 15, 20, 21, 28, 29, 22, 23, 30, 31,
32, 33, 40, 41, 34, 35, 42, 43, 48, 49, 56, 57, 50, 51, 58, 59,
36, 37, 44, 45, 38, 39, 46, 47, 52, 53, 60, 61, 54, 55, 62, 63
};
static __attribute__((always_inline, optimize(3))) inline u32 NDS3D_Reverse32(u32 val)
@pulsejet
pulsejet / mkxp_mruby.md
Last active May 5, 2018
Guide for mkxp with mruby
View mkxp_mruby.md

mkxp + mruby = ❤

RGSS Script Changes

Language differences

Replace all instances of

begin
    statement
end until condition

with

@LiquidFenrir
LiquidFenrir / gist:d110f3e7755ffbe82672eda49ae21af2
Last active Oct 13, 2018
gdb 101 for 3ds, credits to Stary
View gist:d110f3e7755ffbe82672eda49ae21af2
1. enable debugger in rosalina menu
go to process list
select a process
2. launch arm-none-eabi-gdb <path to elf>
command "target remote ip:port"
3. command "continue" or "c" to resume execution
4.
View py3lock.py
#!/usr/bin/python
import os
import xcb
from xcb.xproto import *
from PIL import Image, ImageFilter
XCB_MAP_STATE_VIEWABLE = 2
def screenshot():
@nicolashery
nicolashery / solarized-dark.css
Last active May 18, 2019 — forked from scotu/solarized.css
Solarized theme stylesheets for Jekyll and Pygments
View solarized-dark.css
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
@armornick
armornick / playwav.c
Created Aug 24, 2012
Play a sound with SDL2 (no SDL_Mixer)
View playwav.c
#include <SDL2/SDL.h>
#define MUS_PATH "Roland-GR-1-Trumpet-C5.wav"
// prototype for our audio callback
// see the implementation for more information
void my_audio_callback(void *userdata, Uint8 *stream, int len);
// variable declarations
static Uint8 *audio_pos; // global pointer to the audio buffer to be played
View plugin_management.rb
module Cinch
module Plugins
class PluginManagement
include Cinch::Plugin
match(/plugin load (\S+)(?: (\S+))?/, method: :load_plugin)
match(/plugin unload (\S+)/, method: :unload_plugin)
match(/plugin reload (\S+)(?: (\S+))?/, method: :reload_plugin)
match(/plugin set (\S+) (\S+) (.+)$/, method: :set_option)
def load_plugin(m, plugin, mapping)
View slugify.js
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
You can’t perform that action at this time.