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 / ofxMaxCollTextParser.h
Last active Aug 29, 2015
ofxMaxCollTextParser.h
View ofxMaxCollTextParser.h
#pragma once
#include "ofMain.h"
class ofxMaxCollTextParser
{
public:
bool open(const string& path)
{
View CollectAllWindows.applescript
(*
collect all windows
http://apple.stackexchange.com/questions/709/how-to-retrieve-windows-that-have-moved-off-screen
http://d.hatena.ne.jp/hirose31/20111213/1323761962
*)
property processesToIgnore : {}
tell (do shell script "/usr/sbin/system_profiler SPDisplaysDataType | grep Resolution | tail -n 1") to set {screen_width, screen_height} to {word 2, word 4}
View ofxNanoSVG.h
#pragma once
#define NANOSVG_IMPLEMENTATION
#include "nanosvg.h"
class ofxNanoSVG
{
public:
bool load(const string& filepath)
View TypedArray.h
#include <vector>
#include <cmath>
#include <assert.h>
class ArrayBuffer
{
public:
ArrayBuffer(size_t size)
: data_(size, 0)
View PackedBuffer.h
template <typename T, bool (*remove_predicate)(const T&)>
class PackedBuffer
{
public:
PackedBuffer(size_t size)
: size_(0)
, buffer_(size)
{}
@satoruhiga
satoruhiga / SimpleKalmanFilter
Last active Sep 24, 2015
SimpleKalmanFilter
View SimpleKalmanFilter
class SimpleKalmanFilter
{
public:
float xhat, xhatminus;
float P, Pminus;
float _x, _p;
float Q, R, K;
View tellmeUSBSerialDevice.h
#pragma once
#include "ofMain.h"
inline void tellmeUSBSerialDevice()
{
ofDirectory dir;
int n = dir.listDir("/dev");
vector<string> arr;
View uncrustify.cfg
indent_align_string=false
indent_braces=false
indent_braces_no_func=false
indent_brace_parent=false
indent_namespace=false
indent_extern=false
indent_class=true
indent_class_colon=false
indent_else_if=false
indent_func_call_param=false
@satoruhiga
satoruhiga / chrome search engine settings
Created May 25, 2011
my chrome search engine settings
View chrome search engine settings
Google ja:
http://www.google.com/search?lr=lang_ja&q=%s
Google en:
http://www.google.com/search?lr=lang_en&q=%s
oF forum:
http://www.google.com/search?sitesearch=http%3A%2F%2Fforum.openframeworks.cc&q=%s
C++ reference:
http://www.google.com/search?sitesearch=http%3A%2F%2Fwww.cppreference.com/wiki/&q=%s
C++ reference(ja):
http://www.google.com/search?sitesearch=http%3A%2F%2Fwww.cppreference.com/wiki/jp/&q=%s