Skip to content

Instantly share code, notes, and snippets.

View rr-'s full-sized avatar
❄️

Marcin Kurczewski rr-

❄️
View GitHub Profile
@rr-
rr- / shiina-rio-unpack
Created October 27, 2015 21:07
Shiina Rio .exe decoder
#!/bin/python3
import struct
import argparse
# tested on:
# - Sorcery Jokers (works)
# - Tekoire Princess (needs manual tweaks to work)
# so it's only semi-automatic.
def read_u16(data, offset):
#!/usr/bin/env python3
# copy me into $repository_root/.git/hooks/
import os
import sys
import typing as T
from pathlib import Path
from subprocess import PIPE, run
BRANCHES_TO_SKIP: T.List[str] = os.environ.get(
"BRANCHES_TO_SKIP", "master staging develop test production"
@rr-
rr- / EmailObfuscator.php
Last active December 26, 2015 16:29
E-mail anti-spam protection using Javascript/PHP obfuscation.
<?php
class EmailObfuscator
{
public static function embedJavascript($x, $justPlainText = false)
{
$seed = mt_rand(0, 10000);
$x = str_split($x);
//permutation
$a = 0;
@rr-
rr- / gist:74d246112ed517f889ee
Created May 3, 2015 14:18
ctrl+tab in libvte
diff --git a/src/keymap.cc b/src/keymap.cc
index a2df529..fe0d969 100644
--- a/src/keymap.cc
+++ b/src/keymap.cc
@@ -98,6 +98,8 @@ static const struct _vte_keymap_entry _vte_keymap_GDK_space[] = {
};
static const struct _vte_keymap_entry _vte_keymap_GDK_Tab[] = {
+ /* Ctrl+Tab */
+ {cursor_all, keypad_all, GDK_CONTROL_MASK, _VTE_CAP_CSI "I", -1},
@rr-
rr- / gist:4056c97c8d045487ad41
Created October 1, 2014 09:13
Example of tokenizer for PHP
<?php
namespace Tokenizer;
class Token
{
public $type;
public $content;
}
$tokenList =
@rr-
rr- / TextCaseConverter.php
Last active August 29, 2015 13:59
Convert text between popular capitalization standards
<?php
class TextCaseConverter
{
const SNAKE_CASE = 1; //snake_case
const SPINAL_CASE = 2; //spinal-case
const TRAIN_CASE = 3; //Train-Case
const UPPER_CAMEL_CASE = 5; //CamelCase
const LOWER_CAMEL_CASE = 6; //camelCase
const CAMEL_CASE = self::UPPER_CAMEL_CASE; //CamelCase
const BLANK_CASE = 7; //blank case