Skip to content

Instantly share code, notes, and snippets.

View SonoSooS's full-sized avatar

Sono SonoSooS

  • Hungary
  • 21:20 (UTC +02:00)
View GitHub Profile
@SonoSooS
SonoSooS / ctrufont2png.cs
Created July 9, 2016 19:49
Extracts ctrulib's default_font.bin to a transparent .png file
using System;
using System.IO;
using System.Drawing;
class Program
{
static Color transparent = Color.FromArgb(0, 0, 0, 0);
static Color black = Color.FromArgb(0xFF, 0, 0, 0);
public static void Main(String[] args)
@SonoSooS
SonoSooS / Makefile
Created August 12, 2016 23:52
public Makefile for compiling Python27 for the 3DS
#---------------------------------------------------------------------------------
# Makefile by MarcusD (https://github.com/MarcuzD) © $(date +"%Y")
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro")
endif
ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
@SonoSooS
SonoSooS / catcat.sh
Last active August 31, 2016 19:37
cat
#!/bin/bash
#Copyright MarcusD 2016
echo cat>cat && cat cat | cat <cat >>cat
@SonoSooS
SonoSooS / MCUBrick.c
Created September 14, 2016 17:24
3DS RGB LED test program
#include <3ds.h>
Handle ptmsysmHandle = 0;
Result ptmsysmInit()
{
return srvGetServiceHandle(&ptmsysmHandle, "ptm:sysm");
}
@SonoSooS
SonoSooS / bandcamp.lua
Last active February 18, 2021 19:05
Bandcamp VLC plugin
--[[--
bandcamp.lua - Bandcamp album/track player plugin
Copyright (C) 2016-2018 Sono (https://github.com/MarcuzD)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
@SonoSooS
SonoSooS / nowplaying.php
Last active November 8, 2016 18:28
very basic VLC "Now playing" script
<?
/*
The MIT License (MIT)
Copyright (c) 2016 MarcusD
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@SonoSooS
SonoSooS / bf.cpp
Created November 19, 2016 11:33
Terraria Mobile Blowfish savefile crypter
/*
Terraria Mobile Blowfish savefile crypter
Copyright (C) 2016 MarcusD (https://github.com/MarcuzD)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@SonoSooS
SonoSooS / kagiya.sh
Created November 27, 2016 19:46
kagiya-ctr checker and notifier
#!/bin/bash
# ===================================
# kagiya-ctr checker bash script
#
# created by MarcusD
# Copyright $(date +"%Y")
#
# :P
# ===================================
@SonoSooS
SonoSooS / chdir.c
Last active January 15, 2018 22:06
the most overcomplicated chdir implementation
void chdir(const char* path)
{
if(*path == '/')
{
strncpy(root, path, 262);
}
else
{
int len = 262 - strnlen(root, 262);
@SonoSooS
SonoSooS / distbuild3.sh
Created December 21, 2016 20:22
Python distutils bug workaround
#!/bin/bash
while :; do
ASD="$(env CC=gcc python3 setup.py build 2>/dev/null)"
if [ $? -eq 0 ]; then
echo "yay, success"
break
fi
CMD="$(echo "$ASD" | tail -n1 | sed 's/^x86_64-linux-gnu-gcc/gcc/')"
eval $CMD