Skip to content

Instantly share code, notes, and snippets.

@p2
p2 / convert.html
Created August 22, 2011 04:29
A bookmarklet that converts inches to cm and feet to m. Can be expanded to convert other units as well. Visit www.ossus.ch/Convert.html, drag the link shown there to your bookmark bar and when you're on a website that needs conversion, click the boomarkle
<h1>Convert Bookmarklet</h1>
<p>A bookmarklet to (currently) convert <b>feet to cm</b> and <b>inches to Meter</b> on any website.</p>
<p>Drag this link to your bookmark bar and click it when you're on a website you want to convert: <a href="javascript:(function(){var head=document.getElementsByTagName('head')[0],script=document.createElement('script');script.type='text/javascript';script.src='http://www.ossus.ch/convert.js?'+Math.floor(Math.random()*99999);head.appendChild(script);})(); void 0">Convert</a>
</p>
@p2
p2 / Custom CSS
Created February 22, 2012 15:28
Tumblr Blog Page
h3 {
margin-bottom: 0.5em;
}
#header {
margin-bottom: 40px;
padding-top: 40px;
}
#header h1 a.no_header {
font-family: Palatino, Helvetica, sans-serif;
@p2
p2 / TerminalOutput.sh
Created July 18, 2012 23:59
Error installing gnome-doc-utils
$ brew update
Updated Homebrew from 612e0b1c to c4b88b2a.
==> Updated Formula
ddrescue fbida geeqie
$ brew doctor
Your system is raring to brew.
$ brew uninstall libxml2
Uninstalling /usr/local/Cellar/libxml2/2.8.0...
$ brew install libxml2 --with-python
==> Downloading ftp://xmlsoft.org/libxml2/libxml2-2.8.0.tar.gz
@p2
p2 / .profile
Last active August 27, 2021 04:28
BaSH Profile
# Now written for ZSH and using oh-my-zsh
# Install oh-my-zsh as shown in https://github.com/robbyrussell/oh-my-zsh#basic-installation
# Install our custom theme: ln -s ~/profile/p2.zsh-theme ~/.oh-my-zsh/themes/p2.zsh-theme
# Change ~/.zshrc and use:
# ZSH_THEME="p2"
# plugins=()
# source ~/.profile
# -----------------------
# keep history per session (oh-my-zsh sets this to shared)
@p2
p2 / csv-to-sqlite.py
Created December 4, 2013 23:35
Quickly create a SQLite table from a CSV/TSV file
#!/usr/bin/python
#
# Read a CSV/TSV with a header row (!) and put it into a new sqlite table
import sys
import csv
import sqlite3
class Importer (object):
@p2
p2 / autoflask-patch.diff
Created March 5, 2014 22:32
Patch for autoflask to sort docstrings by path and group by endpoint/method
diff --git a/httpdomain/sphinxcontrib/autohttp/flask.py b/httpdomain/sphinxcontrib/autohttp/flask.py
--- a/httpdomain/sphinxcontrib/autohttp/flask.py
+++ b/httpdomain/sphinxcontrib/autohttp/flask.py
@@ -93,7 +93,15 @@
def make_rst(self):
app = import_object(self.arguments[0])
- for method, path, endpoint in get_routes(app):
+
+ # order by paths, remember last path per endpoint
@p2
p2 / UrTUpdater-crash-2014-08-07.crash
Created August 8, 2014 02:59
UrTUpdater-crash-2014-08-07
Process: UrTUpdater [3031]
Path: /Applications/Xgames/*/UrTUpdater.app/Contents/MacOS/UrTUpdater
Identifier: @BUNDLEIDENTIFIER@
Version: ???
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: UrTUpdater [3031]
User ID: 501
Date/Time: 2014-08-07 22:57:38.198 -0400
{
"security": {
"cors": 1,
"description": "This server implements OAuth2 for login",
"http://fhir-registry.smartplatforms.org/Profile/oauth-uris#authorize": [
{
"valueUri": "https://fhir-dev.healthintersections.com.au:0/oauth2/auth"
}
],
"http://fhir-registry.smartplatforms.org/Profile/oauth-uris#oidc-discovery": [
@p2
p2 / Implementation Details.md
Last active May 16, 2018 14:22
SMART on FHIR Tech Overview

Implementation Details

We'll be addressing certain implementation details here.

Pregnancy & Breastfeeding

To be able to detect whether a woman is pregnant, we would expect a [Condition][res-condition] resource with start date, end date and the Snomed-CT code for patient currently pregnant (77386006) or one if its many child codes. There is also a code for possible pregnancy (102874004) that we can consider using, if it makes sense from HCA's side.