Skip to content

Instantly share code, notes, and snippets.

View henriquemenezes's full-sized avatar

Henrique Menezes henriquemenezes

  • Recife, Brazil
View GitHub Profile
@henriquemenezes
henriquemenezes / angularjs-force-refresh-google-maps.js
Created November 27, 2015 18:50
AngularJS force update images from google maps (ngMap)
$scope.map = null;
$scope.$on('mapInitialized', function(event, map) {
$scope.map = map;
});
$scope.$on('cfpLoadingBar:completed', function () {
$timeout(function() {
google.maps.event.trigger($scope.map,'resize')
}, 1000);
[core]
editor = /usr/bin/vim
autocrlf = input
[alias]
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg3 = log --graph --abbrev-commit --decorate --date=relative --all
lg = !"git lg1"
[init]
templatedir = ~/.git-templates
@henriquemenezes
henriquemenezes / simple-browser-benchmark.md
Last active March 19, 2016 14:41
Simple Browser Benchmark

Simple Browser Benchmark

Methodology

Open the same 26 tabs in all browsers with different urls

Results

Browser Version Processes Threads Memory Usage Memory Compressed by OSX
@henriquemenezes
henriquemenezes / syncing-a-fork.md
Last active April 29, 2016 00:43
Syncing a fork

Syncing a fork

Sync a fork of a repository to keep it up-to-date with the upstream repository.

1. Configuring a remote for a fork

List the current configured remote repository for your fork.

git remote -v
@henriquemenezes
henriquemenezes / postgresql-dump-without-scheme.sh
Created May 22, 2016 20:55
PostgreSQL dump without specific Scheme
# Dump all postgres database without specific scheme (-N topology)
pg_dump -N topology -U $DATABASE_USERNAME -h $DATABASE_HOST -f /path/to/output.sql $DATABASE_NAME
@henriquemenezes
henriquemenezes / android-publish.md
Last active May 31, 2016 01:03
Android Publish

Android - Publish Your App

Preparing Your Application for Release

Configuring your application for release

  • At a minimum you need to remove Log calls and remove the android:debuggable attribute from your manifest file.
  • You should also provide values for the android:versionCode and android:versionName attributes, which are located in the <manifest> element.
  • Building and signing a release version of your application.
  • Testing the release version of your application.
@henriquemenezes
henriquemenezes / fixing-problems.md
Last active March 24, 2017 15:44
Fixing problems

Fixing problems

  1. Offending ECDSA key in /Users/Username/.ssh/known_hosts:38
sed -i .bak '38d' ~/.ssh/known_hosts
@henriquemenezes
henriquemenezes / rbenv-install-system-wide.sh
Last active July 14, 2017 23:49
rbenv install system wide
# Install RBenv in /opt/ for all users
echo '# == Rbenv ==' > /etc/profile.d/rbenv.sh
echo 'export RBENV_ROOT=/opt/rbenv' >> /etc/profile.d/rbenv.sh
echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
chmod +x /etc/profile.d/rbenv.sh
source /etc/profile.d/rbenv.sh
curl https://raw.githubusercontent.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash
@henriquemenezes
henriquemenezes / app-api-versioning.md
Created November 11, 2017 18:43
APP and API Versioning, breaking changes updates, etc.

API Request Headers:

GET http://api.example.com/posts
X-App-Ver: 1.2.0

URL Based:

GET /api/v1/xxxx

GET /api/v2/xxxx

@henriquemenezes
henriquemenezes / facebook.md
Last active March 20, 2018 17:09
OAuth Sign-In with Google and Facebook