Skip to content

Instantly share code, notes, and snippets.

View transitive-bullshit's full-sized avatar
👋
Searching for AGI

Travis Fischer transitive-bullshit

👋
Searching for AGI
View GitHub Profile
@transitive-bullshit
transitive-bullshit / billboard_sao.frag
Created September 30, 2013 21:08
WebGL GLSL SAO (Scalable Ambient Obscurance) fragment shader. SAO is a more efficient method for computing SSAO (Screen-Space Ambient Occlusion). Converts the g-buffer to an occlusion buffer which estimates local ambient occlusion at each fragment in screen-space. For details on the technique itself, see: McGuire et al [12] http://graphics.cs.wi…
// total number of samples at each fragment
#define NUM_SAMPLES {{ numSamples }}
#define NUM_SPIRAL_TURNS {{ numSpiralTurns }}
#define USE_ACTUAL_NORMALS {{ useActualNormals }}
#define VARIATION {{ variation }}
uniform sampler2D sGBuffer;
@transitive-bullshit
transitive-bullshit / billboard_hbao.frag
Created September 30, 2013 21:10
WebGL GLSL HBAO (Horizon-Based Ambient Occlusion) fragment shader. HBAO is a higher quality approach for computing SSAO (Screen-Space Ambient Occlusion) developed by Nvidia in 2008. Converts the g-buffer to an occlusion buffer which estimates local ambient occlusion at each fragment in screen-space. Specifically, the technique views the depth bu…
// number of directions to sample in UV space
#define NUM_SAMPLE_DIRECTIONS {{ numSampleDirections }}
// number of sample steps when raymarching along a direction
#define NUM_SAMPLE_STEPS {{ numSampleSteps }}
#define APPLY_ATTENUATION {{ attenuation }}
#define USE_ACTUAL_NORMALS {{ useActualNormals }}
@transitive-bullshit
transitive-bullshit / billboard_ssao.frag
Created September 30, 2013 21:12
WebGL GLSL SSAO (Screen-Space Ambient Occlusion) fragment shader. Converts the g-buffer to an occlusion buffer which estimates local ambient occlusion at each fragment in screen-space. This SSAO version uses per-fragment depth and normal data to integrate local visibility over a normal-oriented hemisphere in world space by comparing the linear d…
#define SAMPLE_COUNT {{ sampleCount }}
#define USE_ACTUAL_NORMALS {{ useActualNormals }}
uniform sampler2D sGBuffer;
uniform sampler2D sNoise;
uniform float uSampleRadius;
uniform float uIntensity;
uniform vec2 uNoiseScale;
uniform vec3 uKernel[SAMPLE_COUNT];
> bittorrent-client@0.0.2 test /Users/tfischer/dev/torrents/bittorrent-client
> tape test/*.js
TAP version 13
# Download "Pride and Prejudice" by Jane Austen
Swarm listening on port 61289
Connecting to 114.108.216.168:46664
Connecting to 179.186.192.81:61966
Connecting to 188.79.133.210:45549
Connecting to 173.168.15.192:48599
@transitive-bullshit
transitive-bullshit / gulpfile.js
Last active August 29, 2015 14:02
gulp-prefix simple use case issue
var gulp = require('gulp')
var $ = require('gulp-load-plugins')()
gulp.task('default', function () {
return gulp.src('index.html')
.pipe($.prefix('https://mycdn.com/assets/'))
.pipe(gulp.dest('dist'))
})
@transitive-bullshit
transitive-bullshit / image-service.js
Last active November 12, 2021 12:22
Angular service to resize images with antialiasing for use with canvas.
angular.module('demo').service('imageService', function ($http, $q, $timeout) {
var NUM_LOBES = 3
var lanczos = lanczosGenerator(NUM_LOBES)
// resize via lanczos-sinc convolution
this.resize = function (img, width, height) {
var self = { }
self.type = "image/png"
self.quality = 1.0
2014-12-02 14:43:50.862 Broad City Keyboard[8139:184812] [HockeySDK] WARNING: HockeySDKResources.bundle is missing, make sure it is added!
2014-12-02 14:43:50.898 Broad City Keyboard[8139:184812] [HockeySDK] WARNING: HockeySDKResources.bundle is missing, built in UI is deactivated!
2014-12-02 14:43:50.912 Broad City Keyboard[8139:184812] [HockeySDK] WARNING: Detecting crashes is NOT enabled due to running the app with a debugger attached.
2014-12-02 14:43:50.951 Broad City Keyboard[8139:184812] <Mixpanel: 0x1781e3600 9b3e0d26a1ec92ec8fe651158e8c3ba4> successfully set up reachability callback
2014-12-02 14:43:50.954 Broad City Keyboard[8139:184812] <Mixpanel: 0x1781e3600 9b3e0d26a1ec92ec8fe651158e8c3ba4> unarchived data from /var/mobile/Containers/Data/PluginKitPlugin/FE7A65D9-2C25-424E-A831-7FB10111179C/Library/mixpanel-9b3e0d26a1ec92ec8fe651158e8c3ba4-events.plist: (
{
event = "keyboard_launched";
properties = {
"$app_release" = "1.0.0";
"$app_version"
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="user-scalable=no, minimum-scale=1.0, initial-scale=1.0">
<style>
body { margin: 0 0; padding: 0 0; width: 100%; height: 100%; min-height: 100%; background: #000; }
#player { width: 100%; height: 100%; min-height: 100%; }
</style>
</head>
- (void)onSuccess:(Portrait *)portrait
{
if (![[NSUserDefaults standardUserDefaults] boolForKey:kQuettraPortraitKey]) {
NSString *device = portrait.basics.device ? portrait.basics.device : @"null";
NSString *carrier = portrait.basics.carrier ? portrait.basics.carrier : @"null";
NSString *locale = portrait.basics.locale ? portrait.basics.locale : @"null";
NSString *country = portrait.basics.country ? portrait.basics.country : @"null";
NSString *age = portrait.basics.age ? portrait.basics.age : @"null";
NSString *gender = portrait.basics.gender ? portrait.basics.gender : @"null";
~/Downloads/old videos $ ffprobe Candace_Veronica284x160.mp4
ffprobe version 2.3.3 Copyright (c) 2007-2014 the FFmpeg developers
built on Nov 26 2014 03:23:06 with Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.3.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
libavutil 52. 92.100 / 52. 92.100
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 48.100 / 55. 48.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.100 / 4. 11.100
libavresample 1. 3. 0 / 1. 3. 0