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
version: 0.2 | |
phases: | |
pre_build: | |
commands: | |
# Hack to fix the symlinks that Codepipeline breaks | |
# Applies to .tf files that contain only 1 line | |
- for file in *.tf ; do awk 'NR==2{exit}END{exit NR!=1}' "$file" && sh -c "cat $file | xargs -I R2 ln -sf R2 $file"; done | |
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
# This is a sample class that you'll probably need | |
# to do a bit of work on for your own needs, but it | |
# will hopefully save you a lot of the headaches that we had | |
class AwsMove | |
FIVE_MB = 5 * 1024 * 1024 | |
MAX_THREADS = 25 | |
def move_folder(s3_client, old_key, new_key) | |
# strip preceding '/' |
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
The MIT License (MIT) | |
Copyright (c) 2018 Pat Allan | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
# Add to file: /etc/fail2ban/jail.local | |
[nginx-badbots] | |
enabled = true | |
port = http,https | |
filter = nginx-badbots | |
logpath = %(nginx_access_log)s | |
maxretry = 1 | |
findtime = 604800 | |
bantime = 604800 |
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
class Sphinx < Formula | |
desc "Full-text search engine" | |
homepage "http://www.sphinxsearch.com" | |
url "http://sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz" | |
sha256 "6662039f093314f896950519fa781bc87610f926f64b3d349229002f06ac41a9" | |
head "https://github.com/sphinxsearch/sphinx.git" | |
bottle do | |
sha256 "b890cf523db9777c7d125842fd6b0a53fe9a7a5a4cb816389ba6f5ee6483c78d" => :high_sierra | |
sha256 "55ce34bdedf13946fa614bde50839d93135eae720f1021e2c87807d04515ab18" => :sierra |
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
# load into test setup after `require 'capybara/rails'` | |
# some sources for below flags and profile settings | |
# https://stackoverflow.com/questions/43143014/chrome-is-being-controlled-by-automated-test-software/43145088 | |
# https://sqa.stackexchange.com/questions/26051/chrome-driver-2-28-chrome-is-being-controlled-by-automated-test-software-notif | |
# http://stackoverflow.com/questions/12211781/how-to-maximize-window-in-chrome-using-webdriver-python | |
# update sources for new Options object | |
# https://github.com/SeleniumHQ/selenium/wiki/Ruby-Bindings | |
# https://github.com/teamcapybara/capybara/blob/master/lib/capybara/selenium/driver.rb | |
begin |
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
require_relative 'spec_reporter' | |
RSpec.configure do |config| | |
#custom listener | |
if ENV['REPORT'] == 'slack' | |
config.reporter.register_listener Listener.new, :start, :example_started, :example_passed, :example_failed, :dump_summary | |
end | |
end |
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
.git | |
.gitignore | |
/doc | |
.yardoc | |
coverage | |
jsdoc | |
/tmp | |
/log | |
Dockerfile | |
Dockerfile.prod |
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 | |
############################################################################################## | |
## Install Nginx with OpenSSL, and ngx_pagespeed | |
## | |
## Author: Andrew Maxwell <[email protected]> | |
## Date: 2017/09/18 | |
## Version: 0.3 | |
## | |
## Disclaimer: I am not responsible for how you use this script. Do not assume this script |
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 nginx base image | |
FROM nginx | |
# Copy custom configuration file from the current directory | |
COPY nginx.conf /etc/nginx/nginx.conf |