Skip to content

Instantly share code, notes, and snippets.

View brucelane's full-sized avatar
🏠
Working from home

Bruce LANE brucelane

🏠
Working from home
View GitHub Profile
@khyperia
khyperia / nonzeroIndex.cs
Created October 11, 2019 14:00
creating an array that starts at 5
using System;
public class C {
public static void Main() {
var arr = Array.CreateInstance(typeof(int), new[]{5}, new[]{5});
Console.WriteLine(arr.Length);
for (var i = 5; i < 10; i++)
arr.SetValue(i * 2, i);
for (var i = 5; i < 10; i++)
Console.WriteLine(arr.GetValue(i));
}
@charlieroberts
charlieroberts / marching_hydra_local.js
Created September 11, 2019 17:58
marching.js with hydra generated textures (local)
// first, download the hydra-synth repo: https://github.com/ojack/hydra-synth
// second, build it with browserify: browserify index.js -o hydra.js --standalone Hydra
// third, place the resulting hydra.js file in the smae directory as marching.js
script = document.createElement('script')
script.src = 'http://localhost:12000/hydra.js'
document.querySelector('head').appendChild( script )
canvas = document.createElement('canvas')
hydra = new Hydra({ canvas })
@blowdart
blowdart / UpdateIISExpressSSLForChome.ps1
Last active October 7, 2021 10:59
IIS Express certs (for now) don't contain SAN strings. This makes Chrome unhappy. Make Chrome happy again with a new organic, artisanal, gluten free HTTPS certificate.
# Create a new self signed HTTPS Certificate for IIS Express
# Crafted with all organic, GMO, gluten free ingreditations
# with an artisinal SAN to make Chrome 58 onwards happy.
#
# See https://bugs.chromium.org/p/chromium/issues/detail?id=308330
#
# Run this at an administrative PowerShell prompt.
#
# You will be prompted to trust a new certificate via a windows dialog.
# Click yes otherwise Visual Studio will not be able to determine your
@brucelane
brucelane / README.md
Created February 14, 2017 18:17 — forked from kashimAstro/README.md
H3 / Mali GPU driver and openframeworks armv7 ES / ES2

#A small guide to compile openFrameworks armv7 with driver OpenGL ES / ES2 sunxi for H3 / Mali GPU on ARMBIAN OS, compatible with orangepi and bananapi.

tested on: orangepi one banana pi M2

dependencies:

apt-get install libx11-dev libxext-dev xutils-dev libdrm-dev \ 
           x11proto-xf86dri-dev libxfixes-dev x11proto-dri2-dev xserver-xorg-dev \
 build-essential automake pkg-config libtool ca-certificates git cmake subversion
@kashimAstro
kashimAstro / README.md
Last active May 5, 2021 17:47
H3 / Mali GPU driver and openframeworks armv7 ES / ES2

#A small guide to compile openFrameworks armv7 with driver OpenGL ES / ES2 sunxi for H3 / Mali GPU on ARMBIAN OS, compatible with orangepi and bananapi.

tested on: orangepi one banana pi M2

dependencies:

apt-get install libx11-dev libxext-dev xutils-dev libdrm-dev \ 
           x11proto-xf86dri-dev libxfixes-dev x11proto-dri2-dev xserver-xorg-dev \
 build-essential automake pkg-config libtool ca-certificates git cmake subversion
@paulhoux
paulhoux / AudioShaderApp.cpp
Last active March 2, 2018 13:19
Adaptation of ShaderToy's AudioSurf shader for Cinder. Actual audio data is replaced with random noise to keep it simple. I kept the original shader code without making any changes. Note that ```iResolution``` must be passed as a Vec3f.
#include "cinder/app/AppNative.h"
#include "cinder/gl/gl.h"
#include "cinder/gl/GlslProg.h"
#include "cinder/gl/Texture.h"
#include "cinder/Rand.h"
using namespace ci;
using namespace ci::app;
using namespace std;
@paulhoux
paulhoux / PointOnSphereApp.cpp
Last active December 22, 2015 08:09
Example of how to place objects at the surface of a sphere with the correct axes. Created in response to https://forum.libcinder.org/#Topic/23286000001779023 .
#include "cinder/app/AppNative.h"
#include "cinder/gl/gl.h"
#include "cinder/Camera.h"
#include "cinder/MayaCamUI.h"
using namespace ci;
using namespace ci::app;
using namespace std;
class PointOnSphereApp : public AppNative {