Skip to content

Instantly share code, notes, and snippets.

@lmatter
lmatter / vclogin
Created July 12, 2023 21:48
Use govc without having your password in clear text or command history
#!/bin/bash
# You must set GOVC_USERNAME and GOVC_URL first
echo -n Password:
read -s pw
echo
GOVC_PASSWORD=$pw govc session.login
@lmatter
lmatter / .bashrc
Created January 15, 2022 01:13
add PROD to bash prompt.
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h \[\033[01;31;7m\]PROD\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
@lmatter
lmatter / Configuration.h
Created May 19, 2021 21:32
CR10s with SKR v1.4 Turbo.
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@lmatter
lmatter / goget
Last active December 2, 2019 21:08
Bash script to translate github repo url (e.g., from clone button) into "go get" syntax.
#!/bin/bash
import=$(echo $1 |cut -f2 -d@ | tr ':' /)
go get ${import%.*}