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
| - git: repo={{repo_url}} | |
| version={{repo_version}} | |
| dest=/srv/www/{{application}}/current | |
| accept_hostkey=yes | |
| update=yes | |
| force=yes | |
| sudo: yes | |
| sudo_user: deploy | |
| - template: src=config.local.php.j2 dest=/srv/www/{{application}}/current/app/config.local.php owner=deploy group=deploy mode=0644 | |
| - file: src=/srv/www/{{application}}/shared/logs |
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
| class Connection | |
| def self.combine(*args, &block) | |
| # call open multiple times somehow? | |
| end | |
| def self.open(args = {}, &block) | |
| puts "open #{args}" | |
| instance = new(args) | |
| block.call(instance) | |
| puts "close #{args}" |
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
| ubuntu@api01-a:~$ SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt ruby doctor.rb www.google.com:443 | |
| /usr/local/bin/ruby (2.2.3-p173) | |
| OpenSSL 1.0.1f 6 Jan 2014: /usr/lib/ssl | |
| SSL_CERT_DIR="" | |
| SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt" | |
| HEAD https://www.google.com:443 | |
| OK | |
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
| #!/bin/bash | |
| cd "/srv/www/$1/current" || exit | |
| if [ -f bin/console ]; then | |
| BIN="./bin/console" | |
| elif [ -f Gemfile ] && grep -q rack-console Gemfile; then | |
| BIN="rack-console" | |
| else | |
| BIN="irb" | |
| fi |
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
| defmodule Coercer do | |
| @date_format "{YYYY}-{0M}-{0D}" | |
| def coerce({value, idx}) do | |
| case idx do | |
| 1 -> Decimal.new(value) | |
| 2 -> Timex.parse(value, @date_format) |> elem(1) | |
| _ -> value | |
| end | |
| 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
| 1. stdlib or well maintained libraries for: | |
| * UTF8 | |
| * I18n | |
| * Decimals | |
| * Dates, times (with or without dates), timezones, & ranges of | |
| * UUID | |
| * Background jobs | |
| * PostgreSQL (incl. type mapping from UUID, GIS, Array, Range, etc) | |
| * Redis |
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
| require "fileutils" | |
| Rake::Task["assets:precompile"].enhance do | |
| Rake::Task["assets:precompile:partner"].invoke | |
| end | |
| Rake::Task["assets:clobber"].enhance ["assets:clobber:partner"] | |
| namespace :assets do | |
| # try to log like Sprockets even though their stuff is all private |
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
| *** Targets *** | |
| probe = FPing | |
| menu = Top | |
| title = Network Latency Grapher | |
| remark = Kotiri | |
| + NZ |
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
| [steve:~/Sites/flick/packer] master* ± PACKER_LOG=1 packer build vault.json | |
| 2016/09/16 13:39:50 [INFO] Packer version: 0.10.1 | |
| 2016/09/16 13:39:50 Packer Target OS/Arch: darwin amd64 | |
| 2016/09/16 13:39:50 Built with Go Version: go1.6.2 | |
| 2016/09/16 13:39:50 Detected home directory from env var: /Users/steve | |
| 2016/09/16 13:39:50 Using internal plugin for digitalocean | |
| 2016/09/16 13:39:50 Using internal plugin for docker | |
| 2016/09/16 13:39:50 Using internal plugin for null | |
| 2016/09/16 13:39:50 Using internal plugin for amazon-chroot | |
| 2016/09/16 13:39:50 Using internal plugin for azure-arm |
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
| require "roar/coercion" | |
| require "roar/json/hal" | |
| require "json" | |
| module CategoryRepresenter | |
| include Roar::JSON::HAL | |
| include Roar::Hypermedia | |
| include Roar::Coercion | |
| property :name |