Skip to content

Instantly share code, notes, and snippets.

@patriciogonzalezvivo
patriciogonzalezvivo / tripMaker.py
Last active May 13, 2016 15:11
Make a GeoJson line from point A to point B using mapzen's Valhalla routing engine
#!/usr/bin/env python
import requests, json, sys
import geojson
#six degrees of precision in valhalla
inv = 1.0 / 1e6;
#decode an encoded string
def decode(encoded):
@patriciogonzalezvivo
patriciogonzalezvivo / toxic
Created June 27, 2015 12:55
Compiling a Tox Client in RPi
git clone git://github.com/jedisct1/libsodium.git
cd libsodium
git checkout tags/1.0.0
./autogen.sh
./configure && make check
sudo checkinstall --install --pkgname libsodium --pkgversion 1.0.0 --nodoc
sudo ldconfig
cd ..
git clone git://github.com/irungentoo/toxcore.git
// Author: @patriciogv ( patricio.io )
#include <stdio.h> // standard input / output functions
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <string.h> // string function definitions
#include <unistd.h> // UNIX standard function definitions
#include <fcntl.h> // File control definitions
#include <errno.h> // Error number definitions
@patriciogonzalezvivo
patriciogonzalezvivo / ubuntu.md
Last active August 29, 2015 14:19
Ubuntu post-installs

Sysadmin

sudo apt-get install nmap iptraf tcpdump dstat ngrep mtr nc lftp irssi iotop

IDE station

sudo apt-get install git-core tmux mc htop vim zsh lsof
@patriciogonzalezvivo
patriciogonzalezvivo / SFM.md
Last active January 25, 2025 18:07
SfM Tools

Probably the most straight forward way to start generating Point Clouds from a set of pictures.

VisualSFM is a GUI application for 3D reconstruction using structure from motion (SFM). The reconstruction system integrates several of my previous projects: SIFT on GPU(SiftGPU), Multicore Bundle Adjustment, and Towards Linear-time Incremental Structure from Motion. VisualSFM runs fast by exploiting multicore parallelism for feature detection, feature matching, and bundle adjustment.

For dense reconstruction, this program supports Yasutaka Furukawa's PMVS/CMVS tool chain, and can prepare data for Michal Jancosek's CMP-MVS. In addition, the output of VisualSFM is natively supported by Mathias Rothermel and Konrad Wenzel's [SURE]

@patriciogonzalezvivo
patriciogonzalezvivo / postgisOSM-LAS.md
Last active May 10, 2022 08:55
Loading OSM and LIDar to PostGIS
@patriciogonzalezvivo
patriciogonzalezvivo / PythonSetup.md
Created October 7, 2014 23:17
How to install Python correctly on Mac OSX

Install Homebrew

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Add PATH to ~/.bash_profile and ~/.zshrc

export PATH=/usr/local/bin:$PATH
@patriciogonzalezvivo
patriciogonzalezvivo / SimpleCameraFollower.md
Last active September 19, 2021 19:20
Simple Camara Follow in OF
cam.setPosition( cam.getPosition()+(targetPos-cam.getPosition())*0.01 );
cam.lookAt(targetPos);

Simple Quad

glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f(0, 0, 0);
glTexCoord2f(width, 0); glVertex3f(width, 0, 0);
glTexCoord2f(width, height); glVertex3f(width, height, 0);
glTexCoord2f(0,height);  glVertex3f(0,height, 0);
glEnd();

First :

git submodule add ...

Then:

git clone ...
git pull && git submodule init && git submodule update && git submodule status
git submodule foreach git checkout master