Skip to content

Instantly share code, notes, and snippets.

@larryebaum
larryebaum / basic.html
Created August 16, 2024 18:28
basic html page
<!doctype html>
<html>
<head>
<title>This is the title of the webpage!</title>
</head>
<body>
<p>This is an example paragraph. Anything in the <strong>body</strong> tag will appear on the page, just like this <strong>p</strong> tag and its contents.</p>
</body>
</html>
@larryebaum
larryebaum / browser
Created August 16, 2024 18:13 — forked from defunkt/browser
pipe html to a browser
#!/bin/sh -e
#
# Usage: browser
# pipe html to a browser
# e.g.
# $ echo '<h1>hi mom!</h1>' | browser
# $ ron -5 man/rip.5.ron | browser
if [ -t 0 ]; then
if [ -n "$1" ]; then
@larryebaum
larryebaum / extractMP4audio.sh
Last active March 28, 2022 16:14
Extract Audio from MP4 on MacOS
#locate instance of ffmpeg on workstation and set as variable if not in path
ffmpegPATH="/Applications/Descript.app/Contents/Resources/app.asar.unpacked/node_modules/beamcoder/build/Release/ffmpeg"
for i in *.MP4
do
if test -f "$i"
then
name=$(echo $i | cut -f 1 -d '.')
$ffmpegPATH -i "$i" -vn "$name.wav"
fi
## MacOS Stuff
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

Jupyter Lab Notebooks

Setups

Install Jupyter Lab to your laptop/workstation. Brew is a OSX package manager and makes it super easy if you follow these steps. Jupyter Lab documentation describes the installation steps for non-Brew users.

Many of the Jupyter Lab notebooks contain graphic images as headers. You can easily add/change these graphics to suit your needs using the base Google document Demo Headers. To change a header, create a new slide in the deck, arrange the image as you'd like, and use a screen grab tool (or on OSX, press CMD-CTRL-OPT-4) to select the image boundaries and 'copy'. Then highlight the intended cell in your Jupyter notebook and 'paste'.

Library of Vault Demo Use Cases

| Use Case | Description / Repo Link | Author |

@larryebaum
larryebaum / upload-key-aws-regions
Created July 20, 2020 19:12
Upload SSH Key to AWS Regions
#!/bin/bash
## Specify as the 1st parameter the keyname to display in AWS;
## use 1st param or current user
aws_keypair_name="${1:-$USER}"
## Specify as the 2nd parameter the full path to ssh public key file name to upload to AWS;
## use 2nd param or default id_rsa.pub will be used.
publickeyfile="${2:-$HOME/.ssh/id_rsa.pub}"
keydata=$(cat $publickeyfile | base64)
regions=$(aws ec2 describe-regions \

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

chef-run chef@node1 file '/etc/motd'
content='Welcome to Chef’ --password Cod3Can!
chef-run chef@node1 motd.rb --password Cod3Can!
chef-run winrm://Administrator@winnode1
file_experiment.rb --password Cod3Can!
chef generate cookbook -P setup
chef generate template motd
kitchen converge
kitchen verify
kitchen destroy
@larryebaum
larryebaum / gist:e02262ba850a724bd612f3406d94e88a
Created October 3, 2017 14:44
Chef Automate Supermarket Cert Append for SSL Issue with Self Signed Cert
# on Supermarket server
sudo su -
echo "\nSelf-Signed Chef Server Cert (you should feel bad about this)\n=====================" >> /opt/supermarket/embedded/ssl/certs/cacert.pem
openssl s_client -showcerts -connect phl-du-cfbc1.devfwh.lan:443 </dev/null 2>/dev/null|openssl x509 -outform PEM >> /opt/supermarket/embedded/ssl/certs/cacert.pem
# on Chef Server
sudo su -
echo "\nSelf-Signed Supermarket Cert (you should feel bad about this)\n=====================" >> /opt/opscode/embedded/ssl/certs/cacert.pem
openssl s_client -showcerts -connect phl-du-cfsm1.devfwh.lan:443 </dev/null 2>/dev/null|openssl x509 -outform PEM >> /opt/opscode/embedded/ssl/certs/cacert.pem
@larryebaum
larryebaum / README.md
Last active September 26, 2017 20:55 — forked from afiune/README.md
Automate LDAP Bulking User Creation

LDAP Bulking User Creation Process

This is temporal automation to create/update multiple LDAP users in Chef Automate. If a user appears in the input file and already exists as a user, the user roles will be updated as specified within the input file. If the user does not exist, it will be created with the specified roles.

Prerequisites

The minimum prerequisites to be able to use this automation are: