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
# !/usr/bin/python | |
# -*- coding: utf-8 -*- | |
#script name: find_command.py | |
#Description: Executa o comando de shell find a fim de encontrar arquivos com uma dada extensao/string e que foi acessado por um dado periodo. | |
#Verifica a data de criacao, acesso e tamanho. | |
#Coded by: Rondineli | |
import subprocess, os, sys, os.path, time | |
#findCMD => busca por arquivos no diretorio corrente, com dado nome e data de criacao |
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
#!/bin/bash | |
#Author: Rondineli Saad | |
#Create in: 2015-10-15 | |
#Version: 0.2 | |
#Description: compacta os logs do apache e move para pasta com seu respectivo ano/mes/nome da instancia e envia para o ftp.ratchet.scielo.org para processamento. | |
DIR_SOURCE="<diretorio de log>" | |
DATE_YESTERDAY=`date -d "yesterday" +"%Y-%m-%d"` | |
MONTH_ATU=`date "+%B"` | |
MONTH_LAST=`date '+%B' --date '1 month ago'` |
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
from sys import argv | |
import gzip | |
script, gzip_file = argv | |
with gzip.open(gzip_file) as g: | |
try: | |
while g.read(1024 * 1024): | |
pass | |
except IOError as e: | |
print("Corrompido!", e) |
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
!#/bin/sh | |
WEB_PATH=/var/www/macaw_bhlscielo_org | |
WEB_USER=apache | |
echo CHDIR |
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
Vagrant.configure("2") do |config| | |
config.vm.box = 'dummy' | |
config.vm.box_url = './example_box/dummy.box' | |
config.vm.provider :vsphere do |vsphere| | |
# The host we're going to connect to | |
vsphere.host = '[ip_vcenter]' |
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
Vagrant.configure("2") do |config| | |
config.vm.box = 'dummy' | |
config.vm.box_url = './example_box/dummy.box' | |
config.vm.provider :vsphere do |vsphere| | |
# The host we're going to connect to | |
vsphere.host = '[ip_vcenter]' |
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
#!/usr/bin/env python | |
#coding: utf-8 | |
import argparse | |
import os | |
import time | |
username = 'postgres' | |
defaultdb = 'template1' | |
port = '5432' | |
date = time.strftime('%Y-%m-%d') |
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
#!/usr/bin/python | |
#coding: utf-8 | |
import os | |
from utils import * | |
#Autor: Rondineli Saad | |
#Versão: 0.1 | |
#Nome do script: compactacao.py | |
#Descrição: script para compactação de arquivos de logs do apache, onde |
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
#!/usr/bin/python | |
#coding: utf-8 | |
from StringIO import StringIO | |
import subprocess | |
from utils import (send_mail, FROM, TO) | |
def list_ipcs(): | |
""" |
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
#cloud-config | |
users: | |
- name: "core" | |
passwd: $6$rounds=4096$Y63druuqdw4NQcqy$tAWhdc.UuWia2/HP1IblRJ2IMABi.1XLOq.lmjJ6Znmdr2lQ.aBZulcMDyvFn.ivM.gtf4mppn.JvbMC7UXje0 | |
coreos: | |
etcd2: | |
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001 | |
advertise-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001 | |
initial-cluster: etcdserver=http://192.168.169.55:2380 |
OlderNewer