This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/DebugUVs" { | |
SubShader { | |
Pass { | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag | |
#include "UnityCG.cginc" | |
struct v2f { | |
float4 pos : SV_POSITION; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <chrono> | |
using Clock = std::chrono::high_resolution_clock; | |
class Timer { | |
public: | |
Timer(std::string const & msg = "") : m_msg(msg), m_iTime(Clock::now()) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
// ------------------------------------------ | |
// Timer | |
// ------------------------------------------ | |
struct Timer { | |
using clock = std::chrono::high_resolution_clock; | |
using unit = std::chrono::duration<double, std::nano>; | |
private: | |
std::string_view msg; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
// ------------------------------------------ | |
// Quick print | |
// ------------------------------------------ | |
void _printRest(void){} | |
template <typename H, typename ...T> | |
void _printRest(const H& head, T&&... tail){ std::cout << " " << head; _printRest(tail...); } | |
void _printFirst(void){} | |
template <typename H, typename ...T> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <functional> | |
#include <mutex> | |
class safe_mt { | |
private: | |
std::mutex m_mutex; | |
std::condition_variable m_condvar; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::vector<std::string> strSplit(const std::string& str, | |
const std::string& delimeter) { | |
std::string token; | |
std::vector<std::string> splitted; | |
size_t ini{0}, end{0}; | |
while ((end = str.find(delimeter, ini)) <= str.size()) { | |
token = str.substr(ini, end - ini); | |
ini = end + delimeter.size(); | |
splitted.push_back(token); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ################## # | |
# ------------------ # | |
# MAKEFILE BASE # | |
# ------------------ # | |
# By @cambalamas # | |
# ------------------ # | |
# ################## # | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CARBON-NOW-SH : 'npm i -g carbon-now-cli'. | |
# '-i' to setup your preset | |
# '-o' to open img on photos | |
# '--clear' remove all imgs from the folder | |
# '--path' open the path of imgs | |
function Carbon { | |
$path = "${env:LOCALAPPDATA}\CarbonNow\" | |
$file = "$path\carbon.data" | |
$imgName = $(Get-Date).Ticks | |
$imgPath = "$path\$imgName.png" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jst | |
// Made with <3 by @cambalamas | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"log" |