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
services: | |
nginx: | |
volumes: | |
- ../example:/var/www/example |
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
FROM php:7.2-fpm-alpine | |
# replace www-data(82:82) with www-data(1000:1000) | |
ARG NAME=www-data | |
ENV NAME ${NAME} | |
RUN deluser www-data && \ | |
adduser -s /bin/sh -D -u 1000 -g '' ${NAME} ${NAME} && \ | |
chown -R ${NAME}:${NAME} /home/${NAME} | |
# needed packages |
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
location /example { | |
root /var/www/example/public; | |
try_files $uri @example; | |
} | |
location /_dusk { | |
root /var/www/app/example/public; | |
try_files $uri @example; | |
} |
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
# TLS terminates at the ALB so force PHP to HTTPS | |
fastcgi_param REQUEST_SCHEME "https"; | |
fastcgi_param HTTPS "on"; |
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
* Trying 2a04:4e42::70... | |
* TCP_NODELAY set | |
* Connected to rubygems.org (2a04:4e42::70) port 443 (#0) | |
* ALPN, offering h2 | |
* ALPN, offering http/1.1 | |
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH | |
* successfully set certificate verify locations: | |
* CAfile: /etc/ssl/cert.pem | |
CApath: none |
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 'net/http' | |
require 'set' | |
require 'uri' | |
uri = URI.parse 'https://example.com/events' | |
class ImageSet | |
def initialize | |
@set = Set.new |
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
#!/usr/bin/env node | |
const app = require('express')(); | |
const viewsDir = __dirname + '/views'; | |
const otherDir = __dirname + '/../ax'; | |
const hbs = require('express-handlebars').create({ | |
defaultLayout: 'main', | |
layoutsDir: viewsDir + '/layouts', | |
partialsDir: [ | |
viewsDir + '/partials', |
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
module Grape | |
module Middleware | |
class Formatter < Base | |
include ::NewRelic::Agent::MethodTracer | |
[ :build_formatted_response, | |
:fetch_formatter, | |
:ensure_content_type | |
].each do |meth| | |
add_method_tracer :fetch_formatter, "Grape/Middleware/Formatter/#{meth}" |
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 'sinatra/base' | |
class App < Sinatra::Base | |
get '/' do | |
"hello!\n" | |
end | |
post '/exit' do | |
Thread.new { sleep 1; exit } | |
"exiting!\n" | |
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
require 'newrelic_rpm' | |
class Err | |
def self.do | |
raise 'here is an error' | |
end | |
end | |
desc 'test notice error' | |
task :error do |