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 / 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);'
// make change to .gitignore
git rm --cached <filename>
// or, for all files
git rm -r --cached .
git add .
// then
'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.
@rjpcasalino
rjpcasalino / hidpi.md
Last active September 23, 2017 20:49
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: {
#!/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
George Washington
John Adams
Thomas Jefferson
James Madison
James Monroe
John Quincy Adams
Andrew Jackson
Martin Van Buren
William Henry Harrison
John Tyler

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