Skip to content

Instantly share code, notes, and snippets.

View gilsondev's full-sized avatar
💼
Work

Gilson Filho gilsondev

💼
Work
View GitHub Profile
@gilsondev
gilsondev / routes.py
Created July 15, 2011 22:01 — forked from rochacbruno/routes.py
router example
#!/usr/bin/python
# -*- coding: utf-8 -*-
default_application = 'init' # ordinarily set in base routes.py
default_controller = 'default' # ordinarily set in app-specific routes.py
default_function = 'index' # ordinarily set in app-specific routes.py
routers = dict(
# base router
@gilsondev
gilsondev / oss.textile
Created September 2, 2011 12:21 — forked from kennethreitz/oss.textile
Open Source Notes

Contributing to Open Source
=======

First Rule: You can find the time
- It doesn’t take much
- Weekends are good
- Find what other time you’re wasting
- Try something that’s not your day job

Second Rule: What to contribute to?

@gilsondev
gilsondev / bash_prompt.sh
Created April 24, 2012 23:51 — forked from jcook793/bash_prompt.sh
Set color bash prompt according to active virtualenv, git branch, mercurial branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the branch/status of the current mercurial repository
# * the return value of the previous command
#
@gilsondev
gilsondev / python-pil-image-sprite.py
Created July 20, 2012 18:02 — forked from gourneau/python-pil-image-sprite.py
Make sprites of images using Python and PIL
#!/usr/bin/python
# This work is licensed under the Creative Commons Attribution 3.0 United
# States License. To view a copy of this license, visit
# http://creativecommons.org/licenses/by/3.0/us/ or send a letter to Creative
# Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
# from http://oranlooney.com/make-css-sprites-python-image-library/
# Orignial Author Oran Looney <olooney@gmail.com>
@gilsondev
gilsondev / forms.py
Created August 17, 2012 19:08 — forked from mcosta/forms.py
Sistema de Auditoria (RAAI - Relatorio Anual de Auditoria Interna)
# -*- coding: utf8 -*-
import time, datetime
from datetime import date
from django import forms
from django.contrib.auth.models import User
from django.conf import settings
from bootstrap_toolkit.widgets import BootstrapDateInput
@gilsondev
gilsondev / subversion_cheatsheet.md
Created November 23, 2012 18:08
Subversion cheatsheet

Subversion Cheatsheet

Criar um repositório SVN local

OBS: Assumindo que project1 já existe em /home/user/project1 e tem conteúdo, vamos criar um repositório e importar o conteúdo de project1.

  1. Cria o diretório que irá conter o repositório:
    $ mkdir /home/user/svnrep
@gilsondev
gilsondev / gist:7379549
Created November 8, 2013 23:57 — forked from jacobh/gist:2842966
Template used for form fields with twitter bootstrap
{% for field in form %}
<div class="control-group {% if field.errors %}error{% endif %}">
<label class="control-label" for="{{ field.html_name }}">{{ field.label }}</label>
<div class="controls">
{{ field }}
{% if field.errors %}
<span class="help-inline">{{ field.errors|first }}</span>
{% endif %}
{% if field.help_text %}
<p class="help-block">{{ field.help_text }}</p>
@gilsondev
gilsondev / README.md
Last active December 31, 2015 01:29 — forked from myaser/README.md

Testing abstract models

a TestCase subclass to help you test your abstract django models

usage:

1- subclass your django abstract models

<!DOCTYPE html>
<html data-ng-app="webapp">
<head>
<title>angular nav</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<style>
body{
padding-top: 70px;
}
@gilsondev
gilsondev / install.sh
Last active August 9, 2016 15:36 — forked from claudiosanches/install.sh
Install Strem.io
#!/usr/bin/env bash
FILE="Streamio.tar.gz"
if [ -f "$FILE" ]
then
echo "Arquivo $FILE encontrado."
else
echo "Arquivo não encontrado. Iniciando download..."
wget http://www.strem.io/download -O Streamio.tar.gz