Skip to content

Instantly share code, notes, and snippets.

@ousttrue
ousttrue / SingleThreadSynchronizationContext.cs
Created August 28, 2015 18:45
SynchronizationContext sample
using Reactive.Bindings;
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Reactive.Concurrency;
using System.Reactive.Linq;
using System.Threading;
using System.Windows.Input;
@ousttrue
ousttrue / gist:9149399
Created February 22, 2014 06:07
std::initializer_list test in vc2013
#include <iostream>
#include <limits>
#include <vector>
#include <string>
#include <list>
template<typename T>
struct node
{
@ousttrue
ousttrue / Camera (Transform MyOrbit).v4p
Created January 12, 2015 14:43
vvvv custom camera node
<!DOCTYPE PATCH SYSTEM "http://vvvv.org/versions/vvvv45beta33.3.dtd" >
<PATCH nodename="\addonpack\lib\nodes\modules\Transform\Camera (Transform MyOrbit).v4p" systemname="Camera (Transform MyOrbit)" filename="C:\Users\Natan\Dropbox\_Software\_GEA\Transform\Camera (Transform Orbit)\Camera (Transform Orbit).v4p" scrollx="0" scrolly="0">
<BOUNDS type="Window" left="4305" top="435" width="19995" height="14625">
</BOUNDS>
<INFO author="ousttrue" description="orbit camera transform module" tags="camera">
</INFO>
<NODE nodename="IOBox (Node)" componentmode="InABox" id="121" systemname="IOBox (Node)">
<BOUNDS type="Node" left="930" top="17715" width="0" height="0">
</BOUNDS>
<BOUNDS type="Box" left="930" top="17715" width="795" height="240">
@ousttrue
ousttrue / PmdModel.cs
Created January 12, 2015 20:48
PmdModel
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VVVV.Utils.VColor;
@ousttrue
ousttrue / GeometryMeshLoaderNode.cs
Created January 12, 2015 20:50
GeometryMeshLoaderNode for VVVV
#region usings
using System;
using System.ComponentModel.Composition;
using VVVV.PluginInterfaces.V1;
@ousttrue
ousttrue / ReacContext.cs
Last active August 29, 2015 14:27
C# stream reader
class ReadContext : IDisposable
{
public Stream Stream { get; private set; }
public Subject<Byte[]> Subject { get; private set; }
public Byte[] Buffer { get; private set; }
public Exception Error { get; private set; }
public DateTimeOffset Start { get; private set; }
public DateTimeOffset End { get; private set; }
// CFLAGS=`wx-config --cflags`
// LDFLAGS=`wx-config --libs gl`
#ifndef _FRAME_H
#define _FRAME_H
#include <wx/wx.h>
#include <wx/glcanvas.h>
#ifdef _MSC_VER
#pragma comment(lib, "opengl32.lib")
#endif
// g++ main.cpp -lGL -lGLU -lglut
#include <cmath>
#include <iostream>
#include <GL/glut.h>
#include <boost/shared_ptr.hpp>
//------------------------------------------------------------//
// vector, quaternion
//------------------------------------------------------------//
struct Quaternion;
@ousttrue
ousttrue / wxAui_sample.cpp
Created April 6, 2009 12:39
wxAui event sample
#include <wx/wx.h>
#include <wx/aui/aui.h>
#include <map>
class CursorView: public wxPanel
{
wxTextCtrl *x_;
wxTextCtrl *y_;
public:
@ousttrue
ousttrue / gist:282897
Created January 21, 2010 15:50
c++ dds loader
#include <iostream>
#include <fstream>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/static_assert.hpp>
///////////////////////////////////////////////////////////////////////////////
// RGBA
///////////////////////////////////////////////////////////////////////////////
struct RGBA