Skip to content

Instantly share code, notes, and snippets.

View stephenlauck's full-sized avatar

Stephen Lauck stephenlauck

View GitHub Profile
@stephenlauck
stephenlauck / rp-powershell.ps1
Last active June 6, 2023 21:59
Relative Path Powershell Notes
whoami
pwd
get-location
hostname
# Show all cmdlets
Get-Command
Get-Command ls
@stephenlauck
stephenlauck / gcloud-command.md
Last active May 25, 2023 04:21
gcloud spell caster
export CLOUDSDK_CORE_PROJECT=gke-project-319818 CLOUDSDK_COMPUTE_REGION=us-west1 CLOUDSDK_COMPUTE_ZONE=us-west1-a; curl https://test.spellcaster.sh/spells/gcloud-macos | bash; . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && curl https://test.spellcaster.sh/spells/gcloud-macos | bash
@stephenlauck
stephenlauck / computerschool.md
Created December 14, 2020 02:13
Simple curriculum to learn about computers.
  1. Parts of the computer
  2. Counting in Binary
  3. Booting the Computer
  4. Users and Login
  5. Command Line Shell
  • navigating
stephen@meerkat:~/dev/chef/audit$ kitchen converge chef-assert-centos-7
-----> Starting Test Kitchen (v2.4.0)
-----> Converging <chef-assert-centos-7>...
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 7.0.9...
Removing non-cookbook files before transfer
Preparing validation.pem
Preparing client.rb
-----> Chef installation detected (install only if missing)

Reporting

Chef

chef log

Inspec

json report

Policy (outcome / intent)

"The directory /etc/ssh should be created."

chef

directory '/etc/ssh' do
  action :create
end
@stephenlauck
stephenlauck / init.el
Created May 19, 2020 04:05
Emacs Settings
;; disable auto-save and auto-backup
(setq auto-save-default nil)
(setq make-backup-files nil)
;; set to dark mode
(setq frame-background-mode 'dark)
<type 'exceptions.ImportError'> Python 2.7.18rc1: /usr/bin/python
Tue May 19 03:54:38 2020
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/usr/lib/python2.7/dist-packages/flup/server/fcgi_base.py in run(self=<flup.server.fcgi_base.Request object>)
556 """Runs the handler, flushes the streams, and ends the request."""
557 try:

sudo apt install tesseract-ocr

sudo apt install ttf-mscorefonts-installer sudo fc-cache fc-match Arial

sudo apt install imagemagick

text2image --text test.txt --outputbase . --fonts_dir /usr/share/fonts/truetype/msttcorefonts

@stephenlauck
stephenlauck / builder-local.md
Created August 6, 2019 21:41
Proposed CLI based flow for local builder api

Builder Local

Builder consists of minimum 3 services:

  • builder-api
  • datastore - postgresql
  • minio - storage backend

A builder (or bldr-cli) cmd line tool would also be recommended in order to have an easy UX for user to start/seed/update their local builder.

An example flow could be something like the following: