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
'use strict'; | |
exports.handler = (event, context, callback) => { | |
const request = event.Records[0].cf.request; | |
const s3DomainName = 'static-jebai.s3.amazonaws.com'; | |
const countryCode = request.headers['cloudfront-viewer-country'][0].value.toLowerCase(); | |
const acceptLanguage = request.headers['accept-language'][0].value.toLowerCase(); | |
const isDesktop = request.headers['cloudfront-is-desktop-viewer'][0].value; | |
const isMobile = request.headers['cloudfront-is-mobile-viewer'][0].value; | |
const isSmarttv = request.headers['cloudfront-is-smarttv-viewer'][0].value; |
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
<html> | |
<head> | |
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> | |
<script src="https://unpkg.com/vue-tel-input"></script> | |
<!-- <script src="https://unpkg.com/vue-phone-number-input" charset="utf-8"></script> --> | |
<script type="text/javascript"> | |
</script> |
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
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias l='ls -at' | |
alias ll='ls -alt' |
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
'use strict'; | |
const axios = require('axios'); | |
axios.get( | |
'http://localhost:3000/aaaa', | |
{maxRedirects: 0}) | |
.then( | |
response => { | |
console.log(response.response.status, response.headers.location); |
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
'use strict'; | |
const AWS = require('aws-sdk'); | |
const s3 = new AWS.S3(); | |
const locale = require("locale") | |
exports.handler = async (event, context, callback) => { | |
console.log("event ==> ", JSON.stringify(event)); | |
const request = event.Records[0].cf.request; | |
console.log(`<< ${request.origin.s3.domainName}${request.origin.s3.path}${request.uri}`); |
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
{ | |
"targetFunc":"cart.update", | |
"data":{ | |
"token":"7e26208fe172f66ec506c15030500e0c", | |
"note":null, | |
"attributes":{ | |
}, | |
"original_total_price":500000, | |
"total_price":500000, |
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 locale = require('locale') | |
supported = new locale.Locales(['en', 'en_US'], 'en'); | |
console.log ((new locale.Locales('en')).best(supported).toString()); // 'en' | |
console.log ((new locale.Locales('en_GB')).best(supported).toString()); // 'en' | |
console.log ((new locale.Locales('en_US')).best(supported).toString()); // 'en_US' | |
console.log ((new locale.Locales('jp')).best(supported).toString()); // en | |
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 locale = require('locale') | |
supported = new locale.Locales(['en', 'en_US'], 'en'); | |
console.log ((new locale.Locales('en')).best(supported).toString()); // 'en' | |
console.log ((new locale.Locales('en_GB')).best(supported).toString()); // 'en' | |
console.log ((new locale.Locales('en_US')).best(supported).toString()); // 'en_US' | |
console.log ((new locale.Locales('jp')).best(supported).toString()); // en | |
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
<div id="IssueCardForm" class="form-vertical hide"> | |
{% form 'customer_login' %} | |
{{ form.errors | default_errors }} | |
<label for="CustomerEmail" class="hidden-label">{{ 'customer.login.email' | t }}</label> | |
<input type="phone" name="customer[phone]" id="CustomerPhone" class="input-full{% if form.errors contains 'email' %} error{% endif %}" placeholder="{{ 'customer.login.phone' | t }}" autocorrect="off" autocapitalize="off" autofocus> | |
<!-- {% if form.password_needed %} | |
<label for="CustomerPassword" class="hidden-label">{{ 'customer.login.password' | t }}</label> |
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
{"lastUpload":"2022-08-03T17:37:34.204Z","extensionVersion":"v3.4.3"} |