Skip to content

Instantly share code, notes, and snippets.

@torus
torus / command-key-on-nodoka.md
Created October 3, 2010 06:52
のどかで、Mac みたいなキーバインドを実現する。

のどかで、Mac みたいなキーバインドを実現する。

Ctrl キーは、Emacs 的なキーバインド。

Windows キーは、オリジナルの Windows での Ctrl キーのように振舞う。

Windows キーと Ctrl キーを区別するために、 Ctrl キーについては mod0 という新しいモディファイアとして扱うようにして、 emacsedit.nodoka ファイルを修正して、C- となっている部分をすべて M0- に置き換えた。

@usrlocalben
usrlocalben / stackblur.cpp
Created October 1, 2012 02:24
stackblur - c++, floating-point, vectorized
/*
* "stackblur"
* originally, Mario Klingemann, mario@quasimondo.com
* this implementation, Benjamin Yates (benjamin@rqdq.com)
* http://incubator.quasimondo.com/processing/stackblur.pde
*
* this blur routine seems to be quite popular.
*
* unfortunately, mario didn't comment anything.
* but, it's easy to see it's just a flavor of a two-pass
@eieio
eieio / hsv2rgb.glsl
Created November 19, 2012 09:22
GLSL HSV to RGB+A
/*
* GLSL HSV to RGB+A conversion. Useful for many effects and shader debugging.
*
* Copyright (c) 2012 Corey Tabaka
*
* Hue is in the range [0.0, 1.0] instead of degrees or radians.
* Alpha is simply passed through for convenience.
*/
vec4 hsv_to_rgb(float h, float s, float v, float a)
@wteuber
wteuber / fmod.js
Last active February 6, 2024 14:47
fmod for Javascript, will work with any ECMA-262 implementation.If you need a precision higher than 8, please use another implementaion of fmod.
/*
fmod for Javascript, will work with any ECMA-262 implementation.
If you need a precision higher than 8, please use another implementation of fmod.
1.05 % 0.05
=> 0.04999999999999999
Math.fmod(1.05, 0.05)
=> 0
@satoruhiga
satoruhiga / .gitignore
Last active October 6, 2016 10:48
.gitignore
.svn
.hg
.cvs
# osx
.DS_Store
.AppleDouble
.LSOverride
Icon
*.app
@mohayonao
mohayonao / tree.txt
Last active August 29, 2015 13:57
SuperCollider、基本のオブジェクトまとめ
Object
+---------------------+-------------------------------------------+------------------+----+-------+------------+
Magnitude Collection AbstractFunction Ref Symbol Boolean Nil
+--------------+ +-----------------------+ +---------+ ` \ +-----+
Number Char SequenceableCollection Set Function Stream True False
| $. | | {} +--------+
SimpleNumber ArrayedCollection Dictionary Thread PauseStream
| | +------+ | | |
Integer Float Array RawArray IdentityDictionary Routine Task
1 1.0 [] | | {:}
#!/bin/sh
cd `dirname $0`
dir_addons=$(cd ../addons; pwd) # {OFRoot}/addons
dir_aliases=$(cd $(dirname $0); pwd) # {OFRoot}/addons-alias
numOfxAddon=0
cd $dir_addons
#include "ofMain.h"
#include "ofxCv.h"
const string path_0 = "prev.tif";
const string path_1 = "cur.tif";
class ofApp : public ofBaseApp
{
ofVideoGrabber video;
ofxCv::FlowFarneback forward;
@moxuse
moxuse / gist:d08975cb02936fd07473
Last active March 10, 2016 05:23
oF on SAKURA VPS
// 前提条件
// サクラVPS OS Ubuntu 14.04
// 下準備
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install pkg-config
// linux用のoFをDLしてきて
@satoruhiga
satoruhiga / ofxAutoSaveParam.h
Last active April 3, 2016 14:59
ofxAutoSaveParam.h
#pragma once
/*
USAGE:
ofxAutoSaveParam param;
class ofApp {
public: