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)
#Update system
sudo apt-get update && sudo apt-get dist-upgrade
#Java
sudo apt-get install openjdk-8-jdk
#File Compression Libs
sudo apt-get install unace unrar zip unzip xz-utils p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller
#Install Ubuntu Restricted Extras
@tporto
tporto / install-python3-eos.txt
Last active March 29, 2018 15:38
Instalar o python 3.5 no Ubuntu/elementary OS
sudo apt-get install sqlite3 libsqlite3-dev libreadline-dev libssl-dev build-essential
#depois o python...
cd /opt
sudo wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
sudo tar -xzvf Python-3.6.5.tgz
cd Python-3.6.5/
sudo ./configure
sudo make
@tporto
tporto / install-django.txt
Last active March 29, 2018 15:40
Instalar Virtualenv, Django no Ubuntu/eOS
sudo apt-get install python3-dev python3-pip python3-setuptools
sudo pip3 install virtualenv
#Vamos criar nosso virtualenv
cd
virtualenv nome-que-deseja
#Agora vamos entrar dentro do ambiente virtual que criamos e vamos ativá-lo
cd nome-que-escolheu/
source bin/activate
@tporto
tporto / install-java-8.txt
Created September 18, 2016 00:29
Instalar JAVA 8 no Ubuntu/eOS
sudo mkdir /opt/java && cd /opt/java
cd /opt/java
sudo wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz"
sudo tar -zxvf jdk-8u45-linux-x64.tar.gz
cd jdk1.8.0_45/
sudo update-alternatives --install /usr/bin/java java /opt/java/jdk1.8.0_45/bin/java 100
sudo update-alternatives --config java
sudo update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.8.0_45/bin/javac 100
sudo update-alternatives --config javac
sudo update-alternatives --install /usr/bin/jar jar /opt/java/jdk1.8.0_45/bin/jar 100
@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 / ubuntu_tips.txt
Last active May 27, 2017 00:46
Ubuntu tips
* Colocar janelas no centro
sudo apt-get install compizconfig-settings-manager
Then open it and go to Window Management > Place Windows, enable it, and in "Placement Mode" choose Centered
* Instalar drivers gráficos proprietários
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get upgrade
* Descompactar arquivos TAR.XZ