Skip to content

Instantly share code, notes, and snippets.

@yifanlu
yifanlu / safe-homebrew-psa.md
Created October 28, 2016 15:21
PSA for homebrew devs

The next update for HENkaku will be a major one and in order to protect the safety of our users, we are making two changes that might affect how your homebrew runs:

  • Safe Homebrew will be outputted by default by the toolchain. Currently, you must specify a flag for marking your homebrew as safe. In the future you will do the opposite. By default, homebrew will be marked as safe. If you wish to use unsafe/vsh functions you must build with an unsafe flag. A warning will show up if you attempt to use unsafe/vsh functions in a safe homebrew and it will not work by default on the Vita. More information about the specific SDK changes will be posted at a later date.
  • Unsafe Homebrew will be blocked by default on HENkaku enabled consoles. To run unsafe homebrew, the user must set a configurable option. Unsafe homebrew will not be launchable by default. This is basically how Android does it.

If your homebrew currently builds with the vita-make-fself -s flag, you do not have to do anything! Your homebrew is alr

@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 / WifiResetThreedee.c
Created July 8, 2016 23:13
Resets the WiFi on the new3DS
#include <3ds.h>
int main()
{
Handle nwmEXT_handle;
aptMainLoop();
if(R_FAILED(srvGetServiceHandle(&nwmEXT_handle, "nwm::EXT"))) return 1;
@SonoSooS
SonoSooS / b2bin.c
Last active July 3, 2016 00:32
Converts SmileBASIC .DAT files to real little-endian binary files
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
typedef unsigned long long u64;
typedef unsigned int u32;
typedef unsigned short u16;
typedef unsigned char u8;
int main(int argc, char** argv)
@SonoSooS
SonoSooS / TRAMEXPLORER
Last active July 1, 2016 21:45
RAM explorer and dumper for SmileBASIC
XSCREEN 2
BGSCREEN 0,134217728,16
A=0
C=1
U=0
K=0
S=0
SM=0
EM=0
@MAINLOOP
@indrora
indrora / 00readme.md
Last active November 12, 2021 07:24
DeadUpdate: Kickin' it bigtime.

... my first disclosure. Man, it feels weird doing this.

update 6/6/16 I would like to stress something: I'm not saying "Don't buy an ASUS device" -- I see a lot of people who want to lambaste ASUS for this and boycott their hardware. This isn't what I want people to be doing by any stretch. Stupidly, I like the ASUS hardware I have (it's nice for the price) and I would rather see a pressure on ASUS as an OEM to stop shipping "value added software" to consumers; If you want to help Microsoft in pushing this mentality, go buy a signature machine from them. Microsoft provides support, but also only ships windows and a few select utilities that are essential to the functioning of the system (think: Radeon/Optimus and nVidia control panels) and fall heavily on the hardware makers (ATI, nVidia, Intel) to provide support for the harware.

Consider an ASUS device all you want. Start putting pressure on Microsoft that consumers want bloat-free devices and start voting with your money. Microsoft's store

@SonoSooS
SonoSooS / sc_xspf.php
Last active May 11, 2016 16:43
SoundCloud XSPF emitter PHP script
<?
/*
SoundCloud XSPF playlist generator / track redirector
Made by MarcusD
Usage examples:
sc_xspf.php?username/sets/playlistname
sc_xspf.php?username/trackname
sc_xspf.php?https://soundcloud.com/username/sets/playlistname
sc_xspf.php?https://soundcloud.com/username/trackname
@TuxSH
TuxSH / _AMPXI_CanInstall.c
Last active June 15, 2016 10:45
Version check before install
/* ... code ... */
for ( i = 0; i < v4; ++i )
{
sub_2F5F4(&v40, &v34, 8);
v7 = sub_2E72C(v41, v42);
v8 = (*(int (**)(void))(*(_DWORD *)v7 + 4))();
if ( v8 < 0 )
{
v9 = v8;
LABEL_18:
@marcan
marcan / brainfuck.sh
Created April 22, 2016 01:27
Brainfuck interpreter in POSIX sh
#!/bin/sh
# Brainfuck interpreter implemented in pure POSIX sh builtins only (except I/O)
# Tested in bash and busybox ash (getchar uses a bash-specific read)
# === I/O ===
getchar() {
# bashism
IFS= read -rN 1 a
if [ -z "$a" ]; then
echo $th
@yifanlu
yifanlu / gist:e80db121d38aceb8cca0e03cefd5853b
Last active January 29, 2025 21:21
3DS System Transfer + NNID & eShop on new region
This is an ADVANCED guide and should not be attempted by anyone who does not COMPLETELY understand each step and what it does to their device. Additionally, the prerequisite is that you have already performed a region change on your 3DS. You also need access to another 3DS on the target region that you can format to a non-NNID linked state (you can use emuNAND here). For simplicity, I am going to assume you are region changing a N3DS from Japan to USA and have access to a USD O3DS. The guide is in two parts: System Transfer and NNID Linking. For those who wish to just have access to USA eShop (and the ability to download free games; if you only want to use eShop to purchase games, you do not have to link a NNID) you can skip to the second part.
To modify requests, I use Charles Proxy to set breakpoints so I can change requests and responses as they come in. However, you can do it in any why you choose. Also, since 9.2 eShop was disabled, you may have to additionally modify all requests from the 3DS to send a