Skip to content

Instantly share code, notes, and snippets.

View gladson's full-sized avatar
😎
Vá lutar pelo que você acredita.

Gladson gladson

😎
Vá lutar pelo que você acredita.
View GitHub Profile
@gladson
gladson / gist:3184030
Created July 26, 2012 19:31 — forked from fmobus/gist:1141019
class para comunicação com impressoras térmicas protocolo PPLA
DEVICE = "/dev/lp0";
STX = chr(2);
CR = chr(13);
LF = chr(10);
DEFAULTS = {
'ori': 4,
'font': 2,
'mh': 2,
'mv': 2,
@gladson
gladson / gist:3141041
Created July 19, 2012 05:51 — forked from idan/gist:3135754
A Sample Post

Hello there! This is a sample post for gist.io, a super-lightweight writing soapbox for hackers.

Now look up. Further. Above the post title. See that grey text with the gist ID?

Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.

This is a major heading

If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.

@gladson
gladson / gist:3140945
Created July 19, 2012 05:25
using Class Based Generic ListView to seach forms and List
....
from django.views.generic import ListView
from sgf.utils.decorators import page, permission_required_sgf
from sgf.administrativo.models import ComiteRegional
from sgf.administrativo.forms import FormComiteRegionalBusca
......
class SearchListView(ListView):
@gladson
gladson / forms.py
Created July 17, 2012 18:41 — forked from douglasmiranda/forms.py
Implementando form de filtro numa ListView (Resposta para um tópico na Django Brasil)
# https://groups.google.com/forum/?fromgroups#!topic/django-brasil/d6gV1V9qrgU
from django.forms import ModelForm
from minha_app.models import MeuModel
class MeuForm(ModelForm):
class Meta:
model = MeuModel