Skip to content

Instantly share code, notes, and snippets.

View SonoSooS's full-sized avatar

Sono SonoSooS

  • Hungary
  • 03:42 (UTC +02:00)
View GitHub Profile
@SonoSooS
SonoSooS / update-java.sh
Last active January 1, 2016 21:06
Makes JAVA_HOME as the new Java installation folder
cd $JAVA_HOME; for feil in bin/*; do if [ -f $feil -a -x $feil ]; then sudo update-alternatives --install /usr/$feil `basename $feil` $JAVA_HOME/$feil 8001; fi; done;
@SonoSooS
SonoSooS / resset.sh
Last active April 17, 2016 17:34
Simple resolution setter for Linux
LEL=`cvt $2 $3 $4 | grep "Modeline" | cut -b10- | tr -s " " | sed 's/\([0-9]*x[0-9]*\)_[^\"]*/\1/g'`;NAEM=`echo $LEL | cut -d'"' -f2`;echo $LEL | xargs xrandr --newmode;xrandr --addmode $1 $NAEM;xrandr --output $1 --mode $NAEM
@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
@SonoSooS
SonoSooS / lcm.c
Created May 11, 2016 19:02
Very plain LargestCommonMultiple calculator
#include <stdio.h>
typedef unsigned long long u64;
u64 lcm(u64 f, u64 s)
{
u64 n1, n2;
if(f > s) { n1 = f; n2 = s; }
else { n1 = s; n2 = f; }
@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
@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 / 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");
}