This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT field, Count(*) | |
FROM table_name | |
GROUP BY field | |
HAVING Count(*) > 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
"phpunit/phpunit": "5.7.x", | |
"laravel/laravel": "5.2.x", | |
"twig/twig": "1.x" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo vi /etc/environment | |
Add these lines: | |
LANG=en_US.utf-8 | |
LC_ALL=en_US.utf-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmd + opt + i = console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |