Skip to content

Instantly share code, notes, and snippets.

View rjpcasalino's full-sized avatar
🌴
on a wire trip

Ryan J.P. Casalino rjpcasalino

🌴
on a wire trip
View GitHub Profile
@rjpcasalino
rjpcasalino / setup-docker-al2023.md
Created November 1, 2024 02:04 — forked from thimslugga/setup-docker-al2023.md
Setup Docker on Amazon Linux 2023

Setup Docker on Amazon Linux 2023

The following guide is for setting up Docker with docker-compose v2 on Amazon Linux 2023. The steps are intendend for AL2023 on EC2 but should mostly work for the AL2023 VMs running on other hypervisors.

Install and configure Docker on Amazon Linux 2023

Check for new updates

Get the hosts current Amazon Linux 2023 release:

Adding PIXEL/GUI to Raspbian Lite

These 'notes' were primarily intended for my own consumption but since there have been surprisingly many comments to it over the years I wanted to do some updates and clarifications. Thanks for all comments.

These instructions will require you to have connection to internet from your pi, WiFi, Ethernet or by some other means like a 3G USB dongle or something.

Preparations

George Washington
John Adams
Thomas Jefferson
James Madison
James Monroe
John Quincy Adams
Andrew Jackson
Martin Van Buren
William Henry Harrison
John Tyler
#!/usr/bin/env bash
wget -q -O data.csv "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/$(date --date="yesterday" +%m-%d-%Y).csv"
LC_ALL=en_US.UTF-8 awk -v updated="$(date --date="yesterday" +%y-%m-%d) 23:00:00" -F, 'FNR==NR && $5 > updated { deaths[$3] += $9; confirmed[$3] += $8; next }
{ for (state in deaths)
if (state == $5 && deaths[state] > 0)
printf("%s\n Population: %'"'"'d\n Deaths: %'"'"'d\n Confirmed: %'"'"'d\n '%' Dead: %'"'"'f\n '%' Confirmed: %f\n", state, $16, deaths[state], confirmed[state], deaths[state] / $16 * 100, confirmed[state] / $16 * 100)
}' $1 $2 > output
render() {
if (this.state.forecast.name != undefined) {
return e('div', null, null,
e('br'),
e('small', null, `${this.state.forecast.name}`),
e('br'),
e('small', null, `${this.state.forecast.shortForecast}`),
e('br'),
e('small', null, `${this.state.forecast.temperature}`),
e('small', {dangerouslySetInnerHTML: {
@rjpcasalino
rjpcasalino / hidpi.md
Last active September 23, 2017 20:49
'use strict';
let getUrl= (url) => {
// return a new Promise.
return new Promise((resolve, reject) => {
let req = new XMLHttpRequest();
req.open('GET', url);
// this is where the magic happens.
// make change to .gitignore
git rm --cached <filename>
// or, for all files
git rm -r --cached .
git add .
// then
@rjpcasalino
rjpcasalino / snippets.cson
Created October 26, 2015 16:38
Stolen from my boi Tony (i.e., I don't use many of these)
'.source.js':
'Beginning fancy comment':
'prefix': 'bcom'
'body': '/********************************************************'
'Ending fancy comment':
'prefix': 'ecom'
'body': ' ********************************************************/'
'Fancy console.log':
'prefix': 'flog'
'body': 'console.log("$1: ", $1);'