how to call a PowerShell script file location from HTTPS link and install it - powershell-remoting

how to call a PowerShell script file location from HTTPS link and install it for mass deployment example window admin center

Related

Clasp Could not read API credentials. Are you logged in globally?

I'm logging in with clasp login --creds <file> which produces a local .clasprc.json file.
It says that I am logged in, but when I run another command I get:
Could not read API credentials. Are you logged in globally?
Any thoughts on why its not looking at my local clasprc file first?
Currently using version clasp v. 2.2.0
I ran into the same problem on Windows 10 and found that you need to login both globally and locally to use clasp run. There should be a .clasprc.json file in both your project folder and user folder.
I think I have finally found the solution for the same problem
Follow along with the comments from this github issue
Add the "oauthScopes" field to your local code and push it to your app
If you can't push, then copy-paste it to manifest file in the browser
Then you have to publish the app, and there were few things I've done, not sure which one helped. In the app in browser:
add the app version in File->Manage Versions
Publish -> Deploy as API executable
try to login with clasp and creds.json file
try to run something clasp run testRun
it may show the error that you're missing some oauth permissions, but it will list which ones, and you can add them
In my case, one weird thing that also helped was to enable some Google API
so in the app in browser: Resources -> Advanced Google Services -> enable some API
then try to do clasp run
if it works, you can disable the API that you have enabled previously.
Hope that helps

How to add package.json file to built react app?

If use npm build command to build a react app for production environment, we can get a build named folder. There are html, css and JavaScript in it, but the package.json file doesn’t exists.
If we use this file to set http proxy endpoint to connect API, we can’t run the app well because the endpoint can’t be found.
How to deal with this json file rightly in this case?
First if you have package.json of some Node-React application you can run in example windows CMD (terminal console) and make some folder there you put this package.json and navigate to this folder and then, there typing npm install. On this away you can prepare all what is need for this Node-React app. Exactly with this command starting make node_modules folder there stat install need package. Next step is make folders: src and public, there you put next file :
on Src folder App.js, index.js, App.css
on public folder index.html.
That is because in this package.json exists all what is need for starting application, but if you menually build package.json this can make with run npm.
init in CMD.
Use Proxy in package.json file you can use for example if you send some data in case client-server app. There you have in client for HTTP request axios, on server side express. In package.json file add row "proxy":"http://localhost:3001"
from server. For that plz. look How to set port for express server dynamically?

AWS Elastic Beanstalk application folder on EC2 instance after deployed?

My context
I'm having errors in my deployment using AWS EB with my Flask application.
Now I'm inside the EC2 instance via eb ssh and need to explore the deployed source code of the application.
My problem
Where is the deployed application folder?
The source code is zipped and placed in the following directory:
/opt/elasticbeanstalk/deploy/appsource/source_bundle
There is no file extension but it is in the zip file format:
[ec2-user#ip ~]$ file /opt/elasticbeanstalk/deploy/appsource/source_bundle
/opt/elasticbeanstalk/deploy/appsource/source_bundle: Zip archive data, at least v1.0 to extract
Find for a specific/unique filename in source code folder, we will find the location of our application folder which, in AWS EB, to be
/opt/python/current
/opt/python/bundle/2/app
p.s.
Search for YOUR_FILE.py
find / -name YOUR_FILE.py -print

Installation an application in Drive

I search to install an GAE application in Drive (sample DrEdit with new API TR). All is OK, but I can not properly configure the "Google Drive SDK" (Part: Drive Integration) and the field "Install URL".
See screenshot (here: https://docs.google.com/file/d/0B6UEJFMrvusLY01XcHlXd0Fib2M/edit?ups=drive_web)
example of error:
Error :redirect_uri_mismatch
The redirect URI in the request: https://pcop-gd01.appspot.com did not match a registered redirect URI
Thank you for your help
Install URL should be added to "Redirect URIs" in API Access section to resolve this error. There can be multiple Redirect URIs delimited by new line character.

Cannot find URL error while it is definitely there

I have small CGI script running on a server[Linux OS]. following is a part of script output..
<tr><td valign="center">Lol</td><td valign="center">10112</td><td>abc.pdf</td></tr>
But when I click on this abc.pdf hyperlink, browser displays error message:URL /home/pathtopdf/abc.pdf was not found on the server. while the pdf and path is definitely there and all files and folders in the path[including pdf] has full permission.
My server location is # /srv/www and script in /srv/www/cgi-bin, but when I put the link to pdf as follows
<tr><td valign="center">Lol</td><td valign="center">10112</td><td>abc.pdf</td></tr>
The error message was The requested URL '/srv/www/for_html/abc.pdf' resolves to a file which is marked executable but is not a CGI file; retrieving it is forbidden. Again permission is there for files.
What could be the problemo?
Your problem is that you try to request a file outside of the webroot. So by clicking that, the browser is really requesting
http://example.com/home/pathtopdf/abc.pdf
not
/home/pathtopdf/abc.pdf
You can edit your apache config file and add a virtual host to that directory under a subdomain (say downloads)
After your edit, I am assuming you are using the file:// protocol, directly on the server. I would say just to remove the executable bit from your .pdf's file permissions. Run from a shell:
chmod -x /srv/www/for_html/abc.pdf