Non-ephemeral Google Cloud Shell with Custom Container Image? - google-cloud-shell

Is it possible to use Google Cloud Shell with a custom container image and have a persistent $HOME, like it is without a custom image? (Disabling Ephemeral Mode from the UI re-launches it without the custom image.)

No, this is not possible today: https://cloud.google.com/shell/docs/open-in-cloud-shell

Related

Alternative to iframes to make a split screen admin area

I am developing an admin dashboard where I want to have a files navigation system that shall be always available from the main admin area and stay independently loaded from the main admin area.
What's the problem?
While interacting with the dashboard, since the approach is SSR with PHP, the user will be executing page requests to update a post, go to a different view, etc. So the files navigation area will have to be reloaded on every request and I don't want that, since the backend PHP will have to fetch all files and build the files tree over and over again for each request.
I though about doing the following:
The wrapper page (admin dashboard) contains two iframes in a split viewport:
iframe MAIN
iframe FILE-NAVIGATOR
The user can use and navigate on each side of the viewport without affecting the other area.
For example, navigate through files and folders without moving away from an open editor on the main iframe.
Or save the editor contents and go do something else without having to constantly refresh and re-render the files navigation area.
Both iframe contents will be hosted under the same domain, so communication between them won't be an issue.
I want to go the SSR route via PHP, since this project does not deserve the effort of building a modern SPA and I need to reuse a lot of already existing PHP code.
But still, I want to do it as good as possible.
So the question is:
Do you know if there is a cleaner/better way to achieve this, better than iframes?
I am a bit worried about all browsers supporting iframes since it's in fact an old thing.
I think your best bet would be to go with a single page application; like React or Angular. This would somehow force you to build your backend system as an API server and letting most of the heavy UI lifting to JavaScript running in the client.
Some time ago I started working on a side project that would be an Amazon S3 Browser. The application runs in the browser, the main entrypoint is here but you'd be interested in looking at the Browser part itself.
You'll notice the BucketBrowser component accessible here is composed of 2 parts: the BucketList and the BucketContent, similarly to what you want to achieve.
The main advantage of working it as React (or Angular) and a neat Backend API is the separation of concerns and the opportunity to create also a Mobile or native client for other platforms that would leverage your Backend API.
I'm not a React expert, the links I've shared are part of an experiment not ready for production usage; but will help you visualize how you could achieve your idea by leveraging React.
Use SingleSPA https://single-spa.js.org/ framework and create Container app using React. Then keep your PhP code as it is and display it as child page inside Container app page. All new modules you can create as separate module. It is kind of FE microservices. We tried it using React and Vue js but I am sure it will work for PHP too.
You can open your admin releated stuff on own workspace = virtual desktop
Thats supported on Linux, on Window and perhaps on other OS too
The follow some hints how to to some thing on Linux:
Check how many workspaces are configured on your system:
wmctrl -d
You can set a different count of workspaces if you like:
wmctrl -d | wc -l
# or on follow way:
wmctrl -n 1
Open a program in foreground on current active workspace and move to 2`nd workspace:
wmctrl -s 1 ; xed & sleep 3; wmctrl -s 0;
Open a program in background on current active workspace and move to what ever your prefered workspace is:
Thats possible too.
You can display what you want on your background picture of your screen:
on Linux systems you can use p.e. Conky
Conky: http://conky.sourceforge.net/
Conky-Optionen: http://conky.sourceforge.net/config_settings.html
Conky-Variablen: http://conky.sourceforge.net/variables.html
Conky-colors: http://helmuthdu.deviantart.com/art/CONKY-COLORS-244793180?
Wettercodes: http://edg3.co.uk/snippets/weather-location-codes/germany/
https://www.linuxmintusers.de/index.php?topic=33952.0
https://www.linuxmintusers.de/index.php?topic=11139.0
on Windows systems, you can use p.e. bginfo
It can be they are like this on other OS too.

Microsoft Teams Tab application can't access clipboard

I'm developing the Microsoft Teams Tab application.
Tab application is run inside Microsoft Teams through iframe, so there are different iframe restrictions.
Actually I'm facing the issue user unable to use the clipboard-write feature.
It's possible to make it work with specifying parameters https://web.dev/async-clipboard/#permissions-policy-integration
Is there any Manifest or context option to specify iframe parameters?
There is no Manifest or context option to specify iframe parameters. Instead you can use text/input field to overcome this issue.

Is there a way to share a container's Tags and Triggers to another Container in Google Tag Manager

I am using an web application which has multiple pages like,
www.myapp.com/a.html
www.myapp.com/b.html
www.myapp.com/c.html
I have configured a container for a.html in Google Tag Manager to capture the Click Events.
Is there any way that I can reuse these tags and triggers with another container. b.html.
In the admin settings, you can export the container as a JSON file. You can then import the JSON into another container, and merge it with the existing configuration. After the import, the containers are independent from each other and a change in one will not affect the others.
In the paid version of GTM you can use "zones", basically attach a container to one or more other containers and share configuration that way.

Independent resource for creating external style sheets?

Is there any independent resource, where I can place CSS code, to use it's URL in <link> tag?
Yep. You can use Amazon web services to host images and css files. It will provide you a url to put with in a tag and it will also give you a url to put within image tags if thats something you are interested in. There are also other places.
Here is an example image hosted on aws: https://s3.amazonaws.com/pr-otp/email_folder3/OTP_021518_01.jpg
Here is an example of css hosted on aws: https://s3.amazonaws.com/dgpr/About-Us/css/styles.css
AWS link: https://aws.amazon.com/free/
You can also use drop box.
Here is a guide you can use: https://feed.mikle.com/support/using-dropbox-host-css-files/
You can also use google drive.
Here is a guide for google drive:
https://thenextweb.com/google/2013/02/05/google-drive-now-lets-developers-share-hosted-websites-by-storing-html-javascript-and-css-files/

R Markdown in Weebly Blog

I can create a .rmd file within RStudio but Weebly only allows one to integrate R code.
I'd really like the R code portions of my blog posts to be interactive (Jupyter style) and show the plots, etc.
Question: How can I go about this.
You could accomplish this by creating a custom app with:
Weebly Element
Weebly Backend Service [OPTIONAL]
The element portion of the app would act as a container for the front-end code to load rendered content and necessary display libraries from the backend service portion of the app. You could also just have the element load an iframe of the content and allow an external service to handle rendering.
Then in your blog posts you would drag instances of the Element app and configure each instance to retrieve appropriate content from your backend service.
Of course, the backend service portion of the Weebly app is not mandatory, but "some" external service for rendering the R content would be, because the element app can have custom external settings which could be used to load content/settings on a per-instance basis that can be accessed using external settings (an external web service) to choose which data to render for display in the element.

Resources