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
use databse; | |
SELECT | |
n.id as noticia_id, | |
n.titulo as post_title, | |
n.categoria_noticia_id as categoria_noticia_id, | |
c.nome as tag_name | |
FROM noticia as n | |
LEFT JOIN categoria_noticia as c ON c.id = n.categoria_noticia_id |
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
Create a diagram for a mysql db | |
MySQL Workbench | |
Menu Database > Reverse Engineer... |
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
$ mysqldump --opt --where="1 limit 1000" -u root -p yourdatabase > dump.sql |
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
Test 443 | |
nc -vz localhost 443 | |
curl -v https://www.mywebsite.com/ |
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
$ brew install awscli | |
Add the following to ~/.bashrc to enable bash completion: | |
complete -C aws_completer aws | |
$ aws configure | |
AWS Access Key ID [None]: | |
AWS Secret Access Key [None]: | |
Default region name [None]: | |
Default output format [None]: json |
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
List all groups | |
cut -d: -f1 /etc/group | |
sudo groupadd sftp | |
Group Password Authentication | |
sudo vim /etc/ssh/sshd_config | |
Match Group sftp | |
PasswordAuthentication yes |
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
<li class="menu-item menu-item-2 taxonomy loaded mega-menu-item" data-loop="menu" data-type="mega"> | |
<a class="parent-item no-icon" href="#Your url page"> | |
<span class="category-title">Menu Title</span> | |
<span class="triangle triangle-border"></span> | |
<span class="triangle"></span> | |
</a> | |
<ul class="placeholder mega-loader" style="display: none; top: 110px;"> | |
<li> | |
<div class="loading"> | |
<span class="theme-icon-spin2"></span> |
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
Install Java | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
sudo aptitude -y install oracle-java8-installer | |
java -version | |
Install ElasticSearch | |
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.6.0.deb |
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
yum install -y ImageMagick ImageMagick-devel | |
/usr/share/Imagemagick |
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 DISTINCT nome, email | |
FROM usuario u | |
INNER JOIN entidade e | |
ON e.usuario_id = u.id | |
INNER JOIN pessoa_fisica p | |
ON p.id = e.pessoaFisica_id | |
WHERE email IS NOT NULL; |