When I copied text from Azure Cloud Shell terminal , copied string is incomplete - azure-cloud-shell

I selected bellow area and pressed command+C.
cloud shell capture
Following string is pasted from my clipboard.
You are viewing an offline list of runtimes. For up to dat
My browser is Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

This is a known limitation.
Note: FireFox/IE may not support clipboard permissions properly.
For more details, refer "Limitations of Azure Cloud Shell".

Related

Selenium automation on docker (Linux) not keep cacheStorage

I run an automatin scenario Login into a website (Google IAP Login). I need to cache the cookies and storage so that on next automation no need to do Google IAP Login.
This automation run on docker, OS: Ubuntu.
Docker:
CHROME_ARGS="--disable-gpu --headless --no-sandbox --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --user-data-dir=/chromedata --disable-dev-shm-usage --window-size=1366,768"
Selenium config:
Capybara.register_driver :docker do |app|
chrome_opts = Selenium::WebDriver::Chrome::Options.new
chrome_opts.add_argument("--user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36"")
chrome_opts.add_argument('--headless')
chrome_opts.add_argument('--remote-debugging-port=9222')
chrome_opts.add_argument('--remote-debugging-address=0.0.0.0')
chrome_opts.add_argument('--no-first-run')
chrome_opts.add_argument('--disable-web-security')
chrome_opts.add_argument('--enable-automation')
chrome_opts.add_argument("--user-data-dir=/path/to/folder")
client = Selenium::WebDriver::Remote::Http::Default.new
client.open_timeout = wait_time
client.read_timeout = wait_time
Capybara::Selenium::Driver.new(
app,
browser: :chrome,
options: chrome_opts,
http_client: client
)
end
chrome://version
After I execute the automation, and use the generated user profile. I still redirect to Google IAP Login (I assume that some cache not saved correctly, because the are no ../Service Worker/CacheStorage on profile folder)
Note: This docker and the generated profile data works when I did scenario login manually

Supabase Self Hosted responded with 404

I've tried following the guide provided on supabase:
https://supabase.io/docs/guides/self-hosting
I went with Option 1 & 2 in which both resulted in the same error 404 when I try to reach localhost:8000/v1?APIKEY=.
192.168.32.1 - - [17/Jun/2021:07:32:29 +0000] "GET /v1 HTTP/1.1" 404 48 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36"
Or perhaps there isn't a management page like the hosted one?
Here are my started containers.
From the top of the page you linked to:
The self-hosted version of Supabase does not include a UI yet. We are working on this in stages, starting with our UI library (more context).
They recommend various Postgres clients as alternatives.

Invoke Lambda docker container locally by passing API Gateway like event object

I am trying out the newly added container image support for AWS Lambda service.
I have built a custom image using python-alpine as the base image. I have used the same Dockerfile mentioned in the article above. I am also able to invoke it using below command :
curl -v -X POST http://localhost:9000/2015-03-31/functions/function/invocations -H 'Content-Type: application/json' -d '{}'
This part -d '{}' is actually what is passed as the event. When this function is behind an actual AWS API gateway it gets the below event
{"resource":"/","path":"/view","httpMethod":"POST","headers":{"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","Accept-Encoding":"gzip, deflate, br","Accept-Language":"en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4","cache-control":"max-age=0","CloudFront-Forwarded-Proto":"https","CloudFront-Is-Desktop-Viewer":"true","CloudFront-Is-Mobile-Viewer":"false","CloudFront-Is-SmartTV-Viewer":"false","CloudFront-Is-Tablet-Viewer":"false","CloudFront-Viewer-Country":"GB","content-type":"application/x-www-form-urlencoded","Host":"j3ap25j034.execute-api.eu-west-2.amazonaws.com","origin":"https://j3ap25j034.execute-api.eu-west-2.amazonaws.com","Referer":"https://j3ap25j034.execute-api.eu-west-2.amazonaws.com/dev/","upgrade-insecure-requests":"1","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36","Via":"2.0 a3650115c5e21e2b5d133ce84464bea3.cloudfront.net (CloudFront)","X-Amz-Cf-Id":"0nDeiXnReyHYCkv8cc150MWCFCLFPbJoTs1mexDuKe2WJwK5ANgv2A==","X-Amzn-Trace-Id":"Root=1-597079de-75fec8453f6fd4812414a4cd","X-Forwarded-For":"50.129.117.14, 50.112.234.94","X-Forwarded-Port":"443","X-Forwarded-Proto":"https"},"queryStringParameters":null,"pathParameters":null,"stageVariables":null,"requestContext":{"path":"/dev/","accountId":"125002137610","resourceId":"qdolsr1yhk","stage":"dev","requestId":"0f2431a2-6d2f-11e7-b799-5152aa497861","identity":{"cognitoIdentityPoolId":null,"accountId":null,"cognitoIdentityId":null,"caller":null,"apiKey":"","sourceIp":"50.129.117.14","accessKey":null,"cognitoAuthenticationType":null,"cognitoAuthenticationProvider":null,"userArn":null,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36","user":null},"resourcePath":"/","httpMethod":"POST","apiId":"j3azlsj0c4"},"body":{"msg":"update"},"isBase64Encoded":false}
My codebase depends on parameters like path, resource, isBase64Encoded, body, etc. What I am trying to achieve is, make the application portable (which can run on kubernetes). Is there a tool or a way that acts as an API gateway and passes an event like the one mentioned above while invoking this function ?
I have searched for tyk, traefik but none of them can generate an event like AWS API gateway and pass it to the function.
Not sure what you want to simulate the API gateway events, it's actually about the payload in json format which sent to lambda function.
eg.
aws lambda invoke --function-name docker-aws-cdk --region ap-southeast-1 --payload '{"action":"start", "target":"dev"}' outfile

Run a windows service as NT AUTHORITY/SYSTEM

Is there a way to run a windows local service with the integrated account NT AUTHORITY/SYSTEM ? (basically specify the "log on as" as NT AUTHORITY/SYSTEM)
Thanks,
Fred

How to tell which of IP addresses listed by ipconfig /all is localhost

I am trying to use fiddler on IPad by connecting it to PC by wireless connection so I could use auto-responder to 'mock' some data.
Tutorial tells me that I should use my machine IP to connect IPad and check if it works, my problem is that I have multiple IP's (or at least it seems that I do).
One candidate would be 192.168.1.23 another 192.168.1.41
How to check which of IP addresses is localhost, or they both are pointing to same place?
This is just 'an' answer not 'the' answer, but this worked for me.
First I navigated to http://192.168.1.23:8888/ and got
Fiddler Echo Service
GET / HTTP/1.1
Host: 192.168.1.23:8888
Proxy-Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
This page returned a HTTP/200 response
Originating Process Information: chrome:10568
To configure Fiddler as a reverse proxy instead of seeing this page, see Reverse Proxy Setup
You can download the FiddlerRoot certificate
I then navigated to http://192.168.1.41:8888/
and got same exact response.
I believe it is safe to assume that both IP addresses are pointing to same place. Not sure if this is always the case, but it is true in mine.
It would appear that I am using multihoming.

Resources