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
async function startPing(aiflows) { | |
const promise = $.ajax({ | |
url: '/itspaces/ping', | |
method: 'GET', | |
headers: { | |
'Content-type': 'application/json', | |
'x-csrf-token': Global.CSRF_TOKEN.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
const oFuncResponse = await myService.myFunc1({ | |
param1 : 'value1', | |
param2 : 'value2' | |
}); | |
//If it is required to pass any custom headers, then use .send method with event paraeter as below: | |
const oFuncResponse = await myService.send({ | |
"event": 'myFunc1', | |
"data": { | |
param1 : 'value1', |
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 | |
./deps/0/bin/node ./deps/0/node/bin/npm $@ | |
# Now "./npm.sh install express" will work |
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 | |
./deps/0/bin/node $@ | |
# Now ./node.sh server.js will work |
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 boto3 | |
# Initialize the Boto3 client for API Gateway | |
client = boto3.client('apigateway') | |
# Define the API Gateway resource ID and the new CORS settings | |
resource_id = 'your-resource-id' | |
new_cors_settings = { | |
"allowOrigins": ['https://example.com'], | |
"allowHeaders": ['Authorization', 'Content-Type'], |
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 boto3 | |
import os | |
import sys | |
import requests | |
from pathlib import Path | |
import zipfile | |
fn_client = boto3.client("lambda") | |
dir_name = 'lambda_functions' | |
Path("./"+str(dir_name)).mkdir(parents=True, exist_ok=True) |
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
sap.ui.define([ | |
'sap/ui/core/Control' | |
], function(Control, ) { | |
'use strict'; | |
return Control.extend("enkompass.control.grecaptchav2", { | |
metadata : { | |
properties: { | |
key: {type: "string", defaultValue : 0}, | |
size: {type: "string", defaultValue : "normal"} | |
} |
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
$ pip install \ | |
--platform manylinux2010_x86_64 \ | |
--implementation cp \ | |
--python 3.9 \ | |
--only-binary=:all: --upgrade \ | |
--target awsbundle \ | |
cryptography |
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 time | |
from multiprocessing import Process, Pipe | |
def sleeper(seconds, conn): | |
time.sleep(seconds) | |
conn.send("Got up after "+str(seconds)+" seconds") | |
conn.close() | |
print("Processed: "+str(seconds)) | |
if __name__ == '__main__': |
NewerOlder