Skip to content

Instantly share code, notes, and snippets.

View huogerac's full-sized avatar
:octocat:

Roger Camargo huogerac

:octocat:
View GitHub Profile
@huogerac
huogerac / EngineBean.java
Created October 7, 2011 12:16
code smell sample
package sample;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
@huogerac
huogerac / Produto.java
Created November 1, 2011 21:09
MongoDB Tests
@Entity
public class Produto {
@Id private ObjectId id;
private String nome;
private String complemento;
private String tag;
private double preco;
private Date inicioEm;
@huogerac
huogerac / seguranca.cs
Created November 25, 2011 16:12
RIJNDAEL - symmetric block cipher
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;
using System.IO;
namespace Seguranca
{
static class ClSeguranca
{
@huogerac
huogerac / django_help.txt
Created February 15, 2012 03:42
Comandos da aula da academia de python do dia 14/fev
1) Ambiente:
i) Instalar virtualenv (que vem com pip)
# apt-get install virtualenv
ii) Instalar o django utilizando virtualenv
# virtualenv --no-site-packages django1.3
# cd django1.3/bin
# . activate
# pip install django
# pip install sqlite
@huogerac
huogerac / .gitconfig
Created April 17, 2012 23:54
configurações do git
[user]
name = Roger Camargo
email = ...
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = auto
@huogerac
huogerac / postgres_ubuntu
Created April 24, 2012 03:06
Procedimento para instalar Postgres
SERVER
------
sudo apt-get install libpq-dev python-dev
sudo apt-get install postgresql
INTERFACE ADMINISTRATIVA
------------------------
sudo apt-get install pgadmin3
@huogerac
huogerac / spider.py
Created May 25, 2012 02:02
Dicas de aula - 24mai
import sys
def mostrar_args(f):
def _f(*args, **kwargs):
#print args, kwargs
#sys.stderr.write('###argumentos: %r, %r \n' % (args, kwargs))
sys.stderr.write('###argumentos: {0}, {1}\n'.format(args, kwargs))
return f(*args, **kwargs)
return _f
@huogerac
huogerac / restaurar-almserver.md
Created September 6, 2012 20:54
Guia para Restaurar Backup do ALMSERVER

Guia para Restaurar Backup do ALMSERVER

A exportação da VM é armazenada no storage da Indra (10.239.72.52) Os arquivos são nomeados como:

vm-bkp-ANO-MES-DIA.ovf
vm-bkp-ANO-MES-DIA.vmdk

Para obter um backup, pode-se utilizar o ftp://10.239.72.52/pools/A/A0/Backups/backup

@huogerac
huogerac / contador.py
Created September 28, 2012 22:07
Exercício 1 - Objetos Pythonicos
# coding: utf-8
from __future__ import division
"""
Código inicial usado na Lista de Exercícios 1 do curso
"Objetos Pythonicos" de Luciano Ramalho, Oficinas Turing.
"""
class Contador(object):
from fabric.contrib.files import exists
from fabric.api import *
from fabric.colors import green, red
from os import path
from fabric.operations import local as lrun
from fabric.api import task
REPO_URL = 'https://github.com/huogerac/cardapiodogia.git'
SITES_FOLDER = '/home/roger'