Skip to content

Instantly share code, notes, and snippets.

View allanjamesvestal's full-sized avatar

Allan James Vestal allanjamesvestal

View GitHub Profile
I’m building a browser-based web tool for internal use by journalists in a newsroom. This tool should have a text box where users can enter the text of an article, and it should then extract all the quotes from that article.
Each quote should be displayed, one after the other, and the tool should let users write in the speaker for each one.
The tool should only use HTML, CSS and basic JavaScript. (Do not use any external JavaScript or CSS dependencies.) It should be able to run without needing to send any data to the Internet.
Ask me any additional questions you need to get started creating this code, then generate a draft HTML/JavaScript/CSS tool.
@allanjamesvestal
allanjamesvestal / interactive-table-demo-prompt.txt
Created March 7, 2026 20:00
Interactive table demo prompt
Build me an interactive database exploration tool using only HTML, CSS and basic JavaScript. (Do not use any external JavaScript or CSS dependencies.)
The tool will load a JSON file containing a list of objects. Each object will have fields called "name", "year", "county", "initialMOD", "auditMOD" and "disagreement". An example of data is here:
[
{name: "John Smith", year: "2023", "county": "Arlington", "initialMOD": "Accident", "auditMOD": "Homicide", disagreement: "All", moreInfo: null},
{name: "Jane Doe", year: "2005", "county": "Fairfax", "initialMOD": "Accident", "auditMOD": "Accident", disagreement: "None", moreInfo: "This is important information."},
{name: "Suzy Cupcakes", year: "2013", "county": "Washtenaw", "initialMOD": "Undetermined", "auditMOD": "Undetermined", disagreement: "Some", moreInfo: "Something else"},
]
@allanjamesvestal
allanjamesvestal / sample-article.txt
Created March 7, 2026 19:46
Sample article for quote extractor
Maryland transportation officials said Friday they will speed up the development of a new bus division in Baltimore as part of a long-term plan to improve Baltimore’s sprawling bus network.
Maryland Transit Administrator Holly Arnold told members of the Baltimore Regional Transit Commission that her agency is moving up nearly $25 million in the multiyear budget to allow her team to acquire the real estate for a new bus depot sooner. That includes $10 million for the facility’s design, neither of which was included in the previous budget.
Creating a new, fifth bus division is the linchpin for the BMORE Bus plan, a long-term vision to expand and improve Baltimore’s bus service that has received a steady drumbeat of support from transit advocates and city politicians since its release last year.
Funding for the plan was not included in Gov. Wes Moore’s proposed state budget for the coming fiscal year, released in January.
Arnold’s announcement comes about a week after state Sen. President Bill Ferguson reque
@allanjamesvestal
allanjamesvestal / print-server-stats.sh
Created May 4, 2021 01:21
A simple util to print an EC2 instance's IP, along with disk and RAM usage stats.
#!/bin/zsh
SELF_IP=$(curl --silent http://checkip.amazonaws.com)
MEMORY_READING=$(free --bytes | grep 'Mem')
MEMORY_AVAILABLE=$(echo $MEMORY_READING | awk '{print $7}')
MEMORY_TOTAL=$(echo $MEMORY_READING | awk '{print $2}')
MEMORY_USED=$(echo "$MEMORY_TOTAL $MEMORY_AVAILABLE" | awk '{print($1 - $2)}')
MEMORY_PCT=$(
echo "$MEMORY_USED $MEMORY_TOTAL" | \
awk '{printf("%.2f\n", ($1 / $2) * 100)}' \
@allanjamesvestal
allanjamesvestal / index.html
Last active April 19, 2018 16:15
All Tests Pass week 14 (source: http://jsbin.com/nigoxufore)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@allanjamesvestal
allanjamesvestal / campaignfinance-denton.csv
Created March 27, 2018 14:26
Campaign finance: political contributions made by Denton residents
We can't make this file beautiful and searchable because it's too large.
recipient_id,recipient,contribution_id,contrib_date,amount,description,contributor_type,contributor,contrib_city,contrib_state,contrib_zip,contrib_employer,contrib_occupation,contrib_job_title,filed_date,is_amended,,,,,,,,,
11906,Texas Democratic Party,100033752,2014-05-30,600,,ENTITY,Lemuel Texas Enterprises Inc,Denton,TX,76209,,,,2014-07-15,f,,,,,,,,,
11906,Texas Democratic Party,100032861,2004-06-04,400,,ENTITY,Denton County Democratic Party Sustaining Members,Denton,TX,76209,,,,2004-07-16,f,,,,,,,,,
11906,Texas Democratic Party,100033795,2014-06-16,500,,ENTITY,Bogle,Denton,TX,76201,,,,2014-07-15,f,,,,,,,,,
13805,"Hinojosa, Juan J",100035846,2012-12-03,500,,ENTITY,Friends of UNT PAC,Denton,TX,76205,,,,2013-01-15,f,,,,,,,,,
13805,"Hinojosa, Juan J",100036031,2014-12-15,500,,ENTITY,Friends of UNT PAC,Denton,TX,76205,,,,2015-01-15,f,,,,,,,,,
13805,"Hinojosa, Juan J",100039719,2010-11-26,500,,ENTITY,Friends of UNT PAC,Denton,TX,76205,,,,2011-01-18,f,,,,,,,,,
establishment_name address city zip_code date inspection_type raw_score normalized_numeric_grade normalized_letter_grade
KIKKA 2118 ABRAMS RD #100 Dallas 75214 10/19/2016 Routine 85 85 B
ASO ROCK RESTAURANT & LOUNGE 9220 SKILLMAN ST #115 Dallas 75243 11/23/2016 Routine 82 82 B
STOP-N-SHOP FOOD MART 3195 GREAT TRINITY FOREST WAY #A-1 Dallas 75216 05/08/2017 Routine 90 90 A
LUNA COCINA 4300 PARRY AVE Dallas 75223 03/22/2017 Routine 83 83 B
JOHN NEELY BRYAN ELEM SCHOOL 2001 DEER PATH DR Dallas 75216 10/25/2016 Routine 100 100 A
SOUTH OAK CLIFF H S 3601 S MARSALIS AVE Dallas 75216 05/23/2017 Routine 100 100 A
MIS CAZUELAS RESTAURANT 4933 COLUMBIA AVE Dallas 75214 01/31/2017 Routine 69 69 D
WAL-MART #3341 GROCERY 2305 N CENTRAL EXPW Dallas 75204 06/12/2017 Routine 94 94 A
LA MICHOACANA MEAT MARKET - TAQUERIA 3380 LOMBARDY LN Dallas 75220 12/07/2016 Routine 88 88 B

Keybase proof

I hereby claim:

  • I am allanjamesvestal on github.
  • I am ajv (https://keybase.io/ajv) on keybase.
  • I have a public key ASBWNXAWU1VliVA0G0xpIQieKQHoOC9LXpeGPPRZxbs_Ngo

To claim this, I am signing this object: