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 | |
WEBDIR=/var/www/html/ | |
RANDOM_NAME=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13) | |
echo "<?php opcache_reset(); ?>" > ${WEBDIR}${RANDOM_NAME}.php | |
curl http://localhost/${RANDOM_NAME}.php | |
rm ${WEBDIR}${RANDOM_NAME}.php | |
echo "cache reset" |
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
const DynamoDB = require('aws-sdk/clients/dynamodb') | |
const documentClient = new DynamoDB.DocumentClient({ | |
apiVersion: '2012-08-10', | |
// logger: console | |
}) | |
module.exports = class Model { | |
/** | |
* Model constructor |
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
<template> | |
<div id="app"> | |
<!-- get page data --> | |
<vs-rich-text :document="doc" /> | |
</div> | |
</template> |
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
const axios = require('axios') | |
/** | |
* AWS clients | |
*/ | |
const SSM = require('aws-sdk/clients/ssm') | |
const ssm = new SSM() | |
/** | |
* Lambda handler |
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
AWSTemplateFormatVersion: 2010-09-09 | |
Transform: | |
- AWS::Serverless-2016-10-31 | |
# Template Information | |
Description: "Website redirect" | |
# Template Parameters |
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
AWSTemplateFormatVersion: 2010-09-09 | |
Transform: | |
- AWS::Serverless-2016-10-31 | |
# Template Information | |
Description: "Personal Website" | |
# Template Parameters |
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
AWSTemplateFormatVersion: 2010-09-09 | |
Transform: | |
- AWS::Serverless-2016-10-31 | |
# Template Information | |
Description: "Personal Website Deploy Pipeline" | |
# Template Parameters |
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
const eventBus = new Comment('global-event-bus'); | |
const listeners = {}; | |
export const EVENT_NAME = 'MyEventName'; | |
export default function () { | |
/** | |
* @param {string} event | |
* @param {function} callback | |
* @returns {number} index |
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
const AWSXRay = require('aws-xray-sdk') | |
AWSXRay.setLogger(console) | |
/** | |
* Lambda handler | |
*/ | |
exports.handler = async (event) => { | |
console.log(JSON.stringify(event)) |
OlderNewer