Skip to content

Instantly share code, notes, and snippets.

View dbowling's full-sized avatar
🌱
Always learning.

Dan Bowling dbowling

🌱
Always learning.
View GitHub Profile
@dbowling
dbowling / merge-vars.ansible.yml
Last active June 3, 2024 15:51
How to merge variables in Ansible using the `community.general.merge_variables`.
- name: Example merge playbook
hosts: "localhost"
vars:
zabbix_agent__default__host_groups: # defined as the initial value
# will be included in the merge
- Linux
zabbix_agent__env__host_groups: # merged
- Bar
zabbix_agent__host__host_groups: # merged
curl -X PUT -H "Accept: application/vnd.github.v3+json" -H "Authorization: token $TOKEN" https://api.github.com/notifications -d '{"last_read_at":"2023-05-07T00:00:00Z"}'
@dbowling
dbowling / only-squash-on-merge.css
Last active November 30, 2022 18:06
Refined Github Custom CSS
/*
* Disable Merge button and make Squash button the golden path
* Demo: https://share.cleanshot.com/liBQ8W
*/
.btn-group-merge {
background: #8c0000;
pointer-events: none; // disable the merge button
}
.btn-group-merge::after {
@dbowling
dbowling / Shortcuts.md
Last active July 28, 2022 23:56
Keyboard Shortcuts

VSCode

Vim / VSCodeVim

  • . repeat last command
  • z undo
  • ctrl+r redo
@dbowling
dbowling / sitemap.vm
Created March 4, 2022 17:43
Cascade velocity macro for sitemap.xml
## // TODO:
## <loc>https://www.umt.edu/academics/programs/_archive/questions/communication-studies/images/default.php</loc>
## // if not yet published
## // if last modified is greater than last published
## // create system tag to include in sitemap
## // create sitemap index https://www.sitemaps.org/protocol.html | https://moz.com/sitemaps-1-sitemap.xml
## // sitemap index can auto find all sitemaps in the domain by query tool
## // if not include in navigation, should we exclude from the sitemap?
## // changefreq value from metadata (or content type/direct path match e.g. homepage, news site)
## // priority from metadata (or content type)
@dbowling
dbowling / index.html
Created May 10, 2021 05:31 — forked from sarsamurmu/index.html
Lit CSS Plugin Snippet for Reboost JS
<html>
<head>
<script type="module" src="./build.js"></script>
</head>
<body>
<my-element></my-element>
</body>
</html>
# tmux cheatsheet
start new with session name:
tmux new -s myname
attach:
tmux a
@dbowling
dbowling / restic_backup_with_vss.ps1
Created May 4, 2018 16:31
PowerShell script to wrap Restic backup allowing Volume Shadow Copy.
#
# This script must be run with Administrator privs in order to create VSS snapshot!!!!
#
# Windows PowerShell Script to use restic to backup files using the Volume Shadow Copy Service, allowing
# that are in use to be backed up. The script must be run with elevated privileges.
# The Volume Shadow Copy Service must be enabled for the disk volume that contains the files to be backed up.
#
# Parameters
$resticExe = 'C:\bin\restic.exe'
$resticRepository = 'b2:bucket-name:folder'
[Unit]
Description=k8-etcd
Requires=docker.service
After=docker.service
BindsTo=docker.service
[Service]
User=root
TimeoutStartSec=0
Restart=always
@dbowling
dbowling / launch_sublime_from_terminal.markdown
Created July 6, 2012 03:57 — forked from artero/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation