Skip to content

Instantly share code, notes, and snippets.

View hugmatj's full-sized avatar

J Hughes hugmatj

  • Beard Brother Services
  • Bradenton Florida
View GitHub Profile
@hugmatj
hugmatj / 01-generate-ed25519-ssh-key.sh
Created October 17, 2024 05:23 — forked from grenade/01-generate-ed25519-ssh-key.sh
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
@hugmatj
hugmatj / Shield_Intents.MD
Created October 9, 2023 07:31 — forked from mcfrojd/Shield_Intents.MD
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown


Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: >-
@hugmatj
hugmatj / encoding-video.md
Created August 14, 2023 16:47 — forked from glen-cheney/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@hugmatj
hugmatj / github-actions-notes.md
Created July 2, 2023 05:40 — forked from br3ndonland/github-actions-notes.md
Getting the Gist of GitHub Actions
9955 testRunner.dumpAsText(
4985 testRunner.notifyDone(
4982 testRunner.waitUntilDone(
1980 eventSender.mouseMoveTo(
1207 eventSender.mouseUp(
1170 eventSender.mouseDown(
844 eventSender.keyDown(
600 eventSender.mouseScrollByWithWheelAndMomentumPhases(
534 internals.layerTreeAsText(
472 testRunner.dumpChildFramesAsText(
@hugmatj
hugmatj / make_crt_test.sh
Created April 1, 2023 06:03 — forked from schnell18/make_crt_test.sh
Generate a 2048-bit RSA key, create certificate sign request and self-sign the certificate for testing purpose
openssl genrsa -out server.key 2048
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
SCRIPTPATH=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
@hugmatj
hugmatj / ssh_config_annotated
Created April 1, 2023 05:59 — forked from schnell18/ssh_config_annotated
Well commented ssh_config file for SSH client side configuration.
# ssh_config system-wide configuration for OpenSSH clients
# This is the ssh client system-wide configuration file. This
# file provides defaults for users that are compliant with SSH
# policy and ensure best practices are followed. While this file
# is compliant, please keep in mind that users can change settings
# with user-specific overrides from the command line or their own
# config file in some cases.
# Configuration data is parsed as follows:
# 1. command-line options
# 2. user-specific file
@hugmatj
hugmatj / refactor.sh
Created April 1, 2023 05:39 — forked from schnell18/refactor.sh
script to convert long command line to parameter file
for f in *.bat
do
# come up parser parameter file
conf=${f/.bat/.conf}
cat $f \
| perl -lne \
'printf "%s\n", $1 while /(--[\w|-]+\s+.*?)\s*(?=--|$)/g' \
| grep -v 'data-dir' \
> $conf
@hugmatj
hugmatj / script_visudo.sh
Created April 1, 2023 05:34 — forked from schnell18/script_visudo.sh
Sample for run visudo from script. It grants user "xxx" and "yyy" full sudo privilege by append two lines to end of /etc/sudoers
cat <<EOF | (EDITOR="tee -a" visudo)
xxx ALL=(ALL) NOPASSWD: ALL
yyy ALL=(ALL) NOPASSWD: ALL
EOF