Skip to content

Instantly share code, notes, and snippets.

View AndreaCatania's full-sized avatar
🍇
Hey!

Andrea Catania AndreaCatania

🍇
Hey!
View GitHub Profile
{
"version": 1,
"notes": "",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "kbdfans/niu_mini",
"keymap": "catania_layout_10",
"layout": "LAYOUT_planck_mit",
"layers": [
[
"KC_ESC",
extends MeshInstance3D
var velocity: Vector3 = Vector3(2, 0, 0)
var interval: float = 0.0
func _ready():
SceneRewinder.register_variable(self, "translation")
SceneRewinder.register_variable(self, "velocity")
SceneRewinder.register_variable(self, "interval")
@AndreaCatania
AndreaCatania / ffmpeg.rs
Created November 11, 2019 11:00
FFmpeg example to extract a frame from a video in Rust Lang
/// This
unsafe {
ffmpeg::av_register_all();
// This portion of code was written by taking as resource: http://dranger.com/ffmpeg/tutorial01.html
// This article is outdated, and some APIs got deprecated, here I used the non deprecated version.
//
// The idea of FFmpeg is to
// 1. open the file
@AndreaCatania
AndreaCatania / amethyst_useful_information.md
Last active July 7, 2019 11:31
Useful information of amethyst game engine

Coords

The coordinate system is +Y up, and the camera looks toward -Z

Components

A component must be registered before used. It is registerd automatically in the setup function by the System trait. If, for any reason, the component is not yet used by any system, you can register it using the below code, and thus avoid panics.

@AndreaCatania
AndreaCatania / godot_fluid_shader
Created May 2, 2019 20:37
Godot fluid shader using flex engine
shader_type spatial;
render_mode blend_mix, unshaded;
uniform float water_transparency = 0.1;
uniform vec4 water_color: hint_color;
uniform float water_distortion = 20;
uniform vec2 water_distortion_direction = vec2(0, 1);
vec4 blur(sampler2D tex, vec2 current_uv, vec2 pixel_size, int passes ){
@AndreaCatania
AndreaCatania / read_memory_test.cpp
Last active December 11, 2021 02:25
C++ memory access performance test
/**
* C++ memory reading performance test.
*
* This snippet is used to test the performance differences between a forward,
* backward and random array accessing.
*
* The random access memory is a biased test but was interesting test to do anyway.
*
* The execution of this code may time a while depending on your CPU
*