Skip to content

Instantly share code, notes, and snippets.

@captDaylight
captDaylight / amoxicillin.json
Created March 29, 2024 14:44
Packageddrugs search for amoxicillin
{
"results": [
{
"conceptType": "medispan/packageddrugs",
"name": "Amoxicillin Oral Capsule 250 MG",
"id": "35539",
"ppid": "55289001930",
"clinicalDosePackageSize": "",
"dea": {},
"desi": {
@captDaylight
captDaylight / teku.txt
Created April 6, 2023 21:45
sample teku
Apr 06 21:35:51 teku[59999]: 21:35:51.160 INFO - Slot Event *** Slot: 6166077, Block: dd5f1e93acef7f523648a0ee972a835df7991a851929d36277c906f5be9ef191, Justified: 192688, Finalized: 192687, Peers: 35
Apr 06 21:36:03 teku[59999]: 21:36:03.158 INFO - Slot Event *** Slot: 6166078, Block: ... empty, Justified: 192688, Finalized: 192687, Peers: 33
Apr 06 21:36:03 teku[59999]: 21:36:03.199 WARN - Late Block Import *** Block: 6f8dbbe565a2c23e83b6399dd02dbe8b92d8f0a3a9982e623791ed5fb94ff435 (6166078) proposer 296921 arrival 2859ms, pre-state_retrieved +14ms, processed +297ms, execution_payload_result_received +1009ms, begin_importing +0ms, transaction_prepared +0ms, transaction_committed +0ms, completed +20ms
Apr 06 21:36:15 teku[59999]: 21:36:15.299 INFO - Slot Event *** Slot: 6166079, Block: 8581986ed1c349eba274587d7e0322c13e88fd7e673f20329867a2b8d10fd44b, Justified: 192688, Finalized: 192687, Peers: 31
Apr 06 21:36:23 teku[59999]: 21:36:23.001 INFO
@captDaylight
captDaylight / PhotonDialogApp.jsx
Last active January 31, 2023 21:47
Open and close photon dialog example
import './App.css';
import React, { useEffect, useState, useRef } from "react";
import("@photonhealth/webcomponents").catch(() => {});
function App() {
const [isOpen, setIsOpen] = useState(false);
return (
<>
<button onClick={() => setIsOpen(true)}>Open Modal</button>
const PORT = 25998;
const HOST = '192.168.1.3';
const dgram = require('dgram');
const server = dgram.createSocket('udp4');
server.on('listening', () => {
const address = server.address();
console.log(`UDP Server listening on ${address.address}:${address.port}`);
});
import random
import rhinoscriptsyntax as rs
def draw_box(x, y, z, box_size):
surface_points = [
[x, y, z],
[x + box_size, y, z],
[x + box_size, y + box_size, z],
[x, y + box_size, z]
]
router.put('/user/:refCode', function(req, res, next) {
if (!req.params.refCode) res.json({ result: 'error', msg: 'must send an referral code'});
var newEmail = req.body.email ? req.body.email : '';
mailchimp.get({
path: 'lists/' + listID + '/members?unique_email_id=' + req.params.refCode,
})
.then(function(search) {
const user = search.members[0];
(function() {
var searchQuery = window.location.search;
var ref;
var $form;
var userEmail;
if (searchQuery !== '' && searchQuery.indexOf('ref=') > -1) {
ref = searchQuery.split('=')[1];
console.log('ref',ref);
$form = $('form.newsletter-form');
@captDaylight
captDaylight / markdownHeaderParse.js
Created February 21, 2018 16:54
Get the headers from markdown along with the header type
var re = /(#+)(.*)/;
var str = '## About Bottler\n\nThis is something about the project\n\n# something else\n';
function findAll(regex, sourceString, aggregator = []) {
const arr = re.exec(sourceString);
if (arr === null) return aggregator;
const newString = sourceString.slice(arr.index + arr[0].length);
return findAll(regex, newString, aggregator.concat([arr]));
{
0: {
"Introduction": "# intro/n/n ## hello there...."
},
1: {
"Getting Started":
{
0: {
"Step One": "# stepone/n/n ## hello there..."
},
[
{
"Introduction": "# intro/n/n ## hello there...."
},
{
"Getting Started":
[
{
"Step One": "# stepone/n/n ## hello there..."
},