Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jakz on github.
  • I am jacopo (https://keybase.io/jacopo) on keybase.
  • I have a public key whose fingerprint is 136F 2BC9 BE47 F603 721D 8036 B698 4C23 A73C ABBE

To claim this, I am signing this object:

Verifying myself: My Bitcoin username is +jacopo. https://onename.io/jacopo
@Jakz
Jakz / gist:35cd746caf878712e5d4
Created September 25, 2014 16:37
Cocos2d-x Multicolored Label
class LabelBMColoredFont : public cocos2d::Label
{
private:
struct ColorIndex
{
const cocos2d::Color3B& color;
size_t index;
};
LabelBMColoredFont(cocos2d::FontAtlas *atlas = nullptr, cocos2d::TextHAlignment hAlignment = cocos2d::TextHAlignment::LEFT,
#include <conio.h>
#include <dos.h>
#include <math.h>
#include <memory.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/timeb.h>
#include "keyhandl.h"
template<typename T>
void Visitor::dispatchAndReplace(unique_ptr<T>& ptr)
{
if (ptr)
{
Node* node = dispatch(ptr.get());
T* cnode = dynamic_cast<T*>(node);
if (cnode)
#include <type_traits>
#include <cstring>
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
enum GfxBufferFormat
{
FORMAT_XRGB888,
@Jakz
Jakz / SimpleBitSet.h
Last active August 29, 2015 14:14
Simple C++11 BitSet
template<size_t S, typename T>
class SimpleBitSet
{
private:
T data[S/(sizeof(T)*8)];
public:
const size_t BITS = sizeof(T)*8;
const size_t SIZE = S/BITS;
@Jakz
Jakz / hexalter.cpp
Created July 29, 2015 15:44
Simple cmmand line byte modifier that replaces raw bytes inside a given file
#include <stdint.h>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <string>
using namespace std;
struct Patch
{
@Jakz
Jakz / sleephack.cpp
Last active March 16, 2022 18:35
GBA Sleep Hack
#include <cstdio>
#include <cassert>
#include <stdint.h>
#include <vector>
#include <string>
#include <iostream>
#include <iomanip>
using namespace std;
@Jakz
Jakz / ffmpeg.md
Last active February 29, 2020 15:22
ffmpeg cheat sheet

Concatenate multiple VOB into same

ffmpeg -i "concat:/Path/File1.VOB|/Path/File2.VOB" -c copy file_output.vob

Convert VOB video to x256

ffmpeg -i file_input.vob -vf yadif -c:v libx265 -preset slow -crf 20 -c:a aac -b:a 256k file_output.mkv

Cropping a video