Skip to content

Instantly share code, notes, and snippets.

View ScottDillman's full-sized avatar
🏠
Working in ways that dramatically strain or break gestalt and abstraction.

Scott Dillman ScottDillman

🏠
Working in ways that dramatically strain or break gestalt and abstraction.
View GitHub Profile
# Source: https://gist.github.com/6fb3e7da327df9203d9d4c184fcb5831
##############################################################################
# Combining Argo CD (GitOps), Crossplane (Control Plane), And Kubevela (OAM) #
# https://youtu.be/eEcgn_gU3SM #
##############################################################################
# Referenced videos:
# - Argo CD - Applying GitOps Principles To Manage Production Environment In Kubernetes: https://youtu.be/vpWQeoaiRM4
# - Cloud-Native Apps With Open Application Model (OAM) And KubeVela: https://youtu.be/2CBu6sOTtwk
@mklepaczewski
mklepaczewski / obsidian.css
Created August 10, 2020 09:54
Note blocks for Obsidian
/**
* I use .app-container to get around CSS selector specificity
*/
.app-container pre[class*="language-note-"] {
border: 1px solid;
}
/* Make the first line of note bold */
*[class*="language-note"]::first-line {
@deathau
deathau / Readme.md
Last active August 24, 2023 05:38
Obsidian scss

Obsidian SASS theme switching tools

I was building up a small library of css snippets, and mixing and matching via copy-paste was getting tiresome.
So, I knocked myself up a little solution using https://sass-lang.com/
To use this solution, you need to follow the instructions on the website to install the SASS command line utility.

Instructions

For my purposes, I created a subfolder in my Obsidian vault called ./.themes where my obsidian.scss file lives. I also created a subfolder for mixins (./.themes/mixins) containing small snippets like "Andy Matuschak" mode and collapsing sidebars (and my preferred custom colours for my Base2Tone theme)

@calexandre
calexandre / merge-zsh-history.sh
Last active April 3, 2024 14:11
Merge two zsh history files
#!/bin/bash
# Inspired on https://david-kerwick.github.io/2017-01-04-combining-zsh-history-files/
set -e
history1=$1
history2=$2
merged=$3
echo "Merging history files: $history1 + $history2"
test ! -f $history1 && echo "File $history1 not found" && exit 1
@ajorg
ajorg / ad-nsupdate.sh
Last active February 20, 2024 18:24
Update Active Directory DNS host records using machine / host / computer credentials and nsupdate
#!/bin/bash -e
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
fqdn="$(hostname -f)"
address="$(/sbin/ip addr show dev eth1 | awk -F'( +|/)' '/inet / {print $3}')"
if [[ "${address}" == "$(dig +short "${fqdn}")" && "${fqdn}." == "$(dig +short -x "${address}")" ]]
then
exit 0
fi
TTL=21600 # 6 hours
@tin2tin
tin2tin / basic_ui_documented.py
Last active April 10, 2024 03:38 — forked from AzureDVBB/basic_ui_documented.py
A commented template for making simple UI in blender using the bpy python API
#import the bpy module to access blender API
import bpy
#WARNING: this is written and tested for blender 2.79
#blender 2.8 and newer will likely have a different python API
#create a property group, this is REALLY needed so that operators
#AND the UI can access, display and expose it to the user to change
#in here we will have all properties(variables) that is neccessary
class CustomPropertyGroup(bpy.types.PropertyGroup):
@noahcoad
noahcoad / easily-switch-accounts-in-aws.md
Last active December 13, 2023 06:40
Easily Switch Accounts in AWS with Role Switcher

Easily Switch Accounts in AWS

When working with multiple AWS accounts, it can be a pain to keep signing out and signing back in. I work with a number of accounts, my own, customer accts, burner accts, etc. It was a pain to keep logging in and out of the AWS Console. Thankfully the AWS Console has a "Role Switcher" that lets you quickly switch between accounts built-in. It does this by assuming a role from another account. Here's how to set that up...

# ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@Skarlso
Skarlso / main.go
Created February 16, 2019 21:31
Golang SSH connection with hostkey verification
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"golang.org/x/crypto/ssh"
kh "golang.org/x/crypto/ssh/knownhosts"
@gfodor
gfodor / ffmpeg-minimalist-build-nvenc-static.md
Last active June 19, 2021 11:17
This gist will show you how to build a minimalist, statically-linked ffmpeg binary under the ~/bin subdirectory on your home on Ubuntu 16.04LTS. Comes with (optiona) NPP, CUDA and NVENC capabilities. See notes in the warning section.

Minimalist static FFmpeg build on Ubuntu 18.04 with Nvidia NVENC enabled.

Original guide with a standard build is here.

With this guide, I'm adding more instructions to enable support for NVIDIA CUVID and NVIDIA NPP for enhanced encode and decode performance.

Warning:

If all you require is NVENC's enablement, you do NOT need the CUDA SDK. The nv-codec-headers (below) is ALL you require.