Skip to content

Instantly share code, notes, and snippets.

View alexcabrera's full-sized avatar

Alex Cabrera alexcabrera

View GitHub Profile
=jcalendar_disabled
:background #bbb
:color #888
table.jCalendar
:border 1px solid #000
:background #aaa
:border-collapse separate
:border-spacing 2px
div#placeholder
img
:src "/images/placeholder.jpg"
:alt "This is just a placeholder image"
p#image_description
"This would be the text that would go inside the paragraph tag"
# My app will start with creating a generic relationship with any object that notifies it of an update
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
class ActivityStreamItem(models.Model):
actor = models.ForeignKey("... want to populate from another model's inner class ...")
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
@alexcabrera
alexcabrera / base.html
Created March 5, 2010 19:51
A set of basic django templates to be used with the Graphpaper plugin for Compass CSS
<!DOCTYPE html>
<html>
<head>
{% block html_head %}
{% endblock html_head %}
</head>
<body id="{% block body_id %}{% endblock %}" class="{% block body_class %}{% endblock %}">
@alexcabrera
alexcabrera / fucking_ie.sass
Created March 23, 2010 17:59
Why, oh why, won't Microsoft implement nth-child in goddamn IE
// wouldn't this be lovely
#policus_services_descriptions
+column(8)
+last
.headline
+slug_text
:color #{!dark_gray}
@alexcabrera
alexcabrera / gdal.rb
Created August 20, 2010 04:11
Comment out --with-png for successful build
require 'formula'
class Gdal <Formula
url 'http://download.osgeo.org/gdal/gdal-1.7.2.tar.gz'
homepage 'http://www.gdal.org/'
md5 '05351f8cb61761ae579667e24a297fe6'
depends_on 'libtiff'
depends_on 'giflib'
depends_on 'proj'
@alexcabrera
alexcabrera / _badgify.sass
Created September 21, 2010 21:34
SASS mixin for iOS-ish icon badges
=badgify
position: absolute
top: -5px
right: -5px
padding: 4px 8px
line-height: 16px
text-align: center
font-size: 16px
font-weight: bold
color: rgb(255, 255, 255)
// Typography mixins go here
=small_link_text
font-size: 11px
a
text-decoration: none
color: $blue
=view_link_text
@alexcabrera
alexcabrera / gist:672743
Created November 11, 2010 16:35
A simple bash script to set the tab title in the Mac OS X terminal. Remember to chmod 755 it
We couldn’t find that file to show.
// _home.sass
@import home/featured_items
@import home/brands
@import home/new_items
#home_content
@include grid-container
#featured_items