Skip to content

Instantly share code, notes, and snippets.

#!ruby
#THIS SHIT MIGHT USE A LOT OF RAM, BUT THIS IS RUBY, RIGHT?
$LANGUAGE_SEPATOR_VER = "0.0.1"
class Program_Project
@files = nil
@rules = nil
@symbols = nil #Universal
@output = nil
@PedroHLC
PedroHLC / sdl2-example.vala
Last active January 9, 2023 21:37
SDL 2.0 Binding for Vala
using GLib;
using SDL;
public class Example {
protected static SDL.Window window;
public static void main () {
SDL.init ();
window = new Window ("Testing SDL 2.0 in Vala", Window.POS_CENTERED, Window.POS_CENTERED, 640, 480, WindowFlags.RESIZABLE);
@PedroHLC
PedroHLC / imbc_dm_gamecontrol.rb
Created July 8, 2013 23:00
IMBC's Digimon Masters Online - Alternative Game Starter
#IMBC's Digimon Masters Online - Alternative Game Starter
#Developed by PedroHLC <[email protected]>
#Version: 0.1 [WORKING]
#This script starts the game without Internet Explorer
require 'win32ole'
DIGITALIC_LAUNCHER_CLSID='{21CEC2FC-24FA-4EEB-A043-3CC248060880}'
DIGITALIC_LAUNCHER_PROGID='DIGITALICLAUNCHE.DigitalicLauncheCtrl.1'
$GameStartControl = WIN32OLE.new DIGITALIC_LAUNCHER_PROGID
@PedroHLC
PedroHLC / gmp4.PKGBUILD
Created September 28, 2013 13:52
AUR gmp4 PKGBUILD fixed
pkgname=gmp4
pkgver=4.3.2
pkgrel=2
pkgdesc="Legacy version of gmp. Provides 'libgmp.so.3'."
arch=('i686')
url="http://gmplib.org/"
depends=('gcc-libs' 'sh')
optdepends=('gmp')
license=('LGPL3')
options=('!libtool' '!buildflags')
@PedroHLC
PedroHLC / mingw32-smpeg-svn.PKGBUILD
Last active December 24, 2015 08:49
AUR mingw32-smpeg-svn remade
pkgname=mingw32-smpeg-svn
pkgver=412
pkgrel=0
pkgdesc="svn build of SDL2 MPEG Player Library (mingw32)"
arch=('any')
url="http://icculus.org/smpeg/"
license=('LGPL')
depends=('mingw32-sdl-hg' 'mingw32-runtime')
makedepends=('mingw32-gcc' 'svn')
optdepends=('mingw32-gtk: to use gtv ' 'mingw32-glu: to use glmovie')
# Maintainer: Maxime Gauduin <[email protected]>
# Contributors: M0Rf30, faidoc, sh4nks, PedroHLC
pkgname=lightdm-pantheon-greeter-bzr
pkgver=r274
pkgrel=0
pkgdesc="LightDM greeter from the ElementaryOS team written in Vala "
arch=('i686' 'x86_64')
url="https://launchpad.net/pantheon-greeter"
@PedroHLC
PedroHLC / make-avalanche-toolchain.sh
Created July 27, 2014 17:02
Generate an Android standalone toolchain for use with Avalanche
#!/usr/bin/sh
# Created by: PedroHLC <[email protected]>
# Version: 1.0
# This:
# 1. Compiles SDL2*, Chipmunk, GLib and libgee for Android (Platform-9 ARM)
# 2. Creates a standalone toolchain
# 3. Move some dynamics libraries that you should never use for an Android project
# 4. Points libpthread to Androd's libc
# Compatible with ArchLinux only
@PedroHLC
PedroHLC / qemu_wbox.sh
Last active October 10, 2017 01:15
QEmu: Emulating all physical HDDs + AHCI + VFIO PCI Passthrough (When available + auto binding)
#!/bin/bash
PCI_PASSTHROUGH_DEVS=('01:00.0' '01:00.1')
MOUNTED_STORAGES=($(mount | grep -oh "/dev/sd\w"))
MOUNTED_STORAGES_UNIQUE=($(echo "${MOUNTED_STORAGES[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '))
if dmesg | grep -i "vfio_pci: add" > /dev/null; then
export PCI_PASSTHROUGH_USING=1
vfiobind() {
dev="0000:$1"
@PedroHLC
PedroHLC / 0_Situation.txt
Last active January 5, 2018 00:23
VGA Passthrough Situation Diagnose
Passing GTX780 at BUS 5 (PCIEX4)
OVMF: works even from the moment bios starts - weird perfomance - fps variates a lot,
ACUnity and RE6 runs at half fps it should, system interface is
almost as smooth as native.
SeaBios: tested only Windows setup, which also works, I can see bios working too.
Passing GTX780 at BUS 1 (PCIEX16)
OVMF: error code 43
SeaBios: error code 43
Even with MSI forced, audio through HDMI is sometimes cracking, sometimes not,
@PedroHLC
PedroHLC / interpreter_regex_inpieces.txt
Last active January 9, 2023 21:35
Regex em Pedaços
Comentarios:
\#.*\n
\/\*(?:[^\*\\]|\\.)*\*\/
Strings:
"(?:[^"\\\n]|\\.)*"
'(?:[^'\\\n]|\\.)*'
Regex:
\/(?:[^\/\\\n]|\\.)*\/[gmixXsuUAJ]*
Heredocs:
\<{3}(?'end'\w+)\n(?'heredoc'.*)\n\k'end'