Skip to content

Instantly share code, notes, and snippets.

View tibaes's full-sized avatar
👻
What's that?! A paranormal distribution, of course!

Rafael H Tibães tibaes

👻
What's that?! A paranormal distribution, of course!
View GitHub Profile
@tibaes
tibaes / jekyll-category
Created April 3, 2015 15:15
Jekyll Posts Categories
{% for category in site.categories %}
<h1><a name="{{ category[0] }}">{{ category[0] }}</a></h1>
{% for post in category[1] %}
<li>
<h3>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h3>
</li>
{% endfor %}
{% endfor %}
@tibaes
tibaes / Makefile
Last active January 22, 2016 11:51
OpenCV Makefile with c++11
SHELL := /bin/bash
CC = g++
CFLAGS=-std=c++11 -Wall -Wno-overloaded-virtual -O2 `pkg-config --cflags opencv`
CXXFLAGS=$(CFLAGS)
LDFLAGS=`pkg-config --libs opencv`
@tibaes
tibaes / scanline.cpp
Created April 16, 2015 15:15
OpenCV img scan and show lines.
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int main() {
Mat img;
img = imread("dave.jpeg", -1);
Mat win = Mat::zeros(0, img.rows, CV_8UC3);
@tibaes
tibaes / Makefile OpenBR
Last active August 29, 2015 14:20
OpenBR Face and Eyes detection using C++
PKG_CONFIG_PATH := /usr/local/opt/qt5/lib/pkgconfig/:/usr/local/lib/pkgconfig/:/usr/lib/pkgconfig/
export PKG_CONFIG_PATH
SHELL := /bin/bash
CC = g++
CFLAGS=-std=c++11 -Wall -Wno-overloaded-virtual -O2 `pkg-config --cflags opencv Qt5Core Qt5Concurrent`
CXXFLAGS=$(CFLAGS)
LDFLAGS=-lm -lopenbr `pkg-config --libs opencv Qt5Core Qt5Concurrent`
@tibaes
tibaes / minimal Makefile
Created May 21, 2015 12:59
STASM library
# Makefile: osx makefile for stasm
EXE=.bin
# Note: high_gui is needed for the apps but not for the Stasm library per se.
LIBRARIES=`pkg-config --libs opencv`
# -Wno-long-long disables the "long long warnings" for the OpenCV headers
# -Wno-unused-parameter allows virtual func defs that don't use all params
#!/bin/sh
# dependencies
echo "Installing dependencies via Homebrew (http://brew.sh)"
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew update
brew install gcc48
@tibaes
tibaes / kinect.cpp
Created September 1, 2015 14:47
OpenCV Capturing Tools
#include <cv.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int main(int argc, char **argv)
{
if (argc != 3) {
printf("Use %s <output> <amount of frames>\n", argv[0]);
return -1;
@tibaes
tibaes / Rakefile
Last active September 16, 2015 21:23
OpenCV Rakefile
require 'rake'
require 'rake/clean'
targetname = "a.out"
cc = "g++ -Wall -Wno-overloaded-virtual -std=c++11 -O2"
paths = "/usr/local/opt/opencv3/lib/pkgconfig/opencv.pc"
libs = `#{"pkg-config --libs " + paths}`
flags = `#{"pkg-config --cflags " + paths}`
@tibaes
tibaes / vimrc
Last active September 21, 2015 11:59
neobundle version [deprecated, use the new version with vim plug]
"*****************************************************************************
"" NeoBundle core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
@tibaes
tibaes / vimrc
Last active September 5, 2016 21:31
vimrc using vimplug
" Using vimplug
"
" Run:
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
" brew install clang-format
"
" Install the fonts: https://github.com/powerline/fonts my favourite is monofur
"
" Then, using this vimrc file, execute inside vim :PlugInstall
" color github and molokai available