Skip to content

Instantly share code, notes, and snippets.

View johngrimes's full-sized avatar
🚴
coding and cycling

John Grimes johngrimes

🚴
coding and cycling
View GitHub Profile
@johngrimes
johngrimes / valueset_to_csv.sh
Created May 25, 2022 01:46
Convert a FHIR ValueSet to CSV using JQ
jq -r ".expansion.contains[] | { system: .system, code: .code, display: .display } | map(values) | @csv" ~/Desktop/source.ValueSet.json >~/Desktop/target.csv
@johngrimes
johngrimes / windowing-test-a.ipynb
Last active November 15, 2020 08:02
Testing windowing as a substitute for straight aggregation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@johngrimes
johngrimes / JTI_upset.csv
Last active March 13, 2020 00:31
UpSet Demo
We can't make this file beautiful and searchable because it's too large.
SCTID,FSN,Body,External,Nature
100051000032108,Bat scratch (event),0,1,0
100071000032104,Bat scratch injury (disorder),0,0,1
10050004,Contusion of chest (disorder),0,0,1
10061007,Brain stem contusion without open intracranial wound AND with prolonged loss of consciousness (more than 24 hours) AND return to pre-existing conscious level (disorder),0,0,1
10065003,Excoriated acne (disorder),0,0,1
10070005,Poisoning caused by quinoline AND/OR hydroxyquinoline derivative (disorder),0,1,0
10132008,Burns of multiple sites (disorder),1,0,0
10186000,Toxic effect of selenium compound (disorder),0,1,0
10217006,Third degree perineal laceration (disorder),0,0,1
@johngrimes
johngrimes / .prettierrc.json
Created May 5, 2018 06:46
My Prettier configuration
{
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"proseWrap": "always"
}
@johngrimes
johngrimes / macos-10133-fail.md
Last active February 5, 2021 19:39
macOS 10.13.3 Update FAIL

I had some massive problems when installing the 10.13.3 update on macOS. The update installed, my computer successfully restarted - but on a subsequent restart the boot failed and displayed the following installation log:

Apr  4 04:07:04 MacBook-Pro opendirectoryd[186]: [session] Processing a network change notification
Apr  4 04:07:06 MacBook-Pro Unknown[526]: Launching the Language Chooser for an OS Install
Apr  4 04:07:06 MacBook-Pro bspowerassertiontool[521]: Tool exited successfully (0).
Apr  4 04:07:06 MacBook-Pro launchprogresswindow[524]: ISAP: Show progress UI called
Apr  4 04:07:07 MacBook-Pro Installer Progress[180]: Progress UI App Starting
Apr  4 04:07:32 MacBook-Pro opendirectoryd[186]: [session] Received a network change notification
Apr  4 04:07:32 MacBook-Pro opendirectoryd[186]: [session] Received a network change notification
@johngrimes
johngrimes / distributed-git-ftw.md
Created March 7, 2018 03:14
Distributed Git FTW

Make a bare repo from a checkout:

git clone --bare /path/to/repo

Then run this in the bare git repo:

touch git-daemon-export-ok
@johngrimes
johngrimes / davmail-launchd.md
Last active February 22, 2018 00:52
Keep DavMail running with launchd

Keep DavMail running with launchd

Create the following file at ~/Library/LaunchAgents/net.sourceforge.davmail.agent.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
 Label
@johngrimes
johngrimes / recordRelease.sh
Created February 14, 2018 22:42
Recording releases with Sentry and Create React App
#!/bin/bash
VERSION=$(git rev-parse HEAD)
yarn run sentry-cli releases -p $SENTRY_PROJECT new $VERSION && \
yarn run sentry-cli releases -p $SENTRY_PROJECT set-commits --auto $VERSION && \
yarn run sentry-cli releases -p $SENTRY_PROJECT files $VERSION upload-sourcemaps --url-prefix https://$TARGET_HOSTNAME/static/js build/static/js && \
yarn run sentry-cli releases -p $SENTRY_PROJECT deploys $VERSION new --env $TARGET_HOSTNAME
@johngrimes
johngrimes / nginx.conf
Created February 14, 2018 22:23
Ideal Nginx configuration for JavaScript single-page app
server {
listen 80;
root /usr/share/nginx/html;
gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
gzip_comp_level 9;
etag on;
location / {
try_files $uri $uri/ /index.html;
}
@johngrimes
johngrimes / Dockerfile
Created February 14, 2018 22:21
Injecting environment variables into config.json using Docker
FROM nginx
COPY docker/start.sh /
COPY docker/buildConfig.sh /
RUN chmod +x /start.sh /buildConfig.sh
COPY docker/myapp.nginx.conf /etc/nginx/conf.d/default.conf
COPY build /usr/share/nginx/html
ENV MYAPP_OPTION_A="Default option A value"