Skip to content

Instantly share code, notes, and snippets.

Liam Staskawicz liamstask

View GitHub Profile
liamstask / listener.cpp
Created Mar 30, 2016
fast-rtps subscriber issue
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;

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.


View main.go
package main
func main() {
liamstask / middleman s3 deploy
Created Feb 19, 2014
a script for deploying a middleman site to s3. any gzip'd files have their extension removed so that s3 can serve them directly without another server required to perform content negotiation.
View middleman s3 deploy
#!/usr/bin/env python
import os, shutil, subprocess
SITE = 'build/'
BUCKET = 's3://'
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
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).
View gist:6587435
drungus:googlecode liam$ brew install hg -v
==> Downloading
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 build
running build
running build_mo
You can’t perform that action at this time.