Skip to content

Instantly share code, notes, and snippets.

View deltaluca's full-sized avatar

Luca Deltodesco deltaluca

View GitHub Profile
@deltaluca
deltaluca / _sanctum_white.json
Created November 16, 2020 21:20
white sanctum alternative
{"atmosphereColor":{"b":2.8229858799022622e-05,"g":2.8229662348167039e-05,"l":2.7676412628352409e-07,"r":2.8230922907823697e-05},"moon":{"colors":[{"ambient":{"b":255.0,"g":255.0,"l":0.16500000655651093,"r":255.0},"fogColor":{"b":255.0,"g":255.0,"l":1.0,"r":255.0},"glow":{"b":255.0,"g":255.0,"l":0.0,"r":255.0,"radius":0.0},"godRays":{"intensity":0.0},"lensFlare":{"intensity":0.0,"radius":0.0},"lensGlow":{"intensity":0.0,"radius":0.0},"pitch":0.44999998807907104,"planetIntensity":0.0,"skyBottom1":{"b":255.0,"g":255.0,"l":0.0,"r":255.0},"skyBottom2":{"b":255.0,"g":255.0,"l":0.0,"r":255.0},"skyMid1":{"b":255.0,"g":255.0,"l":0.0,"r":255.0},"skyMid2":{"b":255.0,"g":255.0,"l":0.0,"r":255.0},"skyMidRatio":0.0,"skyTop":{"b":255.0,"g":255.0,"l":0.0,"r":255.0},"sprite":{"b":255.0,"g":255.0,"l":0.0,"r":255.0,"radius":0.0},"worldLight":{"b":255.0,"g":255.0,"l":0.16500000655651093,"r":255.0}}],"minutesPerCycle":24.0,"positions":[{"cyclePosition":0.5,"pitch":0.71200001239776611,"yaw":0.25300002098083496}]},"skyAssets":"def
@deltaluca
deltaluca / allemoji.lua
Created April 21, 2020 01:11
Generate all emoji in a grid of glass signs beneath your feet.
emojis = {
"1f004", "1f0cf", "1f170", "1f171", "1f17e", "1f17f", "1f18e", "1f191", "1f192", "1f193", "1f194", "1f195", "1f196",
"1f197", "1f198", "1f199", "1f19a", "1f1e6", "1f1e7", "1f1e8", "1f1e9", "1f1ea", "1f1eb", "1f1ec", "1f1ed", "1f1ee",
"1f1ef", "1f1f0", "1f1f1", "1f1f2", "1f1f3", "1f1f4", "1f1f5", "1f1f6", "1f1f7", "1f1f8", "1f1f9", "1f1fa", "1f1fb",
"1f1fc", "1f1fd", "1f1fe", "1f1ff", "1f201", "1f202", "1f21a", "1f22f", "1f232", "1f233", "1f234", "1f235", "1f236",
"1f237", "1f238", "1f239", "1f23a", "1f250", "1f251", "1f300", "1f301", "1f302", "1f303", "1f304", "1f305", "1f306",
"1f307", "1f308", "1f309", "1f30a", "1f30b", "1f30c", "1f30d", "1f30e", "1f30f", "1f310", "1f311", "1f312", "1f313",
"1f314", "1f315", "1f316", "1f317", "1f318", "1f319", "1f31a", "1f31b", "1f31c", "1f31d", "1f31e", "1f31f", "1f320",
"1f321", "1f324", "1f325", "1f326", "1f327", "1f328", "1f329", "1f32a", "1f32b", "1f32c", "1f32d", "1f32e", "1f32f",
"1f330", "1f331", "1f332", "1f333", "1f33
7 19 20 27 24 36 46 54 50 52 50 42 33 26 37 41 31 21 9 26 42 53 70 65 58 48 47 42 55 58 51 47 58 59 65 48 32 26 38 37 24 16 18 15 18 18 17 37 47 38 43 51 49 54 51 51 60 58 44 47 46 56 63 66 77 73 70 65 62 67 85 87 89 89 85 91 92 86 80 79 72 74 69 73 74 77 81 83 85 88 82 83 82 83 84 86 115 110 109 103 99 98 101 105 109 105 106 100 99 83 66 69 67 66 73 73 81 85 82 83 91 92 95 93 119 116 114 113 107 106 111 109 103 102 140 143 146 147 149 150 150 150 151 151 153 149 150 148 144 142 143 147 146 146 144 144 144 143 139 140 143 146 147 149 114 114 111 111 114 114 146 146 186 182 183 183 182 185 140 139 128 139 141 143 140 139 142 146 144 188 190 193 192 189 186 186 187 190 190 189 110 105 108 108 103 102 112 111 81 77 78 79 111 108 112 114 117 112 114 112 112 189 185 182 184 183 181 139 100 70 70 90 71 78 65 55 41 30 30 33 41 33 60 41 41 37 52 54 43 23 44 62 61 192 7 14 25 32 43 38 39 49 62 65 59 49 41 52 54 42 38 27 45 59 69 85 79 72 59 60 52 67 72 64 57 71 67 75 58 41 38 53 54 38 33 32 21 12 16 21 36 49 44 45 55
9333 CONTROL_GUILD_BASE
9427 SOIL_SILTY_COMPACT
9431 SOIL_CLAY_COMPACT
9435 SOIL_PEATY_COMPACT
9439 ROCK_METAMORPHIC_STONES
9443 ROCK_IGNEOUS_STONES
9447 ROCK_SEDIMENTARY_STONES
9451 ROCK_SEDIMENTARY_BRICK
9455 ROCK_METAMORPHIC_BRICK
9459 ROCK_IGNEOUS_BRICK
[2017-05-05 03:48:40] INFO lod 0 :
[2017-05-05 03:48:40] INFO ren x0
[2017-05-05 03:48:40] INFO characters/cat_race/models/face_elf.dae/801 ren x0
[2017-05-05 03:48:40] INFO hips_jt ren x0
[2017-05-05 03:48:40] INFO spine_1_jt ren x0
[2017-05-05 03:48:40] INFO spine_2_jt ren x0
[2017-05-05 03:48:40] INFO spine_3_jt ren x0
[2017-05-05 03:48:40] INFO spine_4_jt ren x0
[2017-05-05 03:48:40] INFO spine_5_jt ren x0
[2017-05-05 03:48:40] INFO spine_6_jt ren x0
@deltaluca
deltaluca / main.cpp
Created April 12, 2017 22:17
crazy templated smarter getnumberofbytes
#include <iostream>
#include <cstdint>
#include <vector>
#include <array>
#include <type_traits>
// default implementations of GetNumberOfBytesNoArgs / GetNumberOfBytesWithArgs
template <typename T, typename = int> struct GetNumberOfBytesNoArgs {};
template <typename T, typename = int> struct GetNumberOfBytesWithArgs {};
# move mouse 1 pixel (no buttons/keys pressed)
MotionNotify event, serial 37, synthetic NO, window 0x4a00001,
root 0x293, subw 0x0, time 37828593, (89,92), root:(92,213),
state 0x10, is_hint 0, same_screen YES
# press left mouse
ButtonPress event, serial 37, synthetic NO, window 0x4a00001,
root 0x293, subw 0x0, time 37830561, (89,92), root:(92,213),
@deltaluca
deltaluca / Main.hx
Created February 18, 2014 08:34
Occlusion culling minecraft 2d
import nape.util.BitmapDebug;
import nape.geom.Vec2;
class Perlin3D {
public static inline function noise(x:Float, y:Float = 0.0, z:Float = 0.0) {
var X:Int = untyped __int__(x); x -= X; X &= 0xff;
var Y:Int = untyped __int__(y); y -= Y; Y &= 0xff;
var Z:Int = untyped __int__(z); z -= Z; Z &= 0xff;
var u = fade(x); var v = fade(y); var w = fade(z);
var A = p(X) +Y; var AA = p(A)+Z; var AB = p(A+1)+Z;
...
const std::vector<Component> components;
template <typename C>
Product(
typename std::enable_if<
std::is_same<std::decay<C>::type, std::vector<Component>>::value,
C
>::type&& components):
...
const std::array<float32_t, 2> bounds;
private:
static std::array<float32_t, 2> compute_bounds(const std::vector<Component>& components)
{
std::array<float32_t, 2> bounds = {0, 0};
for (const auto& component: components)
{
bounds[0] -= component.multiplier;