Skip to content

Instantly share code, notes, and snippets.

@satoruhiga
satoruhiga / PixelPreview.hpp
Created May 21, 2013 08:30
Tile layouted image preview
#pragma once
#include "ofMain.h"
class PixelPreview
{
struct Panel
{
typedef ofPtr<Panel> Ref;
@satoruhiga
satoruhiga / mov2gif.py
Last active August 24, 2022 08:43
convert mov to gif animation
#!/usr/bin/env python
'''
DEPENDENCIES:
$ brew install ffmpeg
$ brew install imagemagick
$ python ./mov2gif.py input.mov output.gif 15
'''
@satoruhiga
satoruhiga / get_finder_path.sh
Last active April 3, 2016 14:46
get_finder_path.sh
#!/bin/sh
/usr/bin/osascript -e 'tell application "Finder" to get POSIX path of (target of window 1 as string)'
@satoruhiga
satoruhiga / .gitignore
Last active October 6, 2016 10:48
.gitignore
.svn
.hg
.cvs
# osx
.DS_Store
.AppleDouble
.LSOverride
Icon
*.app
@satoruhiga
satoruhiga / ofxOscMultiSender.h
Created August 29, 2013 11:49
ofxOscMultiSender.h
#pragma once
#include "ofxOsc.h"
class ofxOscMultiSender
{
public:
void setup(std::string hostname, int port)
{
#pragma once
#include "ofMain.h"
class NoiseCircle
{
public:
float noise_amt;
float noise_speed;
@satoruhiga
satoruhiga / configure_osx_32bit
Last active April 3, 2016 14:45
configure_osx_32bit
#!/bin/bash
ARCH="-arch i386"
SDK="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
SDKLIB="-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
export MACOSX_DEPLOYMENT_TARGET="10.7"
export CFLAGS="$ARCH $SDK -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
@satoruhiga
satoruhiga / .clang-format
Last active August 29, 2015 13:56
.clang-format setting
BasedOnStyle: Google
Standard: Cpp03
# BreakBeforeBraces: Allman
PointerBindsToType: true
DerivePointerBinding: false
# tab
UseTab: Always
TabWidth: 4
@satoruhiga
satoruhiga / ofxMaxCollTextParser.h
Last active August 29, 2015 14:04
ofxMaxCollTextParser.h
#pragma once
#include "ofMain.h"
class ofxMaxCollTextParser
{
public:
bool open(const string& path)
{
@satoruhiga
satoruhiga / BAD_TUNE_TV.fs
Last active April 3, 2016 14:43
BAD_TUNE_TV.fs
/*{
"DESCRIPTION": "BAD_TUNE_TV",
"CREDIT": "by satoruhiga",
"CATEGORIES": [
"GLSL FX"
],
"INPUTS": [
{
"NAME": "inputImage",
"TYPE": "image"