Skip to content

Instantly share code, notes, and snippets.

View feliphebueno's full-sized avatar
☠️
Getting it done!

Bueno, Feliphe. feliphebueno

☠️
Getting it done!
View GitHub Profile
@feliphebueno
feliphebueno / aes-util
Created January 28, 2018 22:43
AES File encrypting tool
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5
"""
AES-256 CBC-MODE File encrypting tool
:author: rinzler
:date: 2018-01-27
:version: 1.0
:license: GPL
usage: aes-util [encrypt|decrypt] [input file] (output file)
"""
@feliphebueno
feliphebueno / instrucoes_py_django_apache_ec2.ext
Created July 2, 2017 01:46
Configuração de ambiente Python 3.5 + Django + Apache mod_wsgi no EC2 Linux AMI
# Sistema
- sudo yum install python35.x86_64
- sudo yum install mod24_wsgi-python35.x86_64
- sudo yum install git.x86_64
# Python
- curl -L https://bootstrap.pypa.io/get-pip.py > get-pip.py
- sudo python3.5 get-pip.py
- sudo rm get-pip.py
- sudo python3.5 -m pip install virtualenv
@feliphebueno
feliphebueno / wsgi.py
Created June 26, 2017 15:10
Exemplo de wsgi.py de uma Django App para rodar com o Apache mod_wsgi multi applications
"""
WSGI config for YourDjangoApp project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
"""
import os
@feliphebueno
feliphebueno / httpd.wsgi.conf
Last active January 21, 2018 20:08
Exemplo de alterações no httpd.conf para utilização de Python 3 + Django com o Apache mod_wsgi
#rewrite module
LoadModule rewrite_module /etc/httpd/modules/mod_rewrite.so
# wsgi module
LoadModule wsgi_module /etc/httpd/modules/mod_wsgi.so
# now configure it
# Pass header Authorization into your Django App
WSGIPAssAuthorization On
WSGIPythonPath /path/to/lib/python/site-packages/
@feliphebueno
feliphebueno / settings.py
Created May 23, 2017 00:19
Exemplo do arquivo de configuração do C.L.U. para integração com a Amazon
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
DATABASES = {
'default': {
'ENGINE': "driver",
'NAME': "name",
'HOST': "host",
@feliphebueno
feliphebueno / generator.php
Created January 25, 2017 13:42 — forked from tawfekov/generator.php
Doctrine2 Generate Entities form Existing Database
<?php
include '../vendor/autoload.php';
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
$classLoader->register();
// config
$config = new \Doctrine\ORM\Configuration();
@feliphebueno
feliphebueno / compiler.py
Created July 13, 2016 08:19
Noobie Python compiler.
import glob, os, sys, getopt, shutil
class Compiler():
targetPath = None
compiledPath = None
def __init__(self, argv):
if self.input(argv) == True:
self.compile()
@feliphebueno
feliphebueno / sendMail.js
Created July 10, 2015 15:48
Simple mail sender node js api, based on http post request.
/**
*
* main.js
* simple mail sender nodejs api
* requires express, body-parser, nodemailer
*/
var server = httpServer();
server.listen(8085);