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
# products/{product}/user/{id} | |
# invoke with npx | |
# sls invoke local -s dev -f put-json-form-with-id -p ~/putFormRequest.json | |
{ | |
"body": { | |
}, | |
"pathParameters": { | |
"id": "1", | |
"product": "" |
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
window.onload = () => { | |
'use strict'; | |
var times = 0; | |
var output = ''; | |
var interval = setInterval(() => { | |
times += 1; | |
if (times === 5) { | |
clearInterval(interval); | |
scrollTo(0, 0); | |
var test = document.querySelectorAll('a[uid]'); |
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
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: pv-www-claim | |
spec: | |
storageClassName: standard | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: |
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
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: nginx-config | |
data: | |
default.conf: | | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name _; |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: app | |
name: web | |
namespace: default | |
spec: | |
replicas: 1 | |
selector: |
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.4-fpm | |
RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
libpng-dev \ | |
libzip-dev \ | |
libicu-dev \ | |
libzip4 \ | |
&& pecl install xdebug \ | |
&& docker-php-ext-install opcache \ |
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
# swap space allocation | |
sudo fallocate -l 1G /var/swap.1 | |
# or use following command that agnostic about distro | |
#sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 | |
sudo chmod 600 /var/swap.1 | |
sudo /sbin/mkswap /var/swap.1 | |
sudo /sbin/swapon /var/swap.1 | |
# check if swap is up in the right way | |
sudo swapon --show |
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
<VirtualHost *:80> | |
# add this in apache virtualhost configuration file to avoid CORS problem enabling request from multiple origin | |
# (optionally change LocationMatch path) | |
<LocationMatch "/"> | |
Header set Access-Control-Allow-Origin "*" | |
Header set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" | |
Header set Access-Control-Max-Age "1000" | |
Header set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" | |
</LocationMatch> | |
</VirtualHost> |
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
<VirtualHost *:443> | |
SSLEngine on | |
SSLCertificateFile "/etc/ssl/ssl_certificate.crt" | |
SSLCertificateKeyFile "/etc/ssl/ssl_certificate.key" | |
SSLCACertificateFile "/etc/ssl/ssl_certificate.ca-bundle" | |
ServerAdmin admin@mysite.com | |
DocumentRoot /var/www/html/mysite | |
ServerName www.mysite.com |
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 | |
EMI=/etc/issue | |
NODE=`which node` | |
NPM=`which npm` | |
APACHE=httpd | |
echo AMI VERSION: `cat $EMI | grep -Eo [0-9\.]+` | |
echo NODE VERSION: `$NODE -v` | |
echo NPM VERSION: `$NPM -v` |
NewerOlder