Skip to content

Instantly share code, notes, and snippets.

Avatar

Satoru Higa satoruhiga

View GitHub Profile
@satoruhiga
satoruhiga / .clang-format
Last active Aug 29, 2015
.clang-format setting
View .clang-format
BasedOnStyle: Google
Standard: Cpp03
# BreakBeforeBraces: Allman
PointerBindsToType: true
DerivePointerBinding: false
# tab
UseTab: Always
TabWidth: 4
@satoruhiga
satoruhiga / configure_osx_32bit
Last active Apr 3, 2016
configure_osx_32bit
View 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"
View NoiseCircle.h
#pragma once
#include "ofMain.h"
class NoiseCircle
{
public:
float noise_amt;
float noise_speed;
View ofxOscMultiSender.h
#pragma once
#include "ofxOsc.h"
class ofxOscMultiSender
{
public:
void setup(std::string hostname, int port)
{
View .gitignore
.svn
.hg
.cvs
# osx
.DS_Store
.AppleDouble
.LSOverride
Icon
*.app
@satoruhiga
satoruhiga / get_finder_path.sh
Last active Apr 3, 2016
get_finder_path.sh
View 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 Dec 6, 2019
convert mov to gif animation
View mov2gif.py
#!/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
Tile layouted image preview
View PixelPreview.hpp
#pragma once
#include "ofMain.h"
class PixelPreview
{
struct Panel
{
typedef ofPtr<Panel> Ref;
View TimedomainMedianFilter.hpp
#pragma once
#include "ofMain.h"
template <typename T>
class TimedomainMedianFilter
{
public:
TimedomainMedianFilter() : num_frame_buffer(5), current_frame_index(0) {}
View Spectrum.h
#pragma once
#include "ofMain.h"
class Spectrum
{
public:
Spectrum() : buffer_size(100), x_scale(0.001) {}