Skip to content

Instantly share code, notes, and snippets.

@mapsam
mapsam / states.geojson
Created September 28, 2015 20:38
US States GeoJSON from NaturalEarthData
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mapsam
mapsam / error.md
Last active September 18, 2015 21:13
errrrrrrr rva-screening

ProgrammingError: (ProgrammingError) missing FROM-clause entry for table "patient_referral" LINE 6: ..._referral.status = 'COMPLETED') ORDER BY coalesce(patient_re... ^ 'SELECT count(*) AS count_1 \nFROM (SELECT patient.created AS patient_created, patient.last_modified AS patient_last_modified, patient.id AS patient_id, patient.full_name AS patient_full_name, patient.first_name AS patient_first_name, patient.middle_name AS patient_middle_name, patient.last_name AS patient_last_name, patient.dob AS patient_dob, patient.ssn AS patient_ssn, patient.email AS patient_email, patient.gender AS patient_gender, patient.transgender AS patient_transgender, patient.race AS patient_race, patient.race_other AS patient_race_other, patient.ethnicity AS patient_ethnicity, patient.languages AS patient_languages, patient.languages_other AS patient_languages_other, patient.has_interpreter_yn AS patient_has_interpreter_yn, patient.education_level AS patient_education_level, patient.marital_status AS patient_marital_status, patien

@mapsam
mapsam / time.py
Created September 17, 2015 23:10
turn times into readable strings
def days_from_today(field):
'''Takes a python date object and returns days from today
'''
if isinstance(field, datetime.date):
return (
datetime.date(field.year, field.month, field.day) -
datetime.date.today()
).days
elif isinstance(field, datetime.datetime):
field = field.replace(tzinfo=pytz.utc)
@mapsam
mapsam / east.geojson
Last active October 16, 2015 05:15
a geometry collection
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mapsam
mapsam / sticky-columns.html
Created September 11, 2015 00:09
Sticky column hack for table elements
<style>
.cf:before,
.cf:after {
content:" ";
display:table;
}
.cf:after {
clear:both;
}
.cf {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mapsam
mapsam / responsive-video.html
Created August 12, 2015 21:53
Hillbarn responsive video embed
<div class="video">
<iframe src="https://player.vimeo.com/video/135995751" class="video-iframe" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
@mapsam
mapsam / wand.json
Last active August 29, 2015 14:26
Test Wand.js object
{
"elem": "wizard",
"nodes": [
{
"id": 0,
"title": "Are you having a seriously good time?",
"content": "",
"type": "pickOne",
"triggers": [
// block sections, to be used within .containers
// all exist on a 12 unit grid and are relative in
// size to the container element
$break: 50em;
@mixin width($num) {
width: 100% * ($num / 12)
}
.block_1,
@mapsam
mapsam / index.html
Created July 14, 2015 23:02
ImageTalk Experiment
<html lang="en">
<head>
<title>hello world</title>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<style>
body {
padding:0;
margin:0;
}