If you'd like to experiment with Terraform on macOS locally, a great provider for doing so is the Docker provider. You can get set up in a few simple steps, like so:
Install Docker for Mac if you have not already.
| # Overrides Rails file activerecord/lib/active_record/schema_dumper.rb to | |
| # include all schema information in the db/schema.rb file, for example, in the | |
| # create_table statements. This allows for a working development database | |
| # to be built from a schema.rb file generated by rake db:schema:dump. | |
| # | |
| # This is essentially a rebuild of the "schema_plus_multischema" gem (which is | |
| # unfortunately only compatible with Rails ~> 4.2). | |
| # | |
| # Tested with Rails 6.0. |
| #!/usr/bin/env ruby | |
| require "httparty" | |
| class Converter | |
| def initialize(filename) | |
| @content = File.open(filename).read | |
| end | |
| attr_reader :content |
| sudo ./certbot-auto certonly --manual -d 'example.com' -d '*.example.com' --agree-tos --manual-public-ip-logging-ok --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory |
| # Two possibilities to parse a Postgres DB URL from heroku into environment variables | |
| # that Spring Boot understands. | |
| # You would need that, if you do not build on heroku but push docker images | |
| # from another source | |
| # Does not need bash. Works on alpine linux / busybox. Tested with openjdk:8-jdk-alpine base image. | |
| export DATABASE_URL=postgres://user:password@host:port/database | |
| # Naive way, would break with [@:/] in username or password. | |
| DB_TYPE=$(echo $DATABASE_URL | awk -F'[:@/]' '{print $1}')"ql" |
If you'd like to experiment with Terraform on macOS locally, a great provider for doing so is the Docker provider. You can get set up in a few simple steps, like so:
Install Docker for Mac if you have not already.
| [Unit] | |
| Description=Unicorn Server | |
| Requires=redis.service | |
| Wants=mysqld.service postgresql.service | |
| After=redis.service mysqld.service postgresql.service | |
| [Service] | |
| Type=forking | |
| User=netengine | |
| WorkingDirectory=/var/www/unicorn/current |
NetEngine
#06a8f9,#1897d6,#ffffff,#06a8f9,#1897D6,#ffffff,#15ff00,#FF8669
TriggerApp
#0070ff,#157be8,#2b92ff,#FFFFFF,#1c49ba,#FFFFFF,#5eff00,#de4d2c
| require 'RMagick' | |
| require 'capybara' | |
| require 'launchy' | |
| module Capybara::Recording | |
| def start_recording | |
| system "rm -f tmp/*" | |
| end | |
| def save_recording |
| require 'octokit' | |
| client = Octokit::Client.new login: 'username', password: 'password' | |
| repos = [] | |
| page = 1 | |
| loop do | |
| puts "Fetching repositories from page ##{page}" |
| * { | |
| font-size: 12pt; | |
| font-family: monospace; | |
| font-weight: normal; | |
| font-style: normal; | |
| text-decoration: none; | |
| color: black; | |
| cursor: default; | |
| } |