Skip to content

Instantly share code, notes, and snippets.

View zentyk's full-sized avatar
🎮
#Letsgofurther than you can Imagine

Arturo Sánchez zentyk

🎮
#Letsgofurther than you can Imagine
  • Mexico
  • 22:22 (UTC -06:00)
View GitHub Profile
@zentyk
zentyk / main.cpp
Created September 9, 2022 16:30
Linux game
#include <unistd.h>
#include <curses.h>
#include <cstring>
#include <iostream>
#define ESPACIOS 70
using namespace std;
void printPlane(int x);
void printMenu();
void bye();
@zentyk
zentyk / main.cpp
Last active September 8, 2022 03:06
basic C++ Game
#ifdef _WIN32
#include <windows.h>
#elif
#include <unisdtd.h>
#endif
#include <conio.h>
#include <iostream>
#define ESPACIOS 70
(function () {
var utils = {};
var app = pc.Application.getApplication();
/**
* @name utils#loadGlbContainerFromAsset
* @function
* @description Load a GLB container from a binary asset that is a GLB. If the asset is not loaded yet, it will load the asset.
* @param {pc.Asset} glbBinAsset The binary asset that is the GLB.
* @param {Object} options Optional. Extra options to do extra processing on the GLB.
@zentyk
zentyk / solidity_crud.sol
Created January 18, 2022 05:09
A basic Solidity CRUD made with solidity.
//SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.6;
contract TaskContract {
uint nextId=0;
struct Task{
uint id;
string name;
string description;
var GlobalVars = {
debug: true
};
var CommonUtils = {
Log: (log)=> {
if(GlobalVars.debug) {
console.log("common utils: ", log);
}
},
@zentyk
zentyk / regexes.txt
Created May 18, 2020 17:02
Regex Rules
Time span in 24 hour Format (HH:MM:SS), Please make sure that the string is in a lengt of 8/7 (Depending the control)
^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9])$
@zentyk
zentyk / centos.sh
Last active June 8, 2022 09:56
CentOS 7 Laravel Setup
systemctl start httpd.service
systemctl enable httpd.service
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
#php
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
sudo yum install php71w php71w-common php71w-gd php71w-phar php71w-xml php71w-cli php71w-mysql php71w-mbstring php71w-tokenizer php71w-openssl php71w-pdo
using System.IO; using UnityEditor; using UnityEngine; using UnityEditor.Callbacks; using LitJson;
public class BuildPostprocessor {
public static string Replace, ExportPath,Json, AssetPath;
[PostProcessBuild(1)]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) {
//Get Json
GameVersion previousVersion = new GameVersion();
AssetPath = Application.streamingAssetsPath+"/GameVersion.json";
Json = File.ReadAllText(AssetPath);
@zentyk
zentyk / CreateAssetBundle.cs
Last active November 9, 2022 01:53
AssetBundle Manager for scenes
using System.IO;
using UnityEditor;
public class CreateAssetBundle {
[MenuItem("Assets/Build AssetBundles")]
static void BuildAllAssetBundles() {
//"BundleScenes" is the name of the folder where the bundle will be exported
string assetBundleDirectory = "AssetBundles/BundleScenes";
if (!Directory.Exists(assetBundleDirectory)) {
Directory.CreateDirectory(assetBundleDirectory);