Skip to content

Instantly share code, notes, and snippets.

View tporto's full-sized avatar

Thiago Porto tporto

  • Linx
  • Brasil
View GitHub Profile
@tporto
tporto / perfectelementary.bash
Created August 25, 2016 22:20
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@tporto
tporto / genymotionwithplay.txt
Created September 11, 2016 15:45 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
@tporto
tporto / gist:56792821694c742a83fdf4a8dffb5363
Created March 23, 2017 14:09 — forked from belsrc/gist:672b75d1f89a9a5c192c
Simple Vue.js filters that I usually need
/**
* Changes value to past tense.
* Simple filter does not support irregular verbs such as eat-ate, fly-flew, etc.
* http://jsfiddle.net/bryan_k/0xczme2r/
*
* @param {String} value The value string.
*/
Vue.filter('past-tense', function(value) {
// Slightly follows http://www.oxforddictionaries.com/us/words/verb-tenses-adding-ed-and-ing
var vowels = ['a', 'e', 'i', 'o', 'u'];
import re
"""
Detect browser and it's version.
Now it works only for few moct common browsers. Full list of browsers and
theire user-agent you can find here: http://www.useragentstring.com/pages/useragentstring.php
Version: 0.1
Author: Andrey Nikishaev
Site: http://creotiv.in.ua/
@tporto
tporto / postgres-cheatsheet.md
Created January 6, 2018 14:02 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@tporto
tporto / gist:28742d1498a864c0d709ce7fbeeaff0e
Created February 7, 2018 02:08 — forked from hesoyamcode/gist:d8df3e8761b68a1f25559f59934c03d5
Error:java.util.concurrent.ExecutionException: java.lang.RuntimeException: AAPT process not ready to receive commands Ubuntu 64
Set Env variabel (type in your terminal) or set it on .bashrc or .bash_profile
===============================================================================
export ANDROID_HOME=/home/fuadaip/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
intall if not installed
===============================================================================
sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1
@tporto
tporto / perfectelementary.bash
Created March 17, 2018 14:10 — forked from dgleba/perfectelementary.bash
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@tporto
tporto / install_elixir.md
Created July 28, 2018 13:34 — forked from rubencaro/install_elixir.md
Elixir installation guide

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then asdf is your best friend.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import datetime
try:
import httplib # Python 2.7
except ImportError:
FROM hexpm/elixir:1.11.2-erlang-23.1.2-alpine-3.12.1 as build
# install build dependencies
RUN apk add --update git build-base npm nodejs python3
# prepare build dir
RUN mkdir /app
WORKDIR /app
# install hex + rebar