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
server { | |
listen 80; | |
listen 443 ssl http2; | |
# make yourself an SSL certificate for *.test.test (and your dhparam file if you're so inclined) | |
ssl_certificate /etc/nginx/ssl/test.cert; | |
ssl_certificate_key /etc/nginx/ssl/test.key; | |
# your other favourite SSL settings go here |
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 | |
# count package updates by the number of lines | |
# - just-print bypasses the sudo lock requirement | |
# - have to narrow it down to lines with brackets to avoid simulation warning that has whitespace at the start | |
# also note this will include any packages on hold, you should use apt pinning to hide them from the update process | |
UPDATES_COUNT=$(apt-get --just-print -V -u upgrade --assume-no | grep "(" | grep "^\s" | wc -l) | |
# store the hostname for later | |
HOSTNAME=$(hostname) |
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 | |
# count package updates by the number of lines | |
# note that this will include packages pending replacement because of needing system reboot | |
UPDATES_COUNT=$(yum check-update --quiet | grep -v "^$" | wc -l) | |
# count security updates with a substring | |
SECURITY_UPDATES=$(yum --debuglevel 2 --security check-update 2>/dev/null | grep -P '(?<! 0 packages) available$' | cut -d ',' -f 1) | |
# store the hostname for later |
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
#### Set prompt basics #### | |
# set variable identifying the chroot you work in (used in the prompt below) | |
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then | |
debian_chroot=$(cat /etc/debian_chroot) | |
fi | |
# set a fancy prompt (non-color, unless we know we "want" color) | |
case "$TERM" in | |
xterm-color) color_prompt=yes;; |
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
VAGRANTFILE_CLIENT_NAME = "example" | |
Vagrant.configure(2) do |config| | |
config.vm.define VAGRANTFILE_CLIENT_NAME do |localdevbox| | |
localdevbox.vm.box = "localdev" | |
# Create a forwarded port mapping which allows access to a specific port | |
# within the machine from a port on the host machine. In the example below, | |
# accessing "localhost:8080" will access port 80 on the guest machine. |
NewerOlder