Skip to content

Instantly share code, notes, and snippets.

View adam704a's full-sized avatar

Adam Preston adam704a

View GitHub Profile
@adam704a
adam704a / index.html
Created January 26, 2024 18:17
Tournament Bracket with Flexbox
<h1>Athletic Club of Columbus - Open Tournament</h1>
<main id="tournament">
<ul class="round round-1">
<li class="spacer">&nbsp;</li>
<li class="game game-top winner">Jim S <span>2</span></li>
<li class="game game-spacer">&nbsp;</li>
<li class="game game-bottom ">Tom Smith<span>1</span></li>
<li class="spacer">&nbsp;</li>
@adam704a
adam704a / db_backup.sh
Last active May 22, 2023 18:50
dhis on docker postgres back up
#!/bin/bash
# run sudo aws configure first!
# then schedule like this: sudo crontab -e
# 0 0 * * * /opt/scripts/db_backup.sh # take a backup every midnight
RETENTION_DAYS=14
BUCKET=org.rti-ghd.notresante
DIR=`date +%d-%m-%y`
DEST=./db_backups/$DIR
mkdir $DEST
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script
src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"></script>
<title>Title</title>
</head>
@adam704a
adam704a / Forecast API.ipynb
Last active May 19, 2020 13:33
Import ESPEN Forecast API Data
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@adam704a
adam704a / gist:3ab03c156840999e29c1154072aa45a4
Created March 11, 2020 17:42
broke-debut-add-to-cart.html
<div class="product-template__container page-width" id="ProductSection-{{ section.id }}" data-section-id="{{ section.id }}" data-section-type="product" data-enable-history-state="true">
{% comment %}
Get first variant, or deep linked one
{% endcomment %}
{%- assign current_variant = product.selected_or_first_available_variant -%}
{%- assign product_image_zoom_size = '1024x1024' -%}
{%- assign product_image_scale = '2' -%}
{%- assign enable_zoom = section.settings.enable_zoom -%}
{% case section.settings.image_size %}
@adam704a
adam704a / clean_data_elements.sql
Created January 8, 2020 23:38
Clean up programstagesection_dataelements and data elements for ReachHealth
-- SP: Post Partum Clients Served Oct
DELETE FROM "public"."programstagesection_dataelements" WHERE "dataelementid" in
('54251',
'54252',
'54253',
'54254',
'54255',
'54256',
'54257');
@adam704a
adam704a / GML.ipynb
Created February 11, 2019 15:53
Generate a GML file to import to DHIS2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sub MDA3()
Dim counter As Integer
Dim response As Integer
response = MsgBox("Running macro will reset data entered manually on target population. Do you wish to continue?", vbYesNo)
Select Case response
Case vbYes
@adam704a
adam704a / get_mda1.vb
Created November 9, 2018 23:53
Get MDA 1 Treatment
Sub MDA1()
Dim counter As Integer
Dim response As Integer
response = MsgBox("Running macro will reset data entered manually on target population. Do you wish to continue?", vbYesNo)
Select Case response
Case vbYes