Skip to content

Instantly share code, notes, and snippets.

View rpuglielli's full-sized avatar
💻

Robison Puglielli rpuglielli

💻
  • RankMyApp
  • São Paulo, Brazil
  • 20:19 (UTC -03:00)
View GitHub Profile
@rpuglielli
rpuglielli / ohmyzsh
Created November 18, 2018 23:27
Install apt-get Oh My Zsh
Prereq:
```bash
apt-get install zsh
apt-get install git-core
```
Getting zsh to work in ubuntu is weird, since `sh` does not understand the `source` command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
@rpuglielli
rpuglielli / chromium_shortcuts
Created October 13, 2018 02:06
Chromium Shortcuts
cmd + opt + i = console
@rpuglielli
rpuglielli / network
Created October 5, 2018 19:59
Change a server's hostname in CentOS
Using a text editor, open the server’s /etc/sysconfig/network file.
$ sudo vi /etc/sysconfig/network
# Modify the HOSTNAME= value to match your FQDN hostname.
HOSTNAME=myserver.domain.com
For internal networking, change the host that is associated with the main IP address for your server (found at /etc/hosts).
127.0.0.1 localhost localhost.localdomain
@rpuglielli
rpuglielli / environment
Last active April 8, 2019 15:27
CentOS warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
sudo vi /etc/environment
Add these lines:
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@rpuglielli
rpuglielli / Install Apache Maven globally
Created August 14, 2018 02:12
You can try this tutorial or look for oficial instructions: https://maven.apache.org/install.html
Download Apache Maven
https://maven.apache.org/download.cgi
Go to downloads dir
cd ~/Downloads
Unzip
tar xvf apache-maven-3.x.x-bin.tar.gz
Copy files to local dir
@rpuglielli
rpuglielli / Tutorial: Install composer globally on Amazon Linux AMI (EC2)
Last active November 1, 2018 18:00
Tutorial: Install composer globally on Amazon Linux AMI (EC2)
$ cd ~
$ sudo curl -sS https://getcomposer.org/installer | sudo php
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer
# now you can run
$ composer
@rpuglielli
rpuglielli / composer.json
Created January 19, 2017 19:48
ComposerJSON
{
"require": {
"phpunit/phpunit": "5.7.x",
"laravel/laravel": "5.2.x",
"twig/twig": "1.x"
}
}
@rpuglielli
rpuglielli / tableSize.txt
Created January 18, 2017 17:46
Size of table
SELECT nomeDaTabela, data_length / 1024 / 1024 "Tamanho da tabela - MB", index_length / 1024 / 1024 "Tamanho do indice - MB", engine
FROM information_schema.TABLES WHERE table_name like 'nomeDaTabela';
@rpuglielli
rpuglielli / duplicatedData.txt
Last active August 14, 2018 02:14
SQL to find duplicated rows
SELECT field, Count(*)
FROM table_name
GROUP BY field
HAVING Count(*) > 1