Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#Variaveis
server="mysql.dominio.com.br" #Servidor mysql
login="nome_do_usuario_do_mysql" #login da base
pw="senha" #senha
nome_temp="all" #nome do arquivo temporário mysql
bk="$HOME/backup_mysql/" #Diretório para salvar arquivos de backup
nw=$(date "+%Y%m%d") #Buscar pela data
nb=3 #número de cópias do banco de dados
@gwmoura
gwmoura / Dockerfile
Created November 4, 2016 17:13
Nginx Reverse proxy
FROM nginx
COPY default.conf /etc/nginx/conf.d/default.conf
@gwmoura
gwmoura / Dockerfile
Last active October 26, 2016 13:25
Dockerfiel for Laravel Composer and OCI ext
FROM php:7
ENV LAST_UPDATE 20161003
RUN curl https://getcomposer.org/installer | php
RUN mv composer.phar /usr/bin/composer
RUN apt-get update
RUN apt-get install -y libmcrypt-dev \
git \
zlib1g-dev \
wget \
alien \
# elastic search
cd ~/elasticsearch
sudo docker run -d -v "$PWD/esdata":/usr/share/elasticsearch/data -p 9200:9200 -p 9300:9300 --name tsuru_elasticsearch elasticsearch
# logstash
sudo docker run -d -p 1984:1984/udp --name tsuru_logstash logstash -e "$(curl -s https://gist.githubusercontent.com/gwmoura/d28f6c34822a9c15a1a2b33f8eb3aa58/raw/de593ac506e3c8c3acb243d29add1a5256827a74/logstash.conf)"
input {
udp {
port => 1984
}
}
filter {
json {
source => "message"
}
@gwmoura
gwmoura / my_plan.rb
Created April 26, 2016 16:21
Simple Gist to create a Module with class methods
module Plan
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def components_methods(components)
components.each do |key, value|
attr_accessor(key)
end
end
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-item/paper-item.html">