Skip to content

Instantly share code, notes, and snippets.

@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 / 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"
#pragma once
#include "ofMain.h"
class NoiseCircle
{
public:
float noise_amt;
float noise_speed;
@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)
{
@satoruhiga
satoruhiga / .gitignore
Last active October 6, 2016 10:48
.gitignore
.svn
.hg
.cvs
# osx
.DS_Store
.AppleDouble
.LSOverride
Icon
*.app
@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 / 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 / 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 / TimedomainMedianFilter.hpp
Created May 8, 2013 18:44
TimedomainMedianFilter
#pragma once
#include "ofMain.h"
template <typename T>
class TimedomainMedianFilter
{
public:
TimedomainMedianFilter() : num_frame_buffer(5), current_frame_index(0) {}
@satoruhiga
satoruhiga / Spectrum.h
Last active April 3, 2016 14:46
Spectrum.h
#pragma once
#include "ofMain.h"
class Spectrum
{
public:
Spectrum() : buffer_size(100), x_scale(0.001) {}