Skip to content

Instantly share code, notes, and snippets.

View face detection system example.md

Before you start

Make sure you have python, OpenFace and dlib installed. You can either install them manually or use a preconfigured docker image that has everying already installed:

docker pull bamos/openface
docker run -p 9000:9000 -p 8000:8000 -t -i bamos/openface /bin/bash
cd /root/openface
View keybase.md

Keybase proof

I hereby claim:

  • I am ernesto-jimenez on github.
  • I am ernesto (https://keybase.io/ernesto) on keybase.
  • I have a public key whose fingerprint is 8D10 A2C2 7C76 CD6A 59E6 7407 4927 19FF F4CE 55FB

To claim this, I am signing this object:

View gopher gala repos.md
@ernesto-jimenez
ernesto-jimenez / dependencies.md
Created Jan 25, 2016
Top packages used in public repos from Gopher Gala 2016
View dependencies.md

I did a quick calculation of what are the most imported packages.

Top 20 imported packages

  10 github.com/gorilla/mux
   9 golang.org/x/net/context
   7 golang.org/x/oauth2
   7 github.com/gorilla/websocket
   6 github.com/spf13/cobra
@ernesto-jimenez
ernesto-jimenez / .zshrc
Created Mar 20, 2015
When entering a dir with a git repository, start a new tmux session for that repository or attach to the existing one if it has already been started.
View .zshrc
# Always use the same tmux session in directories with git
attach_tmux_for_dirs_with_repos() {
if [ "$TERM" != "screen-256color" ]; then
if [ -d .git ]; then
SESSION_NAME=$(echo -n ${PWD//*\//}-tmux | tr . -)
tmux attach -t $SESSION_NAME || tmux new -s $SESSION_NAME
fi
fi
}
add-zsh-hook precmd attach_tmux_for_dirs_with_repos
@ernesto-jimenez
ernesto-jimenez / test.go
Created Jan 26, 2015
Limiting the amount of requests in-flight
View test.go
package main
import (
"fmt"
"net/http"
"sync"
)
type LimitedRoundTripper struct {
inflight chan interface{}
@ernesto-jimenez
ernesto-jimenez / gist:11276103
Last active Mar 27, 2017
Missing information in slack's payload
View gist:11276103

Issue

Given an 3rd party integrated with outbound webhooks, when a client writes a message mentioning another user (@user) or channel (#channel). The 3rd party receives a message containing the usrer/channel ID but the payload doesn't specify what user/channel that message corresponds to.

E.g. from https://github.com/ernesto-jimenez/slackline/issues/2

The following message

@blanca_tp: check out #general

View mobilewebappcapable.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 4 columns, instead of 1. in line 7.
/Users/ernesto/webmob-reports/webdevdata-latest//00/goolive.de_00e1e029f6b66ee4d6c2d6cb20a3d4d0.html.txt,meta,apple-mobile-web-app-capable,yes
/Users/ernesto/webmob-reports/webdevdata-latest//00/spark.ru_006d396650a3d177698dfc83631c1cad.html.txt,meta,apple-mobile-web-app-capable,yes
/Users/ernesto/webmob-reports/webdevdata-latest//01/hubic.com_01a371682d84564071cc4ebb7dd7b90d.html.txt,meta,apple-mobile-web-app-capable,yes
/Users/ernesto/webmob-reports/webdevdata-latest//01/ostrovok.ru_011d92c671691eefc4b39bae360dd511.html.txt,meta,apple-mobile-web-app-capable,yes
/Users/ernesto/webmob-reports/webdevdata-latest//01/traffichaus.com_01589fbfece5140e342e8b0b48065e11.html.txt,meta,apple-mobile-web-app-capable,yes
/Users/ernesto/webmob-reports/webdevdata-latest//02/goldenmoustache.com_02eab7bc0923a014e9b39de9b024d2c8.html.txt,meta,apple-mobile-web-app-capable,yes
/Users/ernesto/webmob-reports/webdevdata-latest//02/jing.fm_02856bfc25fcb5195920e40a67244338.html.txt,meta,apple-mobile-web-app-capable,yes
/Users/ernesto
View _README.md

Patch to cross compile to android with net/http support

Installation instructions

We need to patch Go's source code to allow cgo when cross-compiling and make Android-specific changes since it sometimes differs from linux (e.g.: it doesn't use /etc/resolv.conf for DNS config)

  1. Clone the go source: hg clone -u release https://code.google.com/p/go
  2. Enter the go source directory: cd go
  3. Apply the patch in this gist: patch -p1 < /path/to/patch/go_android.patch
  4. Enter the go/src directory: cd src
@ernesto-jimenez
ernesto-jimenez / msapplication-starturl.csv
Created Nov 26, 2013
~400 apps using defining msapplication-starturl
View msapplication-starturl.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 4 columns, instead of 3. in line 6.
/Users/ernesto/webmob-reports/webdevdata-latest//00/parcelmonkey.co.uk_00258938c78d758402a7157fbfe9d547.html.txt,meta,msapplication-starturl,http://www.parcelmonkey.co.uk
/Users/ernesto/webmob-reports/webdevdata-latest//00/xero.com_0043b9237e6b712ab1fc191cb6826929.html.txt,meta,msapplication-starturl,/?pinned=true
/Users/ernesto/webmob-reports/webdevdata-latest//01/donkiz.fr_017165c9107dec5a1d65817e28c0b65e.html.txt,meta,msapplication-starturl,http://www.donkiz.fr
/Users/ernesto/webmob-reports/webdevdata-latest//01/pizzahut.com_01eb225f350f043bf0744a325eb6644a.html.txt,meta,msapplication-starturl,//www.pizzahut.com/
/Users/ernesto/webmob-reports/webdevdata-latest//03/pricespy.co.nz_03d1df9c01c40a42311e2ee75174342c.html.txt,meta,msapplication-starturl,/
/Users/ernesto/webmob-reports/webdevdata-latest//03/yelp.nl_03044c564ceaac173b8659f001233e03.html.txt,meta,msapplication-starturl,http://www.yelp.nl/
/Users/ernesto/webmob-reports/webdevdata-latest//05/wonobo.com_05d9df0d455f3cfc2a27bf8e6a46a39b.html.txt,meta,m