## create a new branch from the latest main branch
$ git checkout -b latest_MCode
## Now merge your feature branch into latest_Mcode branch
$ git merge --squash feature-branch
## before pushing - make sure the commit message is correct
This file contains 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
/* | |
* Markdown PDF CSS | |
*/ | |
body { | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif, "Meiryo"; | |
padding: 0 12px; | |
} | |
pre { |
This file contains 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
/* for inline code */ | |
:not(pre):not(.hljs)>code { | |
color: black; | |
background-color: #afb8c133; | |
padding: .2em .4em; | |
margin: 0; | |
border-radius: 6px; | |
font-size: 85%; | |
} |
This file contains 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
#!/bin/bash -e | |
# https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html#cliv2-linux-install | |
# https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-completion.html | |
echo "make sure OS is up-to-date" | |
sudo apt update && sudo apt upgrade -y | |
sudo apt install unzip -y | |
echo "* Switching to new temporary tmp folder..." |
This file contains 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
#!/bin/bash -e | |
# https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html#cliv2-linux-install | |
# https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-completion.html | |
echo "make sure OS is up-to-date" | |
sudo apt update && sudo apt upgrade -y | |
sudo apt install unzip -y | |
echo "* Switching to new temporary tmp folder..." |
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/
This file contains 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
#!/bin/bash | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 file partSizeInMb"; | |
exit 0; | |
fi | |
file=$1 | |
if [ ! -f "$file" ]; then |
This file contains 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
# Automated AMI Backups | |
# | |
# @author Robert Kozora <bobby@kozora.me> | |
# | |
# This script will search for all instances having a tag with "Backup" or "backup" | |
# on it. As soon as we have the instances list, we loop through each instance | |
# and create an AMI of it. Also, it will look for a "Retention" tag key which | |
# will be used as a retention policy number in days. If there is no tag with | |
# that name, it will use a 7 days default value for each AMI. | |
# |
This file contains 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
## | |
## Using the mine data, we are trying to find the IP address of all servers | |
## with roles: mod-cluster-node in the same environment as this minion. | |
## | |
# EXAMPLE A: THIS WORKS - but we are hard-coding the minion's environemt (development). We don't want to hard-code | |
{%- for server, addrs in salt['mine.get']('G@roles:mod-cluster-node and G@environment:development', 'network.ip_addrs', expr_form='compound').items() %} | |
# ... do stuff... | |
{%- endfor %} |
This file contains 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
#!/bin/sh | |
# | |
# JBoss domain control script | |
# | |
# chkconfig: - 80 20 | |
# description: JBoss AS Domain | |
# processname: domain | |
# pidfile: /var/run/jboss-as/jboss-as-domain.pid | |
# config: /etc/jboss-as/jboss-as.conf |
NewerOlder