Skip to content

Instantly share code, notes, and snippets.

View monokrome's full-sized avatar
😻
meow

Bailey Stoner monokrome

😻
meow
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Twitter Card Example</title>
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@monokrome">
<meta name="twitter:creator" content="@monokrome">
<meta name="twitter:title" content="A Twitter Cards Example">
{% if not is_viewing_all %}<a href="your_url_here">View All</a>{% endif %}
angular.module 'application'
.factory 'analysis', [
'$http'
].concat ($http) ->
$http.get '/analysis/journeying.json'
.then (response) -> response.data
{
# WTF, it's a comment?!
"this": "is",
"json": [
"because",
"I",
"like",
"typing",
"extra",
"characters",
{% compress css %}
<link rel=stylesheet type=text/css href="something.css{{ gzip_extension }}" />
{% endcompress css %}
task_name: dependencies in order
things
to
do
after
other_task: dependencies different order
things
to
do
{% for person in people %}
{% with profile as people.get_profile %}
{{ person.username }} has {{ profile.points }} points.
{% endwith %}
{% endfor %}
class GenericModel(models.Model):
model_type = models.CharField(max_length=16)
def __init__(self, *args, **kwargs):
for related_object in self._meta.get_all_related_objects():
if not issubclass(related_object.model, self.__class__):
continue
self.model_type = '{0}.{1}'.format(self._meta.app_label, related_object.__class__.__name__.lower())