Skip to content

Instantly share code, notes, and snippets.

View rw-r-r-0644's full-sized avatar

rw-r-r-0644 rw-r-r-0644

  • Italy
  • 09:34 (UTC +02:00)
View GitHub Profile
char *iosu_cwd = "";
void iosu_init() {
iosu_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (iosu_socket < 0)
return;
struct sockaddr_in connect_addr;
memset(&connect_addr, 0, sizeof(connect_addr));
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <pthread.h>
pthread_t graphics_thread;
void graphics_thread()
{
#! /bin/sh
set -e
# Generate grub.cfg by inspecting /boot contents.
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB 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.
#! /bin/sh
set -e
# Generate grub.cfg by inspecting /boot contents.
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB 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.
@rw-r-r-0644
rw-r-r-0644 / 1337.c
Created May 14, 2017 14:53
1337 translator!
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define repl(a, b) if(str[i]==a)str[i]=b
int main(int argc, char *argv[])
{
char * str = calloc(strlen(argv[1] + 1), 1);
strcpy(str, argv[1]);
@rw-r-r-0644
rw-r-r-0644 / wiiu-reset
Created December 4, 2018 20:11
Comfortably reset the wiiu from a pc
#!/usr/bin/python
## Comfortably reset the wiiu from a pc
import os
import socket
import struct
# create socket
s = socket.socket()
@rw-r-r-0644
rw-r-r-0644 / coreinit.c
Last active February 28, 2019 20:01
RE of some coreinit functions
#include <wut.h>
/* 32 bit unix time_t */
typedef uint32_t time32_t;
/* coreinit: convert COS time to POSIX time */
time32_t __OSCalendarTimeToPOSIXTime(OSCalendarTime *td)
{
/* compute number of days to epoch */
uint32_t epoch_days = (1970 * 365) + GetLeapDays(1970);
@rw-r-r-0644
rw-r-r-0644 / install.txt
Last active April 6, 2019 17:23
WiiU support for meson in dkP pkgbuild-scripts
ONLY CONTAINS A TEMPORARY SOLUTION BEFORE DEVKITPRO IS UPDATED
DO NOT USE THIS PATCH UNLESS YOU ARE WORKING ON THE WIIU MESA PORT
- Replace /opt/devkitpro/meson-toolchain.sh with the file provided in this gist
- Create /opt/devkitpro/wiiuvars.sh with the file provided in this gist

Keybase proof

I hereby claim:

  • I am rw-r-r-0644 on github.
  • I am rw_r_r_0644 (https://keybase.io/rw_r_r_0644) on keybase.
  • I have a public key whose fingerprint is 4F49 A8DF BF20 C6D0 CDEE A496 9F89 C032 7918 7405

To claim this, I am signing this object:

@rw-r-r-0644
rw-r-r-0644 / bfrun.c
Last active May 31, 2019 16:21
Brainfuck interpreter
// Brainfuck interpreter
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
char m[30720] = {0}, *f = NULL;
int p = 0;
void dnth() {}