Skip to content

Instantly share code, notes, and snippets.

View Miliox's full-sized avatar

Emiliano Firmino Miliox

View GitHub Profile
@Miliox
Miliox / .gitconfig
Last active January 26, 2016 02:20
MyGit Config
[core]
whitespace = trailing-space,space-before-tab
[alias]
addp = add --patch
br = branch
ci = commit --signoff
co = checkout
di = diff
dw = diff --word-diff
@Miliox
Miliox / gen_erlproj.sh
Created November 8, 2012 00:24
Generate Erlang project structure
#!/bin/bash
# author: Emiliano Carlos de Moraes Firmino
# created on 04/30/11 21:23:49 (HPBC)
# description: create an erlang project directory
mkdir doc ebin include priv src test
#Emake
echo "% Author: Emiliano Carlos de Moraes Firmino
{\"src/*\",
@Miliox
Miliox / Makefile
Created November 8, 2012 00:36
Makefile to compile pdflatex with bibtex
# Author: Emiliano Carlos de Moraes Firmino @ 10/2012
SHELL=/bin/sh
THESIS=thesis
.SUFFIXES:
.SUFFIXES: .bib .pdf .tex
.PHONY: clean
run: $(THESIS).pdf
@Miliox
Miliox / beamer_template.tex
Last active October 12, 2015 13:47
Beamer Slide Template
\documentclass{beamer}
\usepackage[utf8x]{inputenc}%idem
\usepackage[english]{babel}
\usepackage{graphicx}
\usetheme{default} % Cities, see http://www.hartwork.org/beamer-theme-matrix/
\usecolortheme{default} % Animals and Plants, see http://www.hartwork.org/beamer-theme-matrix/
\title[Short Title]{Full Title}
\author[Short Name]{Full Name}
@Miliox
Miliox / ast_to_tokens_snippet.erl
Created November 13, 2012 15:17
Test Generated SyntaxTree and Tokens
Example = fun(ErlFileName) ->
Source = test_scan_parse:src(ErlFileName),
Tokens = test_scan_parse:tokenize(Source),
SyntaxTree = test_scan_parse:ast(Tokens),
case test_scan_parse:ast_tokens(SyntaxTree) == Tokens of
true -> ok;
false -> error
end
end.
@Miliox
Miliox / vim-plugin-setup.sh
Last active December 17, 2015 05:48
my vim plugin setup
#! /bin/bash
VIMRC=_vimrc
VIMFILES=vimfiles
PLUGINS=(
"ack:mileszs/ack.vim.git"
"auto-compl-pop:vim-scripts/AutoComplPop.git"
"code-complete:mbbill/code_complete.git"
"coffe-script:kchmck/vim-coffee-script.git"
"command-t:wincent/Command-T.git"
"cref:vim-scripts/CRefVim.git"
@Miliox
Miliox / .vimrc
Last active December 17, 2015 06:18
my vimrc
" Author: Emiliano Carlos de Moraes Firmino
" Contact: emiliano.firmino@gmail.com | elmiliox@gmail.com
" Info: Developer @ INdT Manaus 2013
scriptencoding utf-8
set encoding=utf-8
syntax enable " Highlight
set autoread " Reaload file if changed outside
@Miliox
Miliox / get_thread_id.cpp
Created July 2, 2013 12:45
small snippet to get current thread id using c++11
#include <string>
#include <sstream>
#include <iostream>
#include <thread>
std::string get_thread_id() {
std::stringstream ss("0x");
ss << std::hex << std::this_thread::get_id();
return ss.str();
}
@Miliox
Miliox / gtest-msvc11.patch
Last active December 20, 2015 01:09
Patch for Google Test to add Visual Studio 2012 Support; Download: http://www.4shared.com/zip/OHGUFeaq/gtest-msvc11.html
From bc6377f6792a60fbc0f28f0f194879e094b92a66 Mon Sep 17 00:00:00 2001
From: Emiliano Firmino <ext-emiliano.firmino@nokia.com>
Date: Sat, 20 Jul 2013 22:43:41 -0400
Subject: [PATCH] add msvc11 solution
---
msvc11/gtest-md.sln | 55 +++++++++
msvc11/gtest-md.vcxproj | 151 +++++++++++++++++++++++
msvc11/gtest-md.vcxproj.filters | 18 +++
msvc11/gtest.sln | 55 +++++++++
#include "DummyDriver.h"
IMPLEMENT_EXTENSION(DUMMY_DEVICE_EXTENSION,
{
//TODO: Define Device Extension
});
extern "C"
NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
{