Skip to content

Instantly share code, notes, and snippets.

@Felipeasg
Felipeasg / executionTime.cpp
Created January 21, 2019 22:33 — forked from deysumitkr/ExecutionTime_AlmostGeneric.cpp
Execution time of a code snippet
#include <chrono>
auto start = std::chrono::high_resolution_clock::now();
// Code to time
auto finish = std::chrono::high_resolution_clock::now();
double duration = std::chrono::duration_cast<std::chrono::milliseconds>(finish - start).count();
@Felipeasg
Felipeasg / getFilesInDir.cpp
Created January 21, 2019 22:32 — forked from deysumitkr/getFilesInDir.cpp
get all files in directory - may filter by extension - may recurse - (Boost required)
// usage
std::vector<std::string> exts{".jpg", ".png"};
std::vector<std::string> files = getFilesInDir("/path/to/root/directory/", exts, true);
// --------------------------------------------------------
#define BOOST_FILESYSTEM_NO_DEPRECATED
#include <boost/filesystem.hpp>
@Felipeasg
Felipeasg / install.md
Created May 11, 2017 03:08 — forked from bitjockey42/install.md
Install SIP and PyQT4 (pyenv, pyenv-virtualenv)

Download

pyenv virtualenv

Switch to the Python version you want to use:

@Felipeasg
Felipeasg / oneshot.sh
Created February 20, 2017 17:23 — forked from chunseoklee/oneshot.sh
build iotjs for nuttx on stm32f4
#!/bin/bash
# This script assumes that you have all dependencies on Ubuntu 14.04
# It will takes about 10 or more minites due to repo cloning.
#
# ./harmony ----- iotjs
# |
# ---- nuttx
mkdir harmony