Skip to content

Instantly share code, notes, and snippets.

View L4ZZA's full-sized avatar
🚐
Roaming

Pietro Lazzarotto L4ZZA

🚐
Roaming
View GitHub Profile
@L4ZZA
L4ZZA / mesh_triangles_retrieval_in_unity.cs
Last active May 6, 2021 17:07
Mesh triangles retrieval in Unity
/// <summary>
/// Holds the data for each mesh triangle in world coordinates.
/// </summary>
[Serializable]
public class Triangle
{
public Vector3 vertexA;
public Vector3 vertexB;
public Vector3 vertexC;
@L4ZZA
L4ZZA / atom_keybindings.cson
Last active April 17, 2020 16:39
My personal atom keybindings overrides
'atom-text-editor:not([mini])':
'ctrl-up': 'unset!'
'ctrl-down': 'unset!'
'ctrl-d': 'editor:duplicate-lines'
'alt-up': 'editor:move-line-up'
'alt-down': 'editor:move-line-down'
'shift-enter': 'editor:newline-above'
# after installing https://atom.io/packages/multi-cursor from joseramonc
'ctrl-shift-down': 'multi-cursor:expand-down'
@L4ZZA
L4ZZA / TextEditorAndKeyboard-2019-06-04.vssettings
Created June 4, 2019 12:47
Just the export of my preferred settings for visual studio
<UserSettings>
<ApplicationIdentity version="14.0"/>
<ToolsOptions>
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"/>
<ToolsOptionsCategory name="TextEditor" RegisteredName="TextEditor">
<ToolsOptionsSubCategory name="AllLanguages" RegisteredName="AllLanguages" PackageName="Text Management Package"/>
<ToolsOptionsSubCategory name="Basic" RegisteredName="Basic" PackageName="Text Management Package">
<PropertyValue name="TabSize">4</PropertyValue>
<PropertyValue name="ShowChanges">true</PropertyValue>
<PropertyValue name="AutoListMembers">true</PropertyValue>
@L4ZZA
L4ZZA / console_toggling.cpp
Last active December 10, 2019 17:44
Hide/Show console based on configuration for debug purposes.
//==========================================//
// Author: Pietro Lazzarotto //
// Credits 2019 //
//==========================================//
int main(int argc, char** argv)
{
#ifdef _DEBUG
// get the console handle
auto hwnd = GetConsoleWindow();
@L4ZZA
L4ZZA / easy_input.h
Last active December 10, 2019 17:43
Simple header to quickly get rid of echoing when printing to console. If specified, it prints the int and the int and the char value of the key pressed.
//==========================================//
// Author: Pietro Lazzarotto //
// Credits 2019 //
//==========================================//
#pragma once
#include <cstdio>
#include <conio.h>
#define RELEASED 0