Skip to content

Instantly share code, notes, and snippets.

View junioramilson's full-sized avatar
🏠
Working from home

Amilson Junior junioramilson

🏠
Working from home
View GitHub Profile
@junioramilson
junioramilson / cargo_x86_64-unknown-linux-gnu-on-m1-mac.sh
Created August 18, 2023 15:03 — forked from shqld/cargo_x86_64-unknown-linux-gnu-on-m1-mac.sh
cargo build for the target x86_64-unknown-linux-gnu on M1 Mac
# https://github.com/messense/homebrew-macos-cross-toolchains
brew tap messense/macos-cross-toolchains
brew install x86_64-unknown-linux-gnu
export CC_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-gcc
export CXX_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-g++
export AR_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-ar
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc
@junioramilson
junioramilson / 2019-https-localhost.md
Created February 6, 2020 04:31 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

#include "TriggerBox.h"
#include <CryEntitySystem/IEntity.h>
#include <CrySchematyc/Reflection/TypeDesc.h>
#include <CrySchematyc/Env/IEnvRegistry.h>
#include <CrySchematyc/Env/IEnvRegistrar.h>
#include <CrySchematyc/Env/Elements/EnvComponent.h>
#include <CrySchematyc/Env/Elements/EnvFunction.h>
#include <CrySchematyc/MathTypes.h>
#include <CrySchematyc/Env/Elements/EnvSignal.h>
#include "TriggerBox.h"
#include <CryEntitySystem/IEntity.h>
#include <CrySchematyc/Reflection/TypeDesc.h>
#include <CrySchematyc/Env/IEnvRegistry.h>
#include <CrySchematyc/Env/IEnvRegistrar.h>
#include <CrySchematyc/Env/Elements/EnvComponent.h>
#include <CrySchematyc/Env/Elements/EnvFunction.h>
#include <CrySchematyc/MathTypes.h>
#include <CrySchematyc/Env/Elements/EnvSignal.h>
#include <iostream>
#include <vector>
int main()
{
std::vector<int> sequence = { 0, 2, 4, 5};
int near = 2;
for (int i = 0; i < sequence.size(); i++)
{