Skip to content

Instantly share code, notes, and snippets.

View Francesco149's full-sized avatar
:shipit:
memes

lolisamurai Francesco149

:shipit:
memes
  • /dev/memes
  • Italy
View GitHub Profile
/*
* some methods in love live school idol festival have obfuscated strings. not
* sure if this is a thing built into java or if it's some known obfuscator,
* but either way this is a small tool to decipher them
*
* the pseudocode will usually look something like this
*
* ```c
* v6 = "ke|RarsmsnRapeawi";
* v7 = 2;
/*
basic doom-style 3D demo in pure software rendering in < 400 LOC.
sdl is only used to blit the finished frame to a window and handle input
heavily inspired by
[bisqwit's qbasic demo](https://youtu.be/HQYsFshbkYw?t=42s)
![](https://media.giphy.com/media/xUOwGeOoHG9u6DX6W4/giphy.gif)
# rationale
#include <stdio.h>
#include <stdint.h>
#include <string.h>
/* the keys are ecoded as arrays of bit indices to set. the result
string is treated as a big integer */
/* only key6 is actually used, the others use bit arrays that
overlap with eachother in the game's memory so they're probably
only there for obfuscation */
!# ______ __ __ __ __ ______ ______ ______ __ ______
!# /\ ___\ /\ \_\ \ /\ "-.\ \ /\ __ \ /\ == \ /\__ _\ /\ \ /\ ___\
!# \ \___ \ \ \____ \ \ \ \-. \ \ \ __ \ \ \ _-/ \/_/\ \/ \ \ \ \ \ \____
!# \/\_____\ \/\_____\ \ \_\\"\_\ \ \_\ \_\ \ \_\ \ \_\ \ \_\ \ \_____\
!# \/_____/ \/_____/ \/_/ \/_/ \/_/\/_/ \/_/ \/_/ \/_/ \/_____/
!#
!# General
border.width: 1
syntax on
set number
highlight LineNr ctermfg=darkgrey
set expandtab
set shiftwidth=4
set smarttab
set tabstop=4
set autoindent
set nowrap
@Francesco149
Francesco149 / minupload
Last active February 14, 2019 10:38
minimal file sharing/upload server example in python 2.7
#!/usr/bin/env python
"""
minimal example of a file sharing service in python 2.7 using only built-ins
there is no error check or security, this is meant to be as a base/reference
to quickly get started
This is free and unencumbered software released into the public domain.
http://unlicense.org/
diff --git a/audio/AudioInput.cpp b/audio/AudioInput.cpp
index 674b955..4039021 100644
--- a/audio/AudioInput.cpp
+++ b/audio/AudioInput.cpp
@@ -56,6 +56,7 @@ AudioInput *AudioInput::Create(std::string deviceID){
#endif
return new AudioInputWASAPI(deviceID);
#elif defined(__linux__)
+#ifndef LIBTGVOIP_WITHOUT_PULSE
if(AudioInputPulse::IsAvailable()){

Setting up ati/radeon acceleration on Sabotage Linux

With the recent addition of mesalib-radeon with gallium radeon drivers, many modern radeon gpu's are now fully supported with 3D acceleration.

Note that, while I have a working system with these radeon drivers, these guidelines are purely written from what I remember doing and are not tested on a clean install. Please report any mistakes or missing steps.

@Francesco149
Francesco149 / pitcairn_linux_clock_fix.md
Last active September 9, 2022 18:41
Gain massive GPU performance for Southern Islands AMD GPUs on Linux by removing DPM quirks in the kernel

Gain massive GPU performance for Southern Islands AMD GPUs on Linux by removing DPM quirks in the kernel

I recently found out that my r9 270x GPU was not hitting full clock speeds because it was being throttled by the kernel based on old bug reports on DPM stability. This was an easy fix on gentoo where recompiling the kernel is trivial, but on ubuntu and similar, rebuilding the kernel is not so straightforward, so here's a guide based on ubuntu 16.04 LTS. If you run gentoo or know what you're doing you can just skip to the relevant code.

On my r9 270x, this resulted in an overall improvement in frame-rates of up to 50%: Unigine Valley went from something like 30-40 fps average to 55-60 and osu! (running in wine) went from 0.33 ms (~3000fps) to 0.25ms (~4000fps).

Note that I'm no linux god and all this info was pieced together by googling and asking on forums (credits to the guys at phoronix for pointing me to the quirks code).

If you're using the proprietary amdgpu-pro driver, read until the end of the

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
    GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,