Skip to content

Instantly share code, notes, and snippets.


Rodrigo Silva MestreLion

  • Rio de Janeiro, Brazil
View GitHub Profile
sigsegv-mvm / TEX_file_format.txt
Last active Oct 29, 2022
Reverse-engineered EXAPUNKS ".TEX" texture file format details
View TEX_file_format.txt
Reverse engineering by sigsegv, 20180914.
All values are little-endian.
0x00 int: TEX file version / magic number [1002 = 0x000003EA]
0x04 int: data resolution [x]
0x08 int: data resolution [y]
0x0C int: color format { 0 => invalid, 1 => 8BPP, 2 => RGBA }
0x10 int: display resolution [x]
wafer-li /
Last active Jul 31, 2021
Restore file last modified time in a newly clone repo.Which base on the file's last commited time. Tested with python 3.4 and above
# -*- coding: utf-8 -*-
import subprocess
import os
import shlex
if __name__ != '__main__':
raise ImportError("%s should not be used as a module." % __name__)
# 'git ls-files -z | xargs -0 -n1 -I{} -- git log -1 --format="%ct {}" {} | sort'
simivar / print_r_reverse.php
Last active Jun 18, 2022
PHP function to reverse print_r function
View print_r_reverse.php
* I've published a fully-tested Composer library with type-casting.
* @see
* Matt: core
* Trixor: object handling
* lech: Windows suppport
mivade /
Last active Nov 18, 2022
Using a decorator to simplify subcommand creation with argparse
"""This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
from __future__ import print_function
import json
import sys
import re
import hashlib
from os import makedirs, path, remove
from getpass import getpass
from urlparse import urlparse
konklone / ssl.rules
Last active Aug 3, 2022
nginx TLS / SSL configuration options for
View ssl.rules
# Basically the nginx configuration I use at
# I check it using
# To provide feedback, please tweet at @konklone or email
# Comments on gists don't notify the author.
# Thanks to WubTheCaptain ( for his help and ciphersuites.
# Thanks to Ilya Grigorik ( for constant inspiration.
server {
aperson /
Last active Dec 14, 2021
Updates the lwjgl that minecraft uses.
#!/usr/bin/env bash
echo "Determining OS..."
if [[ "$(uname -s)" == "Linux" ]]; then
downloader="wget --no-check-certificate -q -O"
natives="libjinput-linux libjinput-linux64 liblwjgl liblwjgl64 libopenal libopenal64"
elif [[ "$(uname -s)" == "Darwin" ]]; then
cdown / gist:1163649
Last active Nov 11, 2022
Bash urlencode and urldecode
View gist:1163649
urlencode() {
# urlencode <string>
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in
KevinGoodsell / terminals.txt
Created Dec 17, 2010
The Trouble With Terminals
View terminals.txt
The Trouble With Terminals
Thu, 16 Dec 2010 16:43:20 -0800
Copyright 2010 Kevin Goodsell
0. License
This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a