Skip to content

Instantly share code, notes, and snippets.

View camRight's full-sized avatar

Cameron Wright camRight

View GitHub Profile
@camRight
camRight / printenv.yaml
Created April 29, 2025 21:34
GHA Snippet for Printing all ENV Variables and Contexts
on: push
jobs:
one:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
@camRight
camRight / gist:059d9bb9a2ce0a89f8c76541d2733560
Created July 2, 2023 18:52
Cram python into a Makefile One Liner
import sys,re
def main():
fh = open(sys.argv[1],'r')
lines = fh.readlines()
print '\tpython2.2 -c "`printf \\"if 1:\\n\\'
for line in lines:
line = re.sub('[\\\'\"()]','\\\g<0>',line)
# grab leading white space (should be multiples of 4) and makes them into
# tabs