Skip to content

Instantly share code, notes, and snippets.

View fabiotatsuo's full-sized avatar

Fabio Tatsuo fabiotatsuo

View GitHub Profile
@fabiotatsuo
fabiotatsuo / gist:98b8c9d57a322737e25c
Created May 5, 2014 20:24
Query exemplo many to many
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;
@fabiotatsuo
fabiotatsuo / gist:c843f1495ef5ffa0aa46
Created May 22, 2015 17:56
Imagemagick install revista Server
yum install -y ImageMagick ImageMagick-devel
/usr/share/Imagemagick
<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>
@fabiotatsuo
fabiotatsuo / gist:ce0ae1ecb3cdccd09654
Last active August 29, 2015 14:26
Create sftp password access to server Ubuntu 15.04 EC2
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
@fabiotatsuo
fabiotatsuo / gist:0a8c9ac7a538dc4a7dec
Last active October 12, 2015 11:26
Download S3 Bucket using AWS CLI, Mac
$ 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
@fabiotatsuo
fabiotatsuo / gist:5387805
Created April 15, 2013 12:48
Workbench Amazon AWS
Host = RDS > Endpoint
@fabiotatsuo
fabiotatsuo / gist:5387811
Created April 15, 2013 12:49
Workbench, local db java app
Query > name
default collation = utf8_general_ci
@fabiotatsuo
fabiotatsuo / gist:5394706
Created April 16, 2013 09:44
filezilla amazon aws
host ec2
user ec2-user
key > edit > settings > sftp
@fabiotatsuo
fabiotatsuo / gist:5394878
Created April 16, 2013 10:24
Erlang command shell
command shell
ctrl-A (^A) cursor begin of the line
crrl-E (^E) cursor end of the line
li press tab... lists:... tab again... suggest function
help ()
q() -- quit - shorthand for init:stop()
ctrl-G (^G) then type h to get help
type k N, N is a job number... terminate that shell and all code running
type i N, stop code withou killing shell
@fabiotatsuo
fabiotatsuo / gist:5403269
Last active December 16, 2015 08:08
Debug java web app
Right click on server > Debug
Toogle breakpoint
Execute