Skip to content

Instantly share code, notes, and snippets.

View superguigui's full-sized avatar

Guillaume Gouessan superguigui

View GitHub Profile
// http://mrl.nyu.edu/~perlin/noise/
var ImprovedNoise = function () {
var p = [151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,
23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,
174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,
133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,
89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,
202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,
@thickey
thickey / backbone-0.9.1.js
Created February 16, 2012 21:00
Externs for Backbone.js and Underscore.js
/*
* @fileoverview Externs for backbone-0.9.1.js
*
* built with http://www.dotnetwise.com/Code/Externs/index.html
* see also: http://blog.dotnetwise.com/2009/11/closure-compiler-externs-extractor.html
* via: http://code.google.com/p/closure-compiler/wiki/FAQ#How_do_I_write_an_externs_file?
*
* Note: when building via that page, you first need to load in underscrore.js, as that's a dependency.
* also, after running the extern for Backbone, you need to manually run it for:
@harperreed
harperreed / DownloadStationAPI.py
Last active September 10, 2024 20:07
example script to sync/download/etc put.io downloads to your synology download station
import time
import requests
import json
class DownloadStationAPI():
def __init__(self, host=None, username=None, password=None):
self.name = 'DownloadStation'
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 2, 2025 08:14
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);
@leo-cheron
leo-cheron / png-to-VP9.command
Last active November 29, 2024 10:21
FFMPEG - mp4 & webm conversion
ffmpeg -framerate 25 -y -start_number 1 -i %04d.png -pass 1 -c:v libvpx-vp9 \
-b:v 1800k -maxrate 2000k -minrate 1200k \
-deadline best -cpu-used 0 \
-auto-alt-ref 1 -lag-in-frames 25 \
-f webm /dev/null
ffmpeg -framerate 25 -start_number 1 -i %04d.png -pass 2 -c:v libvpx-vp9 \
-b:v 1800k -maxrate 2000k -minrate 1200k \
-deadline best -cpu-used 0 \
-auto-alt-ref 1 -lag-in-frames 25 \
output.webm
@protrolium
protrolium / ffmpeg.md
Last active April 27, 2025 21:52
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
@mattdesl
mattdesl / MeshCustomMaterial.js
Last active June 4, 2024 08:51
Custom mesh standard material with glslify + ThreeJS r83dev
const glslify = require('glslify');
const path = require('path');
// This is the original source, we will copy + paste it for our own GLSL
// const vertexShader = THREE.ShaderChunk.meshphysical_vert;
// const fragmentShader = THREE.ShaderChunk.meshphysical_frag;
// Our custom shaders
const fragmentShader = glslify(path.resolve(__dirname, 'standard.frag'));
const vertexShader = glslify(path.resolve(__dirname, 'standard.vert'));
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 3, 2025 05:43
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
@floz
floz / MeshCustomMaterial.js
Created July 17, 2017 14:02
MeshPhysicalMaterial custom
import vs from "shaders/physicalcustom.vs"
import fs from "shaders/physicalcustom.fs"
export default class MeshCustomMaterial extends THREE.MeshPhysicalMaterial {
constructor(parameters, uniforms={}){
super(parameters)
this.defines = { 'PHYSICAL': '' };