Skip to content

Instantly share code, notes, and snippets.

View bolabola's full-sized avatar
🎯
Focusing

lesiry bolabola

🎯
Focusing
View GitHub Profile
@darktable
darktable / MiniJSON.cs
Created November 30, 2011 23:08
Unity3D: MiniJSON Decodes and encodes simple JSON strings. Not intended for use with massive JSON strings, probably < 32k preferred. Handy for parsing JSON from inside Unity3d.
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining
@asus4
asus4 / AssetBundleManager.cs
Created May 14, 2012 04:24
Manage Assetbundles for unity3d
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
public class AssetBundleManager {
class AssetReference : IDisposable {
int count;
public AssetBundle bundle;
@ftvs
ftvs / CameraShake.cs
Last active May 17, 2024 12:21
Simple camera shake effect for Unity3d, written in C#. Attach to your camera GameObject. To shake the camera, set shakeDuration to the number of seconds it should shake for. It will start shaking if it is enabled.
using UnityEngine;
using System.Collections;
public class CameraShake : MonoBehaviour
{
// Transform of the camera to shake. Grabs the gameObject's transform
// if null.
public Transform camTransform;
// How long the object should shake for.
@smakhtin
smakhtin / gist:6417335
Last active October 15, 2021 07:39
Found good way to convert from and to HSV in HLSL. Source - http://ploobs.com.br/?p=1499.
float2 halfPixel;
float4 toAdd;
float4 toMultiply;
texture cena;
sampler cenaSampler = sampler_state
{
Texture = ;
MinFilter = LINEAR;
MagFilter = LINEAR;
@guweigang
guweigang / git_toturial
Last active June 15, 2024 10:46
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active June 20, 2024 22:57
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
echo ""
echo " _oo0oo_"
echo " o8888888o"
echo " 88' . '88"
echo " (| -_- |)"
echo " 0\ = /0"
echo " ___/\`---'\\___"
echo " .' \\\\\\| |# '."
echo " / \\\\\\||| : |||# \\"
echo " / _||||| -:- |||||- \\"
@Belphemur
Belphemur / vcredistversion.iss
Last active November 8, 2019 09:47
Script for Inno Setup to detect if the wanted version and build of VC Redist C++ is installed as explained: https://stackoverflow.com/a/8552775/2062444
[Code]
function IsX64: boolean;
begin
Result := Is64BitInstallMode and (ProcessorArchitecture = paX64);
end;
procedure Explode(var Dest: TArrayOfString; Text: String; Separator: String);
var
i, p: Integer;
begin
@Lunchbox4K
Lunchbox4K / KeyboardHook.cs
Last active December 11, 2023 07:13
C# Global Keyboard Hooks
// MP Hooks © 2016 Mitchell Pell
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace mp.hooks{
@danzek
danzek / createDirectoryRecursively.cpp
Created April 13, 2017 21:34
Create Directory Recursively with Windows API
/* From http://blog.nuclex-games.com/2012/06/how-to-create-directories-recursively-with-win32/
* Retrieved April 12, 2017
* Posted by user Cygon (http://blog.nuclex-games.com/author/cygon/)
*
* This code is free for the taking and you can use it however you want.
*
* THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE