Skip to content

Instantly share code, notes, and snippets.

@gam0022
gam0022 / zozuar-cloud.glsl
Last active October 24, 2021 07:07
@zozuar さんのシェーダーが凄すぎたのでコードリーディング
// @zozuar さんのシェーダーが凄すぎたのでコードリーディング
// https://twitter.com/zozuar/status/1441384708441456651
float i, // レイマーチングのループカウンター
e, // ボリュームの密度(値が小さいほど密度が濃くなる)
s, // fbmのループカウンター
g, // レイの進んだ距離(カメラのパースのためにも利用)
k = .01;// 0.01の定数
// レイマーチングのループ
@lizrice
lizrice / hello_map.py
Last active July 19, 2023 08:20
eBPF hello world
#!/usr/bin/python
from bcc import BPF
from time import sleep
# This outputs a count of how many times the clone and execve syscalls have been made
# showing the use of an eBPF map (called syscall).
program = """
BPF_HASH(syscall);
@nikhan
nikhan / twitter.sh
Created January 1, 2016 04:45
twitter ffmpeg
ffmpeg -i test.mov -vcodec libx264 -vf 'scale=640:trunc(ow/a/2)*2' -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -strict experimental -r 30 out.mp4
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active August 26, 2024 02:16
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);
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl