Skip to content

Instantly share code, notes, and snippets.

View bnolan's full-sized avatar

Ben Nolan bnolan

View GitHub Profile
@automata
automata / about.md
Created February 20, 2018 03:14
Using @mattdesl's Texel with Three.js (WebGL renderer)
npm install [email protected] --global
texel index.js --open
ffmpeg -framerate 24 -i tmp/%03d.png -y output.gif
ffmpeg -framerate 24 -i tmp/%03d.png -y -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p output.mp4

output.gif

@lewislepton
lewislepton / BufferedAudioBus.hpp
Created March 31, 2017 13:25
AudioKit on Audio Unit v3 (extension)
/*
<samplecode>
<abstract>
Utility classes to manage audio formats and buffers for an audio unit implementation's input and output audio busses.
</abstract>
</samplecode>
*/
#import <AudioToolbox/AudioToolbox.h>
#import <AudioUnit/AudioUnit.h>
@Noxalus
Noxalus / test.cpp
Last active May 23, 2017 23:35
GearVR intergration with SDL
// Setup the Java references.
ovrJava java;
auto jniEnv = (JNIEnv*)SDL_AndroidGetJNIEnv();
JavaVM* javaVm;
jniEnv->GetJavaVM(&javaVm);
auto activity = (jobject)SDL_AndroidGetActivity();
@mollerse
mollerse / gulpfile-express.js
Last active March 28, 2021 20:07
Gulpfile for livereload + static server
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
embedlr = require('gulp-embedlr'),
refresh = require('gulp-livereload'),
lrserver = require('tiny-lr')(),
express = require('express'),
livereload = require('connect-livereload')
livereloadport = 35729,
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active November 14, 2024 09:13
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
irb(main):001:0> module Foo
irb(main):002:1> extend self
irb(main):003:1> def bar
irb(main):004:2> 1
irb(main):005:2> end
irb(main):006:1> end
=> nil
irb(main):007:0> Foo.bar
=> 1
irb(main):008:0> module Bar