Skip to content

Instantly share code, notes, and snippets.

@GhazanfarMir
GhazanfarMir / Instructions.sh
Last active May 14, 2024 03:26
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@kaiware007
kaiware007 / billboard.shader
Created January 19, 2018 09:28
Simple Billboard shader for Unity
Shader "Unlit/Billboard"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "DisableBatching" = "True" }
@ayamflow
ayamflow / gist:96a1f554c3f88eef2f9d0024fc42940f
Last active May 15, 2024 12:37
Threejs Fit plane to screen
var cameraZ = camera.position.z;
var planeZ = 5;
var distance = cameraZ - planeZ;
var aspect = viewWidth / viewHeight;
var vFov = camera.fov * Math.PI / 180;
var planeHeightAtDistance = 2 * Math.tan(vFov / 2) * distance;
var planeWidthAtDistance = planeHeightAtDistance * aspect;
// or
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active November 12, 2024 14:35
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@magnetikonline
magnetikonline / README.md
Last active October 10, 2024 17:31
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script which will:

  • Iterate all commits made within a Git repository.
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active November 16, 2024 05:51
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);
@hiroeorz
hiroeorz / Firmataプロトコル.md
Last active October 15, 2023 05:04
firmataプロトコル覚え書き

Firmataプロトコル概要 (Ver 2.3)

FirmataはPC - マイコン間でやり取りするためのプロトコルです。汎用入出力の値の取得・書き込みその他の操作をPC側からArduinoのようなマイコンに対して行う為に使用されます。

firmata.org

Arduinoでの使用

ArduinoでFirmataプロトコルを使用してホストコンピュータとやり取りする場合は、ArduinoIDEを立ち上げて、ファイル -> スケッチの例 -> Firmata -> Standard Firmata を選択、開きそのままArduinoに書き込めば良いです。

##プロトコルフォーマット

@mattintosh4
mattintosh4 / 0-README.md
Last active June 4, 2022 21:41
Automator 用シェルクリプト集 その1

Shell script for Automator Part.1

Automator のシェルスクリプトアクションで使えるサンプル集です。「アプリケーション」や「サービス」を作成するときにどうぞ。


入力の種類について