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
# Require api_g folder from https://support.huaweicloud.com/intl/en-us/devg-apisign/api-sign-sdk-python.html | |
# -*- coding:utf-8 -*- | |
import json | |
import os | |
import requests | |
from apig_sdk import signer | |
region = os.getenv('REGION') | |
api_version = os.getenv('API_VERSION') | |
project_id = os.getenv('PROJECT_ID') |
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
# coding: utf-8 | |
# This code require huaweicloudsdkcce, you may need to build dependency (layer) | |
# https://support.huaweicloud.com/intl/en-us/functiongraph_faq/functiongraph_03_0343.html#section1 | |
import json | |
import os | |
from huaweicloudsdkcore.auth.credentials import BasicCredentials | |
from huaweicloudsdkcce.v3.region.cce_region import CceRegion | |
from huaweicloudsdkcore.exceptions import exceptions | |
from huaweicloudsdkcce.v3 import * |
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
# -*- coding:utf-8 -*- | |
import json | |
import os | |
from urllib.parse import unquote | |
from datetime import datetime, timezone, timedelta | |
from obs import ObsClient, Object, DeleteObjectsRequest | |
def delete_object(obsClient, bucket_name, object_key): | |
print('deleting source in daily folder') | |
print('bucket = ', bucket_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
<html> | |
<head> | |
<title>Test</title> | |
</head> | |
<body> | |
<span> Hostname : </span><span id="hostname">Hostname</span> | |
</body> | |
<script> | |
item = document.getElementById('hostname'); | |
item.innerText = window.location.hostname |
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
{ | |
"headers": { | |
"X-WC-Webhook-Signature": "errtu1XQr0dm48Yz3ufiVvCgrcu2kin+H7WYQQ8Y0fE=" | |
}, | |
"body": "{\"status\":\"completed\",\"billing\":{\"first_name\":\"Jamy\",\"last_name\":\"\",\"company\":\"\",\"address_1\":\"\",\"address_2\":\"\",\"city\":\"\",\"state\":\"\",\"postcode\":\"\",\"country\":\"\",\"email\":\"jamy@example.com\",\"phone\":\"0888889999\"},\"customer_note\":\"\",\"line_items\":[{\"id\":90,\"name\":\"่Item-1 Sample Produc\",\"product_id\":23,\"variation_id\":0,\"quantity\":1,\"tax_class\":\"\",\"subtotal\":\"200.00\",\"subtotal_tax\":\"0.00\",\"total\":\"200.00\",\"total_tax\":\"0.00\",\"taxes\":[],\"meta_data\":[],\"sku\":\"\",\"price\":200,\"parent_name\":null}]}" | |
} |
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
const crypto = require('crypto'); | |
function validateRequest (event) { | |
// GET Secret from Environment Variable | |
const { WC_SECRET } = process.env; | |
// Get Header with Hash to validate from header (event.header) | |
const wc_hmac_hash = event.headers ? | |
event.headers['X-WC-Webhook-Signature'] || event.headers['x-wc-webhook-signature'] | |
: ""; |
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
{ | |
id: 1, | |
parent_id: 0, | |
status: 'completed', | |
currency: 'USD', | |
version: '5.6.0', | |
prices_include_tax: false, | |
date_created: '2021-08-25T14:58:07', | |
date_modified: '2021-08-25T15:00:13', | |
discount_total: '0.00', |
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
################################################################################################### | |
#### This configuration file runs a PowerShell script that modifies the Windows timezone | |
#### | |
#### Original Author: @kylegalbraith | |
#### https://github.com/awsdocs/elastic-beanstalk-samples/blob/master/configuration-files/community-provided/instance-configuration/enable-windowsupdate-dotnet.config | |
#### Modifier: @teer823 | |
################################################################################################### | |
files: | |
"c:/temp/configureTimezone.ps1": |