# Remove the file, but also ensure it is wiped out
# entirely from the repo
git rm --cached --ignore-unmatch <file-in-repo>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Prerequisites: PowerShell version 3 or above. | |
License: MIT | |
Author: Michael Klement <[email protected]> | |
#> | |
function Out-FileUtf8NoBom { | |
<# | |
.SYNOPSIS | |
Outputs to a UTF-8-encoded file *without a BOM* (byte-order mark). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 1 | |
schemas: | |
# Daily is the top most schema since its parent is 'root' it must have an identifier | |
# this identifier 'daily' will be used when using 'Lookup (schema)' command. | |
- id: scratch | |
parent: root | |
title: scratch | |
desc: "" | |
# Children of the top most schema do not need to contain identifier and just | |
# require a 'pattern' to be set to match the hierarchy of notes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"workbench.colorCustomizations": { | |
"editor.foldBackground": "#f6f7d6" | |
}, | |
"editor.tokenColorCustomizations": { | |
"textMateRules": [ | |
{ | |
"scope": "heading.1.markdown entity.name.section.markdown, heading.1.markdown punctuation.definition.heading.markdown", | |
"settings": { | |
"foreground": "#0111a1", | |
"fontStyle": "bold", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# CONFIRMED WITH | |
# - Host OS: Pop!_OS 20.04 LTS | |
# - Vagrant v2.2.18 | |
# - Box: generic/rhel7 v3.4.0 | |
# - RHEL 7.9 | |
# - Salt v3003.2 | |
# - Virtualbox v6.1.18 | |
# | |
# Last tested: 08/27/2021 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ==Prereq== | |
# Download from app store: | |
# https://apps.apple.com/us/app/macos-mojave/id1398502828?mt=12 | |
# Output file: | |
# /Applications/Install\ macOS\ Mojave.app | |
# On a Mac host, install macinbox | |
# This is if using VirtualBox for virtualization | |
# https://github.com/bacongravy/macinbox | |
sudo gem install macinbox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Code that can be called by pre-commit to fix smart quotes | |
Add into .pre-commit-config.yaml | |
- repo: local | |
hooks: | |
- id: check-smart-quotes | |
description: Checks for and fixes smart quotes. | |
name: Check and fix smartquotes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested via | |
# docker container run --rm -it opensuse/leap:15.3 /bin/bash | |
# Check if in container | |
# https://stackoverflow.com/questions/52065842/python-docker-ascii-codec-cant-encode-character | |
if [ -f /.dockerenv ]; then | |
echo "Running in container. Setting LANG=C.UTF-8 locale..." | |
export LANG=C.UTF-8 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set user_name = salt['pillar.get']('common:lookup:user') %} | |
aws-sam-cli-extract: | |
archive.extracted: | |
- name: /home/{{ user_name }}/Downloads/aws-sam-cli | |
- if_missing: /home/{{ user_name }}/Downloads/aws-sam-cli/install | |
- archive_format: zip | |
- enforce_toplevel: false | |
- source: https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip | |
- user: {{ user_name }} | |
- group: {{ user_name }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created this state as part of the following: | |
# PR on salt-jenkins: https://github.com/saltstack/salt-jenkins/pull/1714 | |
# Related issue in salt: https://github.com/saltstack/salt/issues/60605 | |
{%- set on_docker = salt['grains.get']('virtual_subtype', '') in ('Docker',) %} | |
{%- set install_from_docker_repos = True if (grains['os_family'] == 'Debian' and grains['osarch'] in ('amd64', 'armhf', 'arm64') and grains['osmajorrelease'] != 11) or grains['os'] in ('AlmaLinux', 'CentOS', 'CentOS Stream', 'Fedora') else False %} | |
{%- if on_docker == False %} | |
include: | |
- busybox | |
{%- endif %} |