Skip to content

Instantly share code, notes, and snippets.

View jonrohan's full-sized avatar

Jon Rohan jonrohan

View GitHub Profile
@jonrohan
jonrohan / .gitignore
Created March 5, 2020 00:08 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@jonrohan
jonrohan / index.html
Created June 20, 2011 22:37
This is the description of my gist.
<!DOCTYPE HTML>
<html>
<body>
<div id="map"></div>
<script src="http://polymaps.org/polymaps.min.js?2.5.0"></script>
<script>
var po = org.polymaps;
var map = po.map()
.container(document.getElementById("map").appendChild(po.svg("svg")))
@jonrohan
jonrohan / gist:992570
Created May 26, 2011 04:48
Sentry Tests Failing
..[%] sentry - ERROR - view exception
Traceback (most recent call last):
File "/home/vagrant/sg/simplegeo.com/lib/python2.6/site-packages/Django-1.2.4-py2.6.egg/django/core/handlers/base.py", line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/vagrant/sg/simplegeo.com/lib/python2.6/site-packages/django_sentry-1.8.4.2-py2.6.egg/sentry/tests/views.py", line 11, in raise_exc
raise Exception(request.GET.get('message', 'view exception'))
Exception: view exception
.EFF....EFFEBad data received
Traceback (most recent call last):
File "/home/vagrant/sg/simplegeo.com/lib/python2.6/site-packages/django_sentry-1.8.4.2-py2.6.egg/sentry/web/views.py", line 405, in store
{% extends "docs/base.html" %}
{% load markup doc_tags compress %}
{% block title %}{{topic}} &middot; {{article}}{% endblock %}
{% block js %}
{{block.super}}
{% compress js %}
<script type="text/javascript" charset="utf-8">
{% load doc_tags %}
<div id="{{topic.slug}}" class="topic">
<h2 class="topic-title"><a href="{% url docs-topic topic.slug %}">{{topic}}</a></h2>
<ul class="toc-articles">
{% for article in topic.articles %}
{% if user|can_see:article %}
<li class="toc-article">
<h3 class="article-title"><a href="{% url docs-article topic.slug article.slug %}">{{article}}</a></h3>
<ul class="toc-sections">
{% extends "docs/base.html" %}
{% load compress %}
{% block js %}
{{block.super}}
{% compress js %}
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("ul.toc-sections a.more-info").click(function(){
from django.contrib.auth.models import Group
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
'''
The Docs site will have heirarchy like follows:
Topic
| -- Article
<div class="chat-bubble">
Buongiorno!
<div class="chat-bubble-arrow-border"></div>
<div class="chat-bubble-arrow"></div>
</div>
.chat-bubble {
background-color:#EDEDED;
border:2px solid #666666;
font-size:35px;
@jonrohan
jonrohan / index.html
Created January 21, 2011 23:05
auto-fill-form.html
<!DOCTYPE html>
<html>
<head>
<title>Autofill Form with SimpleGeo</title>
</head>
<body style="padding:20px 50px;">
<h3>Example getting user's context using getLocation and pre-populating the form</h3>
<form action="." method="post">
<p>
// If we can create a SVG element, and it has the basic function of SVG
if(!!document.createElementNS
&& !!document.createElementNS('http://www.w3.org/2000/svg', "svg").createSVGRect) {
// The browser supports SVG
} else {
// The browser DOESN'T support SVG yet
}