Simple Access Control Lists.
Access control lists are composed of “allow” and “deny” halves to control access. Use “all” or “*” to match any address. To match a specific address use any address or address mask that IPAddr can understand.
Example:
#!/bin/bash | |
# This script will pull the latest Minecraft.deb file from Mojang and install it. | |
# I put this on a cron to run every week. I created this because I was tired of having | |
# to update the launcher every time I opened it. | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi |
remote_file "/home/chris/.vimrc" do | |
source "https://raw.githubusercontent.com/chris-roerig/dotfiles/master/vimrc" | |
owner "chris" | |
group "chris" | |
mode "0755" | |
end | |
directory "/home/chris/.vim/bundle/" do | |
owner "chris" | |
group "chris" |
# Gemfile | |
# gem "aws-sdk" | |
# gem 'paperclip', :git=> 'https://github.com/thoughtbot/paperclip', :ref => '523bd46c768226893f23889079a7aa9c73b57d68' | |
# config/initializers/paperclip.rb | |
Paperclip::Attachment.default_options.update({ | |
storage: :s3, | |
s3_protocol: 'https', |
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" |
# Logs to the specified file in the Rails log folder | |
# | |
# Usage: | |
# LogTo.file("tracking-numbers").info "log some data" | |
# or | |
# logger = LogTo.file("tracking-numbers") | |
# logger.info "this is saved in my tracking-numbers log" | |
class LogTo | |
def self.file(name) | |
return Rails.logger if Rails.env.test? |
Within GitHub it is possible to set up two types of SSH key - account level SSH keys and and repository level SSH keys. These repository level SSH keys are known in GitHub as deploy keys.
Deploy keys are useful for deploying code because they do not rely on an individual user account, which is susceptible to change, to “store” the server keys.
There is, however, an ‘issue’ with using deploy keys; each key across all repositories on GitHub must be unique. No one key can be used more than once. This becomes a problem when deploying to repositories to the same server with the same user. If you create two keys, the SSH client will not know which key to use when connecting to GitHub.
One solution is to use an SSH config file to define which key to use in which situation. This isn’t as easy as it seems.. you might try something like this:
# Set the command-line arguments to pass to the server. | |
ARGS='-web.listen-address=:9100 -collector.diskstats.ignored-devices="^(ram|loop|fd)\\d+$"' | |
# Prometheus-node-exporter supports the following options: | |
# -collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z])\\d+$": Regexp of devices to ignore for diskstats. | |
# -collector.filesystem.ignored-mount-points="^/(sys|proc|dev)($|/)": Regexp of mount points to ignore for filesystem collector. | |
# -collector.ipvs.procfs="/proc": procfs mountpoint. | |
# -collector.megacli.command="megacli": Command to run megacli. | |
# -collector.ntp.server="": NTP server to use for ntp collector. | |
# -collector.textfile.directory="": Directory to read text files with metrics from. |
# Rails Concern | |
# models/concerns/nicknameable.rb | |
module Nicknameable | |
extend ActiveSupport::Concern | |
included do | |
def self.nicknames(*args) | |
define_method("nicknames") { args } | |
end | |
nicknames |
In some cases the IC might determine that a PM meeting for the incident isn't needed.
If the IC decides to waive the meeting please replace the Meeting
section with a
note indicating the meeting has been waived (example: Meeting waived: Paul Mooring
)