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 | |
# Config | |
SITE=$1 #back.example.com | |
PHP_SOCKET_FILE=$2 #=/run/php/php7.4-... | |
CACHE_VALID_TIME="${3:-1m}" # Queries remain in cache for 1 minute | |
REQUEST_LIMIT_SECOND="${4:-4}" # Up to 4 queries per second | |
MAX_QUEUED_REQUESTS="${5:-200}" # Up to 200 queries in queue | |
# Nginx Before configs |
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
(function(factory){ | |
if(typeof define==='function'&&define.amd){ | |
define(['jquery'],factory); | |
}else if(typeof module==='object'&&module.exports){ | |
module.exports=factory(require('jquery')); | |
}else{ | |
factory(window.jQuery); | |
} | |
} | |
(function($){ |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "ServerlessPolicy", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:GetRole", | |
"iam:PassRole", | |
"iam:CreateRole", |
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
import url from 'url' | |
const defaultValidHostRegex = /www\.example\.com/ | |
export function getProtocol(req) { | |
let proto = req.connection.encrypted ? 'https' : 'http' | |
// only do this if you trust the proxy | |
proto = req.headers['x-forwarded-proto'] || proto | |
return proto.split(/\s*,\s*/)[0] | |
} |
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
import React from 'react' | |
import _ from 'lodash' | |
import PropTypes from 'prop-types' | |
import css from 'styled-jsx/css' | |
import { Responsive as SemanticResponsive } from 'semantic-ui-react' | |
import classNames from 'classnames' | |
import hoistNonReactStatics from 'hoist-non-react-statics' | |
class Responsive extends React.Component { | |
static propTypes = { |
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
0x8A29d49BC5f95fB3448B134d825849FD9591cCEb |