Skip to content

Instantly share code, notes, and snippets.

View jasielmacedo's full-sized avatar
👋

Jazz Macedo jasielmacedo

👋
View GitHub Profile
@jasielmacedo
jasielmacedo / IntObfuscator.cs
Last active March 16, 2017 17:08
Every variable in game is important and unsecured ints can be changed using Cheat Engine. This class can obfuscate your int
using UnityEngine;
using System.Collections;
public struct IntObfuscator
{
private int m_offset;
private int m_value;
public IntObfuscator(int value = 0)
{
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public static class PositionPrediction {
///<summary>Uses one greater calculation to predict the position. (a small amount of time slower than predictRigidbodyVelocity in the benchmark/ maybe faster when dragValue=0).\nNot tested for dragValue=0
public static Vector3 predictRigidbodyVelocityWithoutLoop(Vector3 startVelocity, int cycles, float dragValue, bool _2DGravity, float gravityModifier)
{
//timestep
@jasielmacedo
jasielmacedo / PhysicsSettler.cs
Last active June 16, 2023 19:51
To Test Physics on Editor Without play - Unity Engine 2017
using UnityEngine;
using UnityEditor;
// This causes the class' static constructor to be called on load and on starting playmode
[InitializeOnLoad]
class PhysicsSettler
{
// only ever register once
static bool registered = false;
@jasielmacedo
jasielmacedo / defaults.css
Last active August 2, 2018 21:33
Hidden classes and Complements to Semantic UI
/*
* Created By: Jasiel Macedo
* Since: 2018
* Version: 1.0.1
*/
/* margin */
[class*="margin two hundred"], .margin-200 { margin: 200px; } [class*="margin two hundred important"], [class*="margin-200 important"] { margin: 200px !important; }
[class*="margin one hundred fifty"], .margin-150 { margin: 150px; } [class*="margin one hundred fifty important"], [class*="margin-150 important"] { margin: 150px !important; }
[class*="margin one hundred"], .margin-100 { margin: 100px; } [class*="margin one hundred important"], [class*="margin-100 important"] { margin: 100px !important; }
@jasielmacedo
jasielmacedo / MaquinaDeEstadoFinito.js
Last active June 4, 2021 20:04
Código Exemplo de maquina de estado finito
const ESTADO_PARADO = 'parado';
const ESTADO_PATRULHANDO = 'patrulhando';
const ESTADO_PROCURANDO_INIMIGO = 'procurando';
const ESTADO_ATACANDO = 'atacando';
const ESTADO_MORTO = 'morto';
class Guardiao {
constructor() {
this.estado_atual = ESTADO_PARADO;
this.vida = 100;
@jasielmacedo
jasielmacedo / amazon-aws-signed-files.ts
Created December 20, 2022 18:33
Amazon AWS Signed Files with Typescript
import * as AWS from 'aws-sdk';
// Set the region in which your bucket is located
AWS.config.update({region: 'us-east-1'});
// Set the credentials for your AWS account
AWS.config.update({accessKeyId: 'ACCESS_KEY_ID', secretAccessKey: 'SECRET_ACCESS_KEY'});
// Create an instance of the S3 client
const s3 = new AWS.S3();