Here are straight-forward instructions to setting up a bunch of different software on FreeNAS. If you make a terrible error, just throw up another plugin sandbox and repeat.
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
| # Change this to suit your dotfiles setup and copy to your *HOST* machine: $HOME/.vagrant.d/Vagrantfile | |
| Vagrant.configure(2) do |config| | |
| # Mount your dotfiles to vagrant user's home folder (or wherever you want): | |
| config.vm.synced_folder "#{ENV['HOME']}/dotfiles", '/home/vagrant/dotfiles' | |
| # Install dotfiles on every 'vagrant provision' call. | |
| # For example, let's imagine your your dotfiles have 'install.sh' script: | |
| config.vm.provision 'shell', privileged: false, inline: '/home/vagrant/dotfiles/install.sh' | |
| end |
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
| import re | |
| import boto3 | |
| import csv | |
| from botocore.exceptions import ClientError | |
| ec2 = boto3.client('ec2') | |
| def get_snapshots(): | |
| return ec2.describe_snapshots(OwnerIds=['self'])['Snapshots'] |
I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.
- Publishing (Draft->Approved->Published->Expired->Deleted)
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
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |