This file contains hidden or 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
show dbs | |
use db_name | |
show collections | |
#display tables | |
db.testData.find() | |
var c = db.testData.find() |
This file contains hidden or 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
>>> from django.contrib.sites.models import Site | |
>>> site = Site() | |
>>> site.domain = 'example.com' | |
>>> site.name = 'My website' | |
>>> site.save() | |
>>> site.id |
This file contains hidden or 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
http://www.sandersnewmedia.com/why/2012/04/16/installing-pil-virtualenv-ubuntu-1204-precise-pangolin/ |
This file contains hidden or 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; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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/ |