Skip to content

Instantly share code, notes, and snippets.

@jvcleave
jvcleave / video.c
Last active November 22, 2018 18:38
image_fx test
/*
Copyright (c) 2012, Broadcom Europe Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
@jvcleave
jvcleave / gist:a4ac1fbf23686ec035767315008538bf
Created April 11, 2018 19:21
RPI HDMI to Capture compatible
hdmi_force_hotplug=1
hdmi_ignore_edid=0xa5000080
config_hdmi_boost=4
hdmi_group=1
hdmi_mode=4
disable_overscan=0
overscan_left=24
overscan_right=24
overscan_top=24
overscan_bottom=24
@jvcleave
jvcleave / build_cross_gcc.sh
Last active November 1, 2019 07:18
Stretch build
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.
#pragma once
#include "ofMain.h"
#include "ofxImGui.h"
class ListBoxContent
{
public:
//--------------------------------------------------------------
void ofApp::setup() {
NSURL* videoUrl = [NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:@"hands" ofType:@"m4v"]];
AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:videoUrl options:nil];
AVAssetImageGenerator *generator = [[AVAssetImageGenerator alloc] initWithAsset:asset];
generator.requestedTimeToleranceAfter = kCMTimeZero;
generator.requestedTimeToleranceBefore = kCMTimeZero;
@jvcleave
jvcleave / libpng.sh
Created January 1, 2017 05:49 — forked from dulacp/libpng.sh
Download & Compile Libpng for iOS (all architectures)
# Builds a Libpng framework for the iPhone and the iPhone Simulator.
# Creates a set of universal libraries that can be used on an iPhone and in the
# iPhone simulator. Then creates a pseudo-framework to make using libpng in Xcode
# less painful.
#
# To configure the script, define:
# IPHONE_SDKVERSION: iPhone SDK version (e.g. 8.1)
#
# Then go get the source tar.bz of the libpng you want to build, shove it in the
# same directory as this script, and run "./libpng.sh". Grab a cuppa. And voila.
fbo.allocate(256, 256);
fbo.begin();
ofClear(0);
int step = 16;
int numRows, numCols;
numRows = numCols = fbo.getWidth() / step;
ofColor color1 = ofColor::white;
ofColor color2= ofColor::black;
ofColor lastColor = color1;
@jvcleave
jvcleave / main.cpp
Last active July 27, 2016 19:25
modern geometryShaderExample
#include "ofMain.h"
#define STRINGIFY(x) #x
class ofApp : public ofBaseApp
{
public:
ofShader shader;
@jvcleave
jvcleave / ofApp.h
Created May 11, 2016 05:23
memcpy ofMesh
#pragma once
#include "ofMain.h"
class ofApp : public ofBaseApp{
public:
vector<ofVec3f>points;
vector<ofVec3f>outsidePoints;
@jvcleave
jvcleave / build.sh
Last active March 21, 2016 18:51
ARCH CROSS COMPILE FOR ARM7/RPI3
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.