Skip to content

Instantly share code, notes, and snippets.

hugohil /
Last active Jan 25, 2023
raspberry pi initial setup

update system

sudo apt update
sudo apt upgrade -y

install oh-my-zsh

sudo apt install zsh -y
sh -c "$(curl -fsSL"
hugohil / frag.glsl
Created Oct 11, 2022
Basic GLSL shaders (three.js)
View frag.glsl
uniform float time;
uniform vec2 resolution;
uniform vec3 color;
void main() {
gl_FragColor = vec4(color, 1.);
hugohil / three.js.shader.html
Created Oct 11, 2022 — forked from kylemcdonald/three.js.shader.html
Minimal three.js shader example.
View three.js.shader.html
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
body {
margin: 0px;
overflow: hidden;
hugohil / ThreadedModelLoader.cpp
Last active May 16, 2018
View ThreadedModelLoader.cpp
#include "ThreadedModelLoader.h"
#include <sstream>
nextID = 0;
ofAddListener(ofEvents().update, this, &ThreadedModelLoader::update);
lastUpdate = 0;
loading = false;
hugohil /
Created May 8, 2018
media conversion scripts
for i in medias/*.jpg;
do name=`echo $i | cut -d'.' -f1`;
# # this one looks for the previous pot
# p2w=$(convert "$i" -format "%[fx:2^(floor(log(w)/log(2)))]" info:)
# p2h=$(convert "$i" -format "%[fx:2^(floor(log(h)/log(2)))]" info:)
# # this one looks for the next pot
# p2w=$(convert "$i" -format "%[fx:2^(ceil(log(w)/log(2)))]" info:)
# p2h=$(convert "$i" -format "%[fx:2^(ceil(log(h)/log(2)))]" info:)
View webmidi-playground.js
const WebMidi = require('webmidi')
const name = 'LPD8 MIDI 1'
WebMidi.enable((err) => {
err && console.warn(err)
WebMidi.inputs.forEach((input) => {`${input.manufacturer} '${}' ${input.state}`)
hugohil / index.js
Last active Jan 8, 2018
meyda multiple source and analyzers
View index.js
/* to run:
budo index.js --live
uncomment the `source.connect(context.destination)` to hear tracks
'use strict'
const Meyda = require('../../path/to/meyda') // use your local meyda installation
View arduinoled.ino
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
unsigned long frame = 0;
const float pi = 3.14;
hugohil / Page.vue
Last active Sep 10, 2020
spritesheet vue component
View Page.vue
<div id="wrapper">
<sprite :id="'sprite'"
<button @click="play">play</button>
hugohil /
Created Sep 26, 2016
Disable Oculus Home while still using the USB charger

Disable Oculus Home and use the Gear VR

TL;DR: Remove any Oculus app and enable the Gear VR Service developper mode. Do not disable Gear VR Service package.

This step-by-step guide will allow you to plug your device into the Samsung Gear VR HMD without auto-launching Oculus Home and still having the HMD buttons disabled and the USB charger active.

We came to this procedure thanks to this guide. We found some steps not necessary and missed informations so we made this one. Cheers to robamacaf !

Finally, this has been tested and worked on a Samsung Galaxy S7 / Android 6.0.1 with an Apache Cordova app. If you have tested this on another setup and it worked, please notify me and I'll update this guide.