Skip to content

Instantly share code, notes, and snippets.

View jurno's full-sized avatar

Juraj Novotny jurno

View GitHub Profile
@jurno
jurno / trivy-html-template.tpl
Created November 24, 2024 19:32
Trivy HTML template
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
{{- if . }}
<style>
* {
font-family: Arial, Helvetica, sans-serif;
}
h1 {
@jurno
jurno / backup-terraform-cloud.sh
Last active November 17, 2023 16:58
Terraform Cloud statefile backup
#!/bin/bash
# Odzalohuje vsetky statefiles z organization v Terraform Cloud. Skript predpoklada,
# ze pouzivatel je prihlaseny do Terraform Cloud cez `terraform login` a takto ziskany
# token ma ulozeny defaultnym sposobom.
# https://www.terraform.io/cli/commands/login#credentials-storage
# Pouzitie:
# chmod +x ./backup-terraform-cloud.sh
# ./backup-terraform-cloud.sh <ORGANIZATION>
@jurno
jurno / git-commit-template.md
Created November 24, 2021 16:22 — forked from lisawolderiksen/git-commit-template.md
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

One of my colleagues shared an article on writing (good) Git commit messages today: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@jurno
jurno / make-keys.bat
Created April 30, 2021 14:51 — forked from codingoutloud/make-keys.bat
Handy OpenSSL command-line combinations I've used - they might've been hard to find or come up with, so capturing them here.
@echo off
if _%1_==__ goto USAGE
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem -subj "/CN=My Cert Name"
openssl pkcs12 -export -out mycert.pfx -inkey mycert.pem -in mycert.pem -passout pass:%1
openssl x509 -inform pem -in mycert.pem -outform der -out mycert.cer
openssl pkcs12 -in mycert.pfx -nodes -passin pass:%1 | openssl x509 -noout -fingerprint
openssl x509 -in mycert.pem -noout -fingerprint
@jurno
jurno / cloudstack.sh
Created September 21, 2018 21:46 — forked from k14i/cloudstack.sh
CloudStack API client shell script.
#!/usr/bin/env bash
ADDRESS="https://"
API_KEY=""
SECRET_KEY=""
USE_XMLLINT=0 # true => 1, false => 0
if [ x$ADDRESS == x ] || [ x$API_KEY == x ] || [ x$SECRET_KEY == x ] || [ x$USE_XMLLINT == x ]; then
echo 'ERROR: Set all required valiables.'
exit 1
azure
account
list [options] #List the imported subscriptions
show [options] [subscriptionNameOrId] #Show details about a subscription
set [options] <subscriptionNameOrId> #Set the current subscription
clear [options] #Remove a subscription or environment, or clear all of the stored account and environment info
import [options] <file> #Import a publishsettings file or certificate for your account
download [options] #Launch a browser to download your publishsettings file
env... #Commands to manage your account environment