Skip to content

Instantly share code, notes, and snippets.


@roxlu ☾ roxlu

View GitHub Profile
roxlu / main.cpp
Created Feb 22, 2014
View main.cpp
Very basic application which generates a poster from a
set of images. This application was created because I wanted
to have a poster from my instagram images. It uses a couple of
php files that login to my instagram account and generates a
shell script which downloads them to a directory.

Mitchell’s best-candidate algorithm generates a new random sample by creating k candidate samples and picking the best of k. Here the “best” sample is defined as the sample that is farthest away from previous samples. The algorithm approximates Poisson-disc sampling, producing a much more natural appearance (better blue noise spectral characteristics) than uniform random sampling.

See also the white-on-black and Voronoi variations of this example.

View krx_dtls.c
#include "krx_dtls.h"
int krx_dtls_init() {
return 0;
roxlu / test_vorbis.c
Last active Aug 29, 2015
Decoding vorbis flow (w/o cleanup yet).
View test_vorbis.c
See online version:
Example code which decodes a .ogg file that contains vorbis and/or
some other stream, e.g. theora. We ignore all non-vorbis streams and
simply flush the packets.
roxlu / Parsing_Stun.txt
Created Jul 31, 2014
Some test data that can be used when parsing stun messages (WebRTC/ICE/STUN)
View Parsing_Stun.txt
Below is a dump of a STUN message that can be used to validate your
STUN message integrity check. The password that is used to encrypt
the Message-Integrity is: "Q9wQj99nsQzldVI5ZuGXbEWRK5RhRXdC" (without quotes)
/* Raw STUN message as received from Chrome */
00 01 00 58
21 12 A4 42
48 75 38 77
roxlu / Reader.cpp
Created Jul 31, 2014
Testing the integrity of stun message. See and (validates correctly, code is still work in progress).
View Reader.cpp
#include <stun/Reader.h>
#include <openssl/engine.h>
#include <openssl/hmac.h>
#include <openssl/evp.h>
namespace stun {
/* --------------------------------------------------------------------- */
roxlu / test_fex_load_image.cpp
Created Aug 22, 2014
Examples on how to load + reuse memory using rx_load_png and rx_load_jpg
View test_fex_load_image.cpp
Plain test which loads + reloads a couple of images and reallocating the
previously allocated buffer when needed. Just a tiny test to speed up
the image loading process.
View coords.txt
dding: 422.593750, 34.640625
Adding: 422.593750, 36.640625
Adding: 422.593750, 41.863281
Adding: 422.593750, 49.175781
Adding: 422.593750, 66.929688
Adding: 422.593750, 75.285156
Adding: 422.593750, 84.687500
Adding: 422.593750, 93.042969
Adding: 422.593750, 100.355469
Adding: 422.593750, 110.101562
View move.mod
PERS tooldata myTool:=[TRUE,[[0,0,1],[1,0,0,0]],[1,[0,0,0.1],[1,0,0,0],0,0,0]];
TASK PERS wobjdata myWobj:=[FALSE,TRUE,"",[[400,0,400],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];
!CONST robtarget myRobtarget:=[[0,0,0],[0.707107,0,0.707107,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
VAR robtarget myRobtarget:=[[0,0,0],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
VAR socketdev server_socket;
VAR socketdev client_socket;
PROC main()
! SocketCreate server_socket;
roxlu / fun.cpp
Last active Aug 29, 2015 — forked from kizzx2/fun.cpp
View fun.cpp
// fun.cpp
extern "C"
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include <iostream>