Skip to content

Instantly share code, notes, and snippets.

View depthlove's full-sized avatar

depthlove depthlove

View GitHub Profile
@georgmay
georgmay / GPUImageFiveInputFilter.h
Created December 13, 2014 05:13
GPUImageFilter with custom shader up for five textures. Never thought I'd gonna make something like this.
#import <GPUImage/GPUImage.h>
#import "GPUImageFourInputFilter.h"
@interface GPUImageFiveInputFilter : GPUImageFourInputFilter
{
GPUImageFramebuffer *fifthInputFramebuffer;
GLint filterFifthTextureCoordinateAttribute;
GLint filterInputTextureUniform5;
GPUImageRotationMode inputRotation5;
#import <AVFoundation/AVFoundation.h>
#import "GPUImageLayer.h"
#import "GPUImageOutput.h"
#import "GPUImageFilter.h"
@interface GPUImageLayer() {
GPUImageFramebuffer *inputFramebufferForDisplay;
GLProgram *displayProgram;
GLint displayPositionAttribute, displayTextureCoordinateAttribute;
@dnlcrl
dnlcrl / xibtonib.sh
Last active December 13, 2021 11:11 — forked from ssp/xibtonib.sh
Convert .xib files to .nib files
#! /bin/sh
find . -name "*.xib" -type f | awk '{sub(/.xib/,"");print}' | xargs -I % ibtool --compile %.nib %.xib
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@faithfracture
faithfracture / boost.sh
Last active August 5, 2025 22:30
Boost build script for iOS (armv7, armv7s, arm64), iOS Simulator (i386, x86_64), and OSX (i386, x86_64)
#===============================================================================
# Filename: boost.sh
# Author: Pete Goodliffe
# Copyright: (c) Copyright 2009 Pete Goodliffe
# Licence: Please feel free to use this, with attribution
# Modified version
#===============================================================================
#
# Builds a Boost framework for iOS, iOS Simulator, and OSX.
# Creates a set of universal libraries that can be used on an iOS and in the
@netpoetica
netpoetica / Compiling v8 and Hello, World Example on Mac OSX Mavericks (10.9.4).md
Last active August 7, 2022 09:25
Compiling v8 and Hello, World Example on Mac OSX Mavericks (10.9.4), Link Clang to Static Libraries, properly configure your environment for v8 build

Compiling v8 and Hello, World Example on Mac OSX Mavericks (10.9.4)

by Keith Rosenberg (netpoetica)

Note: do this in some sort of project/ directory that makes sense. depot_tools are going to need to be in your path, so you may want to install them somewhere you are comfortable with.

1) Get the v8 source

git clone https://github.com/v8/v8.git

2) Install depot tools

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active October 24, 2025 15:58
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@kharmabum
kharmabum / bluetooth-audio.m
Last active December 11, 2021 04:11
Bluetooth audio session set up
// App delegate
#import <AVFoundation/AVFoundation.h>// place in .h
// applicationDidFinishLaunchingWithOptions
// [self prepareAudioSession];
- (BOOL)prepareAudioSession {
// deactivate session
// For responding to the user accepting a newly-captured picture or movie
- (void) imagePickerController: (UIImagePickerController *) picker
didFinishPickingMediaWithInfo: (NSDictionary *) info {
NSString *mediaType = [info objectForKey: UIImagePickerControllerMediaType];
[self dismissModalViewControllerAnimated:NO];
// Handle a movie capture
if (CFStringCompare ((__bridge_retained CFStringRef)mediaType, kUTTypeMovie, 0)