Skip to content

Instantly share code, notes, and snippets.

from django import forms
from django_summernote.widgets import SummernoteWidget
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from words.models import Entry
class EntryForm(forms.ModelForm):
@ateoto
ateoto / models.py
Created February 26, 2014 18:31
django_polymorphic
"""
https://github.com/chrisglass/django_polymorphic
https://django-polymorphic.readthedocs.org/en/latest/
Try this out.
"""
class Ingredient(PolymorphicModel):
name = models.CharField(max_length=75)
class SimpleIngredient(Ingredient):
fab deploy

Keybase proof

I hereby claim:

  • I am ateoto on github.
  • I am mattmccants (https://keybase.io/mattmccants) on keybase.
  • I have a public key whose fingerprint is 4BCF 6A95 25E8 0D4E 5168 305F C492 9F05 EE35 5602

To claim this, I am signing this object:

#!/bin/bash
git clone git@github.com:ateoto/notes.git
@ateoto
ateoto / gist:5168d78920fd6ca26085
Created October 22, 2014 17:27
Amazon describe-security-group
"Description": "Enable this sg to allow CircleCI SSH Access",
"IpPermissions": [
{
"ToPort": 22,
"IpProtocol": "tcp",
"IpRanges": [
{
"CidrIp": "72.44.32.0/19"
},
{
input {
syslog {
port => 5140
type => "docker"
}
}
output {
stdout {
codec => rubydebug
@ateoto
ateoto / 1_example.yml
Last active August 29, 2015 14:10
Template Error in 1.8
---
- hosts: all
tasks:
- name: Determining database status
shell: "docker inspect --format '{% raw %}{{ .State.Running }}{% endraw %}' mongodb"
register: db_up
- debug: var=db_up
type Tag struct {
Major int
Minor int
Name string
}
type Tags []Tag
func (slice Tags) Len() int {
return len(slice)