Skip to content

Instantly share code, notes, and snippets.

@jibrel
jibrel / cpt4.csv
Created June 22, 2019 00:53 — forked from lieldulev/cpt4.csv
CPT 4 Codes, CSV format
com.medigy.persist.reference.type.clincial.CPT.code label
0003T Cervicography
0008T Upper gi endoscopy w/suture
0010T Tb test, gamma interferon
0016T Thermotx choroid vasc lesion
0017T Photocoagulat macular drusen
0018T Transcranial magnetic stimul
0019T Extracorp shock wave tx, ms
0020T Extracorp shock wave tx, ft
0021T Fetal oximetry, trnsvag/cerv
Operator Postgres equivalent Description
_contains @> Does the column value contains these key-value pairs at top-level?
_contained_in <@ Is the column value contained in this JSON object at top-level?
_has_key ? Does the string exist as a top-level key within the JSON value?
_has_keys_any ?| Do any of these array strings exist as top-level keys?
_has_keys_all ?&amp; Do all of these array strings exist as top-level keys?
@jibrel
jibrel / product_table_with_jsonb.sql
Created August 3, 2021 22:48 — forked from shahidhk/product_table_with_jsonb.sql
An indicative product table with JSONB column for specs
CREATE TABLE product (
uuid UUID NOT NULL DEFAULT gen_random_uuid(),
name TEXT NOT NULL,
category TEXT NOT NULL,
description TEXT NOT NULL,
price NUMERIC NOT NULL,
spec JSONB NOT NULL,
PRIMARY KEY (uuid)
);
@jibrel
jibrel / bahrain_ah.csv
Created September 15, 2021 18:35 — forked from mks-d/bahrain_ah.csv
Bahrain address hierarchy: 'Governorate', 'Place', 'Block'
Southern Aáli 746
Southern Aáli 748
Southern Al Door 965
Southern Algainah 961
Southern Al Hajyat 929
Southern Al Hajyat 931
Southern Al Hajyat 935
Southern Al Hajyat 939
Southern Al Hunaniya 901
Southern Al Hunaniya 903
{"snomed_35vf":"", "snomed_ct":"", "ccam":"NFKA007", "icd10":[], "label_fr":"PTG","label_fr_lc":"ptg","weight":10}
{"snomed_35vf":"", "snomed_ct":"", "ccam":"NFKA007", "icd10":[], "label_fr":"Prothèse totale de genou","label_fr_lc":"prothese total de genou","weight":10}
{"snomed_35vf":"", "snomed_ct":"", "ccam":"NEKA020", "icd10":[], "label_fr":"PTH","label_fr_lc":"pth","weight":10}
{"snomed_35vf":"", "snomed_ct":"", "ccam":"NEKA020", "icd10":[], "label_fr":"Prothèse totale de hanche","label_fr_lc":"prothese totale de hanche","weight":10}
{"snomed_35vf":"", "snomed_ct":"", "ccam":"NFQC001", "icd10":[], "label_fr":"Arthroscopie du genou","label_fr_lc":"arthroscopie du genou","weight":10}
{"snomed_35vf":"", "snomed_ct":"", "ccam":"NDPA011", "icd10":["M20.1"], "label_fr":"Hallux valgus","label_fr_lc":"hallux valgus","weight":10}
{"snomed_35vf":"", "snomed_ct":"", "ccam":"AHPA009", "icd10":["G56.0"], "label_fr":"Canal carpien","label_fr_lc":"canal carpien","weight":10}
{"snomed_35vf":"", "snomed_ct":"", "ccam":"M
@jibrel
jibrel / open-source-sso.md
Created October 1, 2021 15:50 — forked from yanivmn/open-source-sso.md
Comparison of open-source SSO implementations
Aerobase Keycloak WSO2 Identity Server Gluu CAS OpenAM Shibboleth IdP
OpenID Connect/OAuth support yes yes yes yes yes yes third-party
Multi-factor authentication yes yes yes yes yes yes yes
Admin UI yes yes yes yes yes yes no
OpenJDK support yes yes yes yes no
Identity brokering yes yes yes
Middleware NGINX, Wildfly Wildfly, JBOSS WSO2 Carbon Jetty, Apache HTTPD any Java app server any Java app server Jetty, Tomc
import React from 'react';
import { Subscription } from 'react-apollo';
import gql from 'graphql-tag';
const ConvertScreen = () => {
const urlParams = new URLSearchParams(window.location.search);
const id = urlParams.get('id');
return (
<Subscription
@jibrel
jibrel / open-source-sso.md
Created January 13, 2022 20:37 — forked from bmaupin/open-source-sso.md
Comparison of open-source SSO implementations
@jibrel
jibrel / Zero_knowledge_db.md
Created May 16, 2022 06:08 — forked from thiloplanz/Zero_knowledge_db.md
Zero-knowledge databases

Zero knowledge databases

The idea

The idea is to provide a database as a service to end users in such a way that no one except the user herself can access the data, not even the hosting provider or the database administrator.

Advantages

  • A privacy- and/or security-conscious user will have more trust in such a setup.
  • The service provider cannot be coerced to release the data they were trusted with, and he cannot be held responsible for the content he is storing.
@jibrel
jibrel / kematzy.hasura.audit_trail.sql
Created November 12, 2022 22:48 — forked from kematzy/kematzy.hasura.audit_trail.sql
Hasura AuditTrail by Kematzy
-- ## Kematzy Hasura AuditTrail
-- This is based on the [Hasura/audit-trigger](https://github.com/hasura/audit-trigger).
--
-- Changes from the Hasura version:
-- 1. Simplified audit table schema with these changes:
-- a. Renamed columns to lowerFirst format.
-- b. Changed order of columns.
-- c. Combined schema & table name into one column.
-- d. Stores the record `id` UUID value in the `rowId` column.