Skip to content

Instantly share code, notes, and snippets.

View sween's full-sized avatar
💭
Mostly Good Intentions

Ron Sweeney sween

💭
Mostly Good Intentions
View GitHub Profile
read -d '' sql << EOF
select c1, c2 from foo
where c1='something'
EOF
echo "$sql"
# -----------------------------------------------------------------------------
# InterSystems IRIS Skin
# Uses Frosty Colors:
# #333695
# #00a19c
# -----------------------------------------------------------------------------
# Skin...
k9s:
body:
@sween
sween / iris-plugin.yml
Created November 28, 2023 21:07
k9s plugin for InterSystems IRIS
plugin:
get-all:
shortCut: i
confirm: true
description: Restart IRIS
scopes:
- container
command: sh
background: false
args:
/usr/bin/scp [email protected]:file somewhere 2>/dev/null &
pid=$! # Process Id of the previous running command
spin[0]="-"
spin[1]="\\"
spin[2]="|"
spin[3]="/"
echo -n "[copying] ${spin[0]}"
while [ kill -0 $pid ]
@sween
sween / gist:80db2061902cf7b80d0516ecfd024e4d
Last active September 2, 2021 20:00
.gitlab_example.yaml
variables:
GIT_CLONE_PATH: "/home/sween/builds/src"
GIT_STRATEGY: clone
deploy hsaas_dev:
stage: deploy
tags:
- dev
script:
- echo "Initializing hsaas CI/CD Build DEV..."
@sween
sween / get_access_token.js
Created April 28, 2021 15:22 — forked from ejdoh1/get_access_token.js
How to get an access_token from AWS Cognito using Axios
// Get AWS Congito access token using node-fetch and axios
const axios = require('axios');
const fetch = require('node-fetch');
const url = 'https://REPLACE_ME.auth.ap-southeast-2.amazoncognito.com/oauth2/token';
const clientId = 'REPLACE_ME';
const clientSecret = 'REPLACE_ME';
const body = `client_id=${clientId}&client_secret=${clientSecret}&grant_type=client_credentials`
// with node-fetch
@sween
sween / SMART-Sanbox-standalone-patient.md
Created March 9, 2021 16:17 — forked from hansenms/SMART-Sanbox-standalone-patient.md
SMART on FHIR Standalone launch (patient)

First get `/metadata'

GET https://launch.smarthealthit.org/v/r3/sim/eyJrIjoiMSIsImIiOiJiMWYwMzY1ZC1mNDA1LTQ1YzAtOGNiZC1kYTU2NTE4ZTc1MDQifQ/fhir/metadata

eyJrIjoiMSIsImIiOiJiMWYwMzY1ZC1mNDA1LTQ1YzAtOGNiZC1kYTU2NTE4ZTc1MDQifQ is a JWT with the following header:

{
IRIS:%SYS 5f3>for d dsp132^mgstat(1,20,"")
sudo apt-get install libopenblas-base libopenmpi-dev
mkvirtualenv py3torch -p python3
workon py3torch
@sween
sween / install-docker.md
Created December 30, 2020 15:12 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start