Instantly share code, notes, and snippets.

View listener.cpp
bool Listener::init(Participant *p)
{
// set up subscription for Latency msgs
SubscriberAttributes sa;
sa.topic.topicKind = NO_KEY;
sa.topic.topicDataType = "TestTopicType";
sa.topic.topicName = "HelloTopic";
// sa.qos.m_reliability.kind = BEST_EFFORT_RELIABILITY_QOS;
sa.qos.m_reliability.kind = RELIABLE_RELIABILITY_QOS;
View rtps-overview.md

RTPS - what is it?

RTPS (Real Time Publish Subscribe) is a spec that describes a pub/sub based messaging system and wire protocol. It can run on any transport capable of delivering datagrams (delimited, uncorrupted packets), so UDP is a good fit.

RTPS concepts

An RTPS system consists of a network of participants (there is no master node). A participant is a grouping of topic publications and subscriptions - it usually corresponds one to one with a process.

Topics

View main.go
package main
func main() {
println("main")
}
View middleman s3 deploy
#!/usr/bin/env python
import os, shutil, subprocess
SITE = 'build/'
BUCKET = 's3://mybucket.com/'
CMD = ['s3cmd', '-c', os.path.expanduser('~/.s3cfg-myconfig'), 'sync', '--acl-public', '--reduced-redundancy']
CACHE_10_WEEKS = "Cache-Control: max-age=6048000"
View openframeworks sketch
void P_1_1_2_01App::setup()
{
savePDF = false;
segmentCount = 360;
radius = 300;
ofSetWindowShape(800, 800);
}
void P_1_1_2_01App::draw()
{
View gist:7225393
drungus:project liam$ brew install -v glfw3 --universal
==> Downloading http://downloads.sourceforge.net/project/glfw/glfw/3.0.3/glfw-3.0.3.tar.bz2
Already downloaded: /Library/Caches/Homebrew/glfw3-3.0.3.tar.bz2
tar xf /Library/Caches/Homebrew/glfw3-3.0.3.tar.bz2
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file CMakeLists.txt
Hunk #1 succeeded at 373 with fuzz 1 (offset 16 lines).
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/glfw3/3.0.3 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DGLFW_USE_CHDIR=TRUE -DGLFW_USE_MENUBAR=TRUE -DGLFW_BUILD_UNIVERSAL=TRUE -DBUILD_SHARED_LIBS=TRUE .
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/glfw3/3.0.3 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DGLFW_USE_CHDIR=TRUE -DGLFW_USE_MENUBAR=TRUE -DGLFW_BUILD_UNIVERSAL=TRUE -DBUILD_SHARED_LIBS=TRUE .
View gist:6587435
drungus:googlecode liam$ brew install hg -v
==> Downloading http://mercurial.selenic.com/release/mercurial-2.7.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/mercurial-2.7.1.tar.gz
tar xf /Library/Caches/Homebrew/mercurial-2.7.1.tar.gz
brew: PYTHONPATH=/usr/local/Cellar/mercurial/2.7.1/lib/python2.7/site-packages:/usr/local/Cellar/mercurial/2.7.1/libexec/lib/python2.7/site-packages
==> make PREFIX=/usr/local/Cellar/mercurial/2.7.1 install-bin
make PREFIX=/usr/local/Cellar/mercurial/2.7.1 install-bin
python setup.py build
running build
running build_mo