Skip to content

Instantly share code, notes, and snippets.

View demarchenac's full-sized avatar
🎯
Focusing

Cristhyan D. Marchena demarchenac

🎯
Focusing
  • Barranquilla, Colombia.
View GitHub Profile
Lugar Tipo de Carne Gramaje Quesos Tipo de Pan Tocineta Salsas Otros Ingredientes
Drip Burger Crew Res premium 130g Cheddar Brioche artesanal Salsa de ajo de la casa Panceta de cerdo adobada, panceta confitada
American Burger Company Carne Angus americana 150g Colby Jack, Cheddar Butter bread Smoking sweet Cebolla caramelizada
Raval Rooftop Res 130g Queso feta, queso suizo
@demarchenac
demarchenac / Spinner.jsx
Last active November 12, 2022 07:37
A basic spinner with tailwind css, taken from flowbite: https://flowbite.com/docs/components/spinner/.
export function Spinner() {
return (
<div role="status">
<svg
aria-hidden="true"
className="mr-2 w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600"
viewBox="0 0 100 101"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
@demarchenac
demarchenac / App.css
Last active August 29, 2022 07:05
Vite + React base setup
:root {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 24px;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
@demarchenac
demarchenac / settings.jsonc
Last active July 26, 2023 09:02
Basic Vistual Studio Code Settings
{
// theme
"workbench.colorTheme": "Night Owl",
"workbench.iconTheme": "material-icon-theme",
// font config
"editor.fontFamily": "FiraCode NFM",
"editor.fontLigatures": true,
// Editor settings
@demarchenac
demarchenac / reset_cohorts.sql
Created June 1, 2022 00:13
A simple SQL to reset a cohort table on a given schema
DROP TABLE IF EXISTS @cdm_database_schema.@cohort_table;
CREATE TABLE IF NOT EXISTS @cdm_database_schema.@cohort_table (
"cohort_definition_id" integer NOT NULL,
"subject_id" integer NOT NULL,
"cohort_start_date" date NOT NULL,
"cohort_end_date" date NOT NULL
)
@demarchenac
demarchenac / outcome_cohort.sql
Created May 31, 2022 22:35
An outcome cohort generated using Atlas: https://atlas-demo.ohdsi.org/
CREATE TABLE #Codesets (
codeset_id int NOT NULL,
concept_id bigint NOT NULL
);
with primary_events (
event_id,
person_id,
start_date,
end_date,
op_start_date,
@demarchenac
demarchenac / target_cohort.sql
Created May 31, 2022 22:34
A target cohort generated using Atlas: https://atlas-demo.ohdsi.org/
CREATE TABLE #Codesets (
codeset_id int NOT NULL,
concept_id bigint NOT NULL
);
INSERT INTO #Codesets (codeset_id, concept_id)
SELECT 5 as codeset_id,
c.concept_id
FROM (
select distinct I.concept_id
FROM (
@demarchenac
demarchenac / messages.json
Last active April 21, 2022 00:26
A list of messages in JSON format.
[
{ "delta": 1000, "payload": { "type": "message", "user": { "id": 1, "user_name": "taco", "display_name": "Taco Spolsky" }, "message": { "id": 1, "text": "Hello!" } }},
{ "delta": 2000, "payload": { "type": "message", "user": { "id": 2, "user_name": "chorizo", "display_name": "Chorizo" }, "message": { "id": 2, "text": "Hi Taco!" } }},
{ "delta": 2100, "payload": { "type": "connect", "user": { "id": 3, "user_name": "pete", "display_name": "Pete the Computer" } }},
{ "delta": 3000, "payload": { "type": "message", "user": { "id": 3, "user_name": "pete", "display_name": "Pete the Computer" }, "message": { "id": 3, "text": "Hi Taco!" } }},
{ "delta": 4000, "payload": { "type": "message", "user": { "id": 1, "user_name": "pete", "display_name": "Pete the Computer" }, "message": { "id": 4, "text": "What's going on in here?" } }},
{ "delta": 5000, "payload": { "type": "message", "user": { "id": 2, "user_name": "chorizo", "display_name": "Chorizo" }, "message": { "id": 5, "text": "We're testing this chat r
const highestPalindrome = (S) => {
const digits = S.length -1;
const ocurrences = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
for(let index = 0; index < S.length; index++){
const number = S.charAt(index);
ocurrences[+number] += 1;
}
let rootNumber = '';
for(let index = 0; index < ocurrences.length; index++)
@demarchenac
demarchenac / demo.hl7
Last active February 23, 2022 21:40
An HL7 v2 message example
MSH|^~\&|ADT1|MCM|LABADT|MCM|202109210825|SEGURIDAD|ADT^A01|MSG00001|P|2.6
EVN|A01|202109210820
PID|||DEMAR1022||DE MARCHENA^RUEDA^CRISTHYAN^DAVID||19991022|M||2106-3|CRA 66 58 69^BAQ^ATL||(304)413-8167|||B|||1234097133
NK1|1|RUEDA^ROSSO^DENYS|MTH
NK1|2|DE MARCHENA^BARRIOS^RAFAEL^DAVID|FTH
PV1|1|CONTRIB|||||856321^EPS^SURA|||||-||1|A0
DG1|001|I9|1490|MALESTAR ESTOMACAL|202109210845|F