Skip to content

Instantly share code, notes, and snippets.

View oneamtu's full-sized avatar

Octavian Neamțu oneamtu

View GitHub Profile
@oneamtu
oneamtu / ip_discover.cpp
Created June 17, 2011 19:13
Fastest way to obtain IP address of current host
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <netdb.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <time.h>
#include <sys/time.h>
@oneamtu
oneamtu / debugincludes.cmake
Created June 16, 2011 21:31
quick and dirty way of seeing what folders cmake is including for a certain project
#embed this in your code
get_directory_property(includes INCLUDE_DIRECTORIES)
foreach(arg ${includes})
set(print_string "${print_string}\n${arg}")
endforeach(arg ${includes})
message(FATAL_ERROR ${print_string})