Skip to content

Instantly share code, notes, and snippets.

View stephen-w-pracy's full-sized avatar

Stephen Calnan stephen-w-pracy

View GitHub Profile
@stephen-w-pracy
stephen-w-pracy / README.md
Last active April 16, 2025 23:17
A single python script for fast and dirty file transfer.

Fast and Dirty File Transfer

This is a simple app for low-hassle file transfer over HTTP. It serves a webpage to upload and download files. It has rudimentary security in the form of a runtime secret code.

Screenshot of app experience

Requirements

Python 3

@stephen-w-pracy
stephen-w-pracy / version_constraints_cheatsheet.md
Created April 15, 2025 22:48
Version constraint operator cheatsheet.

Summary of version constraint operators used in major package managers and configuration tools across languages. It includes their syntax, common meaning, and examples.

Operator Meaning Used In Example Resolves To
= Exact version RubyGems, npm, Cargo, Composer = 1.2.3 Only 1.2.3
== Exact version (Python-style) pip/requirements.txt ==1.2.3 Only 1.2.3
!= Not equal to version
@stephen-w-pracy
stephen-w-pracy / boma.sh
Created January 17, 2025 17:31
boma, the shell book mark function
# I added this to my .zshrc
boma() {
case "$1" in
set)
if [ -n "$2" ]; then
export "BOMA_$2=$PWD"
echo "Bookmark '$2' set to $PWD"
else
echo "Please provide a name for the bookmark."
fi
@stephen-w-pracy
stephen-w-pracy / mpi.sh
Created September 17, 2024 01:46
A shell script to make placeholder images for those linked in Instruqt assignment.md files
#!/bin/bash
# Requires imagemagick. `brew install imagemagick`
# Make Placeholder Images (MPI)
find . -type f -name "assignment.md" | while read md_file; do
# Extract the directory where the current markdown file is located
dir=$(dirname "$md_file")
@stephen-w-pracy
stephen-w-pracy / assignment.md
Created November 29, 2022 18:11
"light box" style pop-out images in Instruqt
slug id title etc
foo
bar
baz
etc

Here's an example of HTML you can put in your assignments file. The downside is that when you view the rendered markdown outside of Instruqt (for example, here in Github) images will be doubled, and the CSS code will display.

redisdb (4.3.2)
---------------
Instance ID: redisdb:244ce781d445ea0d [ERROR]
Configuration Source: file:/etc/datadog-agent/conf.d/redisdb.d/conf.yaml
Total Runs: 1
Metric Samples: Last Run: 0, Total: 0
Events: Last Run: 0, Total: 0
Service Checks: Last Run: 1, Total: 1
Average Execution Time : 23ms
Last Execution Date : 2022-03-22 17:55:00 UTC (1647971700000)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y vim
sudo apt-get install -y curl wait-for-it sqlite unzip
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt install -y software-properties-common
sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt install -y terraform
sudo apt-get install -y git
sudo git clone https://github.com/DataDog/ecommerce-workshop.git /ecommworkshop