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
| import os #required to fetch environment varibles | |
| import hmac #required to compute the HMAC key | |
| import hashlib #required to create a SHA256 hash | |
| import base64 #required to encode the computed key | |
| import sys #required for system functions (exiting, in this case) | |
| # Fetch the environment variable called AWS_SECRET_ACCESS_KEY, which contains | |
| # the secret access key for your IAM user. | |
| key = "<AWS_SECRET_ACCESS_KEY>" |
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
| #! /usr/bin/env python2.6 | |
| # -*- coding:utf-8 -*- | |
| # apt-get install python-matplotlib | |
| # http://www.htmlstaff.org/ver.php?id=24964 | |
| import pylab, datetime | |
| log = open('temp.log','r').read() | |
| text = log.split('\n') |
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
| # -*- coding: utf-8 -*- | |
| """ | |
| Script de test para criar registros e recurar e calcular media | |
| SQL de criação da tabela | |
| CREATE TABLE `tb_customer_account` ( | |
| `id_customer` INT NOT NULL , | |
| `cpf_cnpj` VARCHAR(20) NOT NULL , | |
| `nm_customer` VARCHAR(200) 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
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| import os | |
| import sys | |
| import urllib | |
| from subprocess import call | |
| #arquivo = sys.argv[1] | |
| pasta_download = '/home/cesar_augusto/pacote-tar/' | |
| pasta_download2 = '/home/cesar_augusto/pacote-zip/' |
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
| #/opt/virPython2.6/bin/python | |
| #./bin/python | |
| import os | |
| from pyinotify import WatchManager, IN_DELETE, IN_CREATE, IN_CLOSE_WRITE, ProcessEvent, Notifier | |
| import sys | |
| #os.getcwd() | |
| #os.path.realpath | |
| #os.listdir(folder) |
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
| #! /usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| from ConfigParser import ConfigParser | |
| import os, time, subprocess, socket | |
| class BackupDB(object): | |
| str_date = time.strftime('%Y-%m-%d-%H:%M') | |
| exclude_database = ['information_schema','performance_schema','test','mysql'] |
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
| #!/bin/bash | |
| # A linha acima é conhecida como shebang e server para chamar o interpretador do script | |
| # poderia-se trocar o bash pelo sh ou outro shell de sua preferência | |
| ######################################################## | |
| # EXEMPLO DE SCRIPT DE FIREWALL PARA ARTIGO NO SITE www.vivaolinux.com.br | |
| # CRIADO POR phrich | |
| # Data da última alteração: 11/01/2012 | |
| # ###################################################### |
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
| #!/bin/bash | |
| DIR="$1" | |
| # Caso nao seja digitado nenhum diretorio, | |
| # Sera usado o diretorio corrente por padrao | |
| if ! [ $DIR ] | |
| then | |
| DIR='.' | |
| fi |
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
| #!/usr/bin/python | |
| import os | |
| import pyinotify | |
| import sys | |
| #Source code folder to monitor | |
| folder_source = "/media/src/" | |
| folder_dest = "/home/ubuntu/projects/" |
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
| #!/usr/bin/env python | |
| """ | |
| Real time log files watcher supporting log rotation. | |
| Author: Giampaolo Rodola' <g.rodola [AT] gmail [DOT] com> | |
| License: MIT | |
| """ | |
| import os |
NewerOlder