Skip to content

Instantly share code, notes, and snippets.

View gwythaint's full-sized avatar

David Holloway gwythaint

View GitHub Profile
@gwythaint
gwythaint / gist:0a386a8144048488a2425595411c122e
Created August 27, 2023 00:23
convert list of files into a json
find * -type f -name "*.c" | jq -R -s 'split("\n") | map({"File": .})'
Style choice
vxprj vsb config -w -add _WRS_CONFIG_VXTEST_BUILD=y
or
wrtool prj vsb config -w -add _WRS_CONFIG_VXTEST_BUILD=y
wrtool prj vsb config -w -add _WRS_CONFIG_DEBUG_FLAG=y
wrtool prj vsb config -w -add _WRS_CONFIG_VXTEST_BUILD=y
@gwythaint
gwythaint / gist:328f1518a0d18d6679f0d1b636a07ed6
Created July 5, 2022 07:01
sed script match colon separated fields
sed 's/^\([^:]*\):\([^:]*\):\([^:]*\):\([^:]*\):..*/\1 \2/' filename.txt
#!/bin/sh
# kubedeployshell.sh
# run a shell on a kubernetes container based on deployment name
cmd=/bin/bash
function help() {
echo "usage: $0 [options] deployment [container]"
echo " [-h] display this help command"
echo " [-c command] command to execute on container"
@gwythaint
gwythaint / untabify.sh
Created September 26, 2017 04:50
elisp script for replacing tabs with spaces on entire file
#!/usr/bin/emacs --script
;(print command-line-args-left)
(defun untabify-buffer ()
"Untabify the whole buffer."
(untabify (point-min) (point-max))
)
(while command-line-args-left
(setq target (pop command-line-args-left))