Skip to content

Instantly share code, notes, and snippets.

View patriciogonzalezvivo's full-sized avatar

Patricio Gonzalez Vivo patriciogonzalezvivo

View GitHub Profile
I am attesting that this GitHub handle patriciogonzalezvivo is linked to the Tezos account tz1NqueFctvNCQrsELm6k4N6XfwAYu5Qp5LN for tzprofiles
// Great example of the use of Lygia samplers functions
// and GlslViewer
// on the Looking Glass Display
#ifdef GL_ES
precision mediump float;
uniform sampler2D u_buffer0;
uniform sampler2D u_buffer1;
patriciogonzalezvivo /
Last active January 14, 2024 23:38
Resolve includes for GLSL, HLSL and metal on Python
import re
from os.path import join, abspath, dirname, basename
def load_source( folder: str, filename: str, dependencies = []):
path = abspath( join(folder, filename) )
if path in dependencies:
return ""
dependencies.append( path )
patriciogonzalezvivo / index.html
Last active February 14, 2017 16:17
<!doctype html>
<html lang="en-us">
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- 3rd party libraries -->
<!-- Leaflet -->
patriciogonzalezvivo /
Created February 12, 2017 14:57
Frag Shader to gif
for i in `seq -w 0.01 .031 $SEC`; do
echo $i
`glslViewer $SHADER -s $i -o frame-$COUNTER.png`
patriciogonzalezvivo / multistep functions
Last active December 5, 2016 18:43
Multistep functions
float mix4smoothstep(float a, float b, float c, float d, float x ) {
return mix(mix(a,b,smoothstep(0.,.33,x)),
float mix4linear(float a, float b, float c, float d, float x ) {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Resources
// -
// -
// -
sudo apt-get install dh-make build-essential
sudo apt-get install devscripts fakeroot debootstrap pbuilder autotools-dev
# Create the packaging skeleton (debian/*)
# dh_make -s --indep --createorig
patriciogonzalezvivo /
Last active August 30, 2016 14:39
HTTPS to HTTP in Amazon Linux server
sudo yum update -y
# Install packages
sudo yum install -y httpd24 mod24_ssl php56 mysql55-server php56-mysqlnd
# Start the Apache web server
sudo service httpd start
patriciogonzalezvivo /
Last active May 13, 2016 15:11
Make a GeoJson line from point A to point B using mapzen's Valhalla routing engine
#!/usr/bin/env python
import requests, json, sys
import geojson
#six degrees of precision in valhalla
inv = 1.0 / 1e6;
#decode an encoded string
def decode(encoded):