Skip to content

Instantly share code, notes, and snippets.

View waldemarnt's full-sized avatar
⌨️
typing...

Waldemar Neto waldemarnt

⌨️
typing...
View GitHub Profile
@zudov
zudov / Cropper.java
Last active October 21, 2018 14:46
Crop image using javacv.
import static com.googlecode.javacv.cpp.opencv_core.cvCopy;
import static com.googlecode.javacv.cpp.opencv_core.cvCreateImage;
import static com.googlecode.javacv.cpp.opencv_core.cvGetSize;
import static com.googlecode.javacv.cpp.opencv_core.cvSetImageROI;
import static com.googlecode.javacv.cpp.opencv_highgui.cvLoadImage;
import static com.googlecode.javacv.cpp.opencv_highgui.cvSaveImage;
import com.googlecode.javacv.cpp.opencv_core.CvRect;
import com.googlecode.javacv.cpp.opencv_core.IplImage;
@pedronauck
pedronauck / controlAsyncFlow.js
Created September 7, 2014 05:58
Example using async library to avoid callback hell
var async = require('async');
var Product = require('../model/Product');
var Category = require('../model/Category');
var Attribute = require('../model/Attributes');
// bad idea
exports.index = function() {
Product.find(function(err, products) {
Category.find(function(err, categories) {
Attribute.find(function(err, attributes) {
@cgmartin
cgmartin / logging-middleware.js
Created May 24, 2015 01:43
Morgan JSON log format example
'use strict';
var morgan = require('morgan');
var os = require('os');
morgan.token('conversation-id', function getConversationId(req) {
return req.conversationId;
});
morgan.token('session-id', function getSessionId(req) {
return req.sessionId;

#Hangout sobre Docker

Dia: 02/12/2015

Horario: 20:00

*Lembrando que é horario de Brasilia.

###Link do Hangout

@Juraci
Juraci / sync-upstream.sh
Created December 11, 2015 17:16
Bash script to sync a forked project with its upstream repository
#/bin/bash
red=`tput setaf 1`
green=`tput setaf 2`
yellow=`tput setaf 3`
upstream=$1
branch=$2
# checks if there is a remote repo called upstream
check_upstream() {
@bltavares
bltavares / Material Sobre Rust.md
Created May 27, 2016 21:30
Material sobre Rust