Skip to content

Instantly share code, notes, and snippets.

View cmcconomy's full-sized avatar

Craig McConomy cmcconomy

  • Toronto, ON, Canada
View GitHub Profile
@cmcconomy
cmcconomy / Makefile
Created March 14, 2023 03:04
Makefile for pinning python requirements
# DOCUMENTATION NOTE: Regular comments don't print in 'help'; two #'s do.
## +------------------------------------------------------------------------------
## | This Makefile contains targets for various python build / deploy steps.
## |
## | Key Targets to know:
## | make / make help: Display Help
help:
@sed -ne '/@sed/!s/## //p' $(MAKEFILE_LIST)
@cmcconomy
cmcconomy / enhance_zshrc.sh
Created March 14, 2023 02:55
zsh shortcuts for miniconda
#!/bin/bash
cat <<EOT >> ~/.zshrc
alias ca="conda_activate"
alias cc="conda_create"
CC_PYTHON_VERSION=3.10
conda_activate() { conda activate $(basename $(pwd)) }
conda_create() { CONDA_SUBDIR=osx-64 conda create -y --name $(basename $(pwd)) python=$CC_PYTHON_VERSION && conda_activate }
EOT
@cmcconomy
cmcconomy / parksOntario.js
Created September 13, 2021 03:57
Parks Ontario visual quality feedback script
// Go to a site in Ontario Parks reservation for a particular date range, where individual campsites are visible, and paste this script into the Developer Console.
// Matching sites will highlight in white.
// You can add new lines to matchesCriteria below.
// Rebuilt from scratch since the last one, now works for 2021 site.
// Use as you see fit! Please credit me if you do.
function matchesCriteria(site){
matches = true
matches = matches && matchesSingleCriteria(site,'Quality','Good')
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
@cmcconomy
cmcconomy / ontario-park-reservation-highlight.js
Created February 28, 2020 04:47
Ontario Park Reservation highlight script
// Open chrome, search for a campground site listing, and enter the Chrome JS Console
// paste in this script and hit enter.
// running this will highlight the available sites. output (to console) all properties and their potential values.
// You may want to adjust the siteIsGood method below to take into account other site properties.
function siteIsGood(attribs) {
return (attribs['Quality'] == "Good")
}
@cmcconomy
cmcconomy / hasschip.md
Last active November 10, 2018 15:59
Installing HomeAssistant (hass.io) on NextThing CHIP

Keybase proof

I hereby claim:

  • I am cmcconomy on github.
  • I am cmcconomy (https://keybase.io/cmcconomy) on keybase.
  • I have a public key ASCa45HTVssM9qRL5nDyEjI95xfcrYUOia1g85Hxd5gLjwo

To claim this, I am signing this object: