Skip to content

Instantly share code, notes, and snippets.

View 4141done's full-sized avatar
💭
Just Snakin' Around

Javier Evans 4141done

💭
Just Snakin' Around
  • F5/NGINX
  • Seattle
View GitHub Profile
FROM nginxinc/nginx-s3-gateway
ENV S3_BUCKET_NAME "bucket"
ENV AWS_ACCESS_KEY_ID "aaaa"
ENV AWS_SECRET_ACCESS_KEY "aaaa"
ENV S3_SERVER "aaaaa"
ENV S3_SERVER_PORT "80"
ENV S3_SERVER_PROTO "http"
ENV S3_REGION "us-east-1"
ENV S3_STYLE "path"
diff --git a/test.sh b/test.sh
index d90f9ce..fbfd3b6 100755
--- a/test.sh
+++ b/test.sh
@@ -247,10 +247,12 @@ integration_test() {
printf "\e[1m Integration test suite with PROVIDE_INDEX_PAGE=%s\e[22m\n" "$3"
printf "\033[34;1m▶\033[0m"
printf "\e[1m Integration test suite with APPEND_SLASH_FOR_POSSIBLE_DIRECTORY=%s\e[22m\n" "$4"
+ printf "\033[34;1m▶\033[0m"
+ printf "\e[1m Integration test suite with STRIP_LEADING_DIRECTORY_PATH=%s\e[22m\n" "$5"
@4141done
4141done / instruqt_tips.md
Last active March 30, 2023 22:25
Instruqt Tips

Setup Scripts

Setup scripts can be written in any language that is supported by the VM. Here are the rules about setup scripts:

  • It must return a nonzero exit code
  • In must be named setup-<user> where <user> is the user the lab will run as. For example if the user is labuser it will be setup-labuser
  • Use a shebang at the top like this: #!/bin/env python3 or #!/usr/bin/node or #!/bin/bash
  • Make sure it's executable (use chmod +x setup-labserver)
  • Should be in the same folder as your assignment.md

These scripts can be used at the Challenge level or at the track level

@4141done
4141done / nginx.conf
Last active February 23, 2023 17:39
Example of choosing an upstream based on request body and proxying with subrequest
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
import testFramework from "./ujest.mjs";
@4141done
4141done / index.html
Last active September 30, 2022 17:06
Backend information by header
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>NGINX</title>
<meta name="description" content="${description}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="/favicon.ico" sizes="any">
@4141done
4141done / non_var_test.js
Created September 9, 2022 17:55
Reserved words as object keys test
{ await: 'foo' };
{ break: 'foo' };
{ case: 'foo' };
{ catch: 'foo' };
{ class: 'foo' };
{ const: 'foo' };
{ continue: 'foo' };
{ debugger: 'foo' };
{ default: 'foo' };
{ delete: 'foo' };
@4141done
4141done / elixirconf_2018_graphql_raw_notes.md
Created September 11, 2018 19:21
ElixirConf 2018 Raw notes
{
seattle_mag: {
id: '23423423423423423',
url: 'http://bearcub.cave',
css: 'blocks-container'
},
go_skagit: {
id: 'sdfsdfdfs3wr',
url: 'http://bear-beer.cup',
css: 'blocks-container'
@4141done
4141done / b.rb
Created October 23, 2012 23:06
Airbrake Changes
# repo at:
# https://github.com/CityGrid/airbrake
def notify_airbrake(exception, opts={})
unless airbrake_local_request?
Airbrake.notify(exception, airbrake_request_data.merge( :additional_fields => opts ))
end
end