I'm using three of the devices to develop. Desktop(Home), MacBook(Work), Laptop(Remote).
I'm developing a web project that needs to build and API server. So I'm running build steps and API server using watch parameter.
However, If I do work at remote or home, I can't start API server because that port already bound by other process that executed by work MacBook terminal. I tried to kill that process, but It restored automatically by watch parameter.
So now I want to use the same terminal session across the multiple devices. I thought maybe I can do this using tmux, but I don't know is there a better solution for this.
Is there available something to do this in vscode-server? Or just I need to use tmux or other solution?
Related
I have already created and designed my MATLAB app in App Designer, where it currently works fine with the executable deployment. However, I've been researching the implementation of my application into a web browser, and have attempted doing it through MATLAB Web App Server, however it only seems to work while I have the run button pressed, obviously. Additionally, I attempted to create an AWS server using the MATLAB tutorial, however for some reason my stack build always fails.
So just curious is there another way to do this, such that either the server can host my app indefinitely, or perhaps run it through a GitHub pages account because my current project is saved on Github?
You need a back server which runs the MATLAB engine (or MCR).
Something you can not do on GitHub as they don't dedicate you a server for persistent work.
I was looking for a way to check for changes in a specific URL provided by the user. I wrote a script that I ran at home that can do that successfully using WWW::Mechanize. The thing is, I need to run it in another computer network that has a group policy that blocks all $mech->get($url) requests (it's not firewall problems, I let Perl through), so I thought I'll try and work around this problem by letting Perl control the web browser.
The computers in the network run Google Chrome and IE8 only and I can't install Firefox due to another policy (thought of using WWW::Mechanize::Firefox). I don't want to invoke IE8 in the script because most of the URLs that will be provided will be of websites that don't work well with it, so that leaves me with Chrome only.
Searching for a module that can do that, I only found AnyEvent::Chromi:
which exposes all of the Chrome Extensions API via a websocket connection.
This doesn't work (the policy probably blocks that websocket as well).
Is there another way to work around this problem/control Chrome from within a Perl script?
Is there another way to work around this problem/control Chrome from
within a Perl script?
WWW::Mechanize::Chrome
Like WWW::Mechanize, this module automates web browsing with a Perl object. Fetching and rendering of web pages is delegated to the Chrome (or Chromium) browser by starting an instance of the browser and controlling it with Chrome DevTools.
You can also do this from scratch without using any CPAN modules.
I tested this on Linux (Ubuntu 16.04, Google Chrome version 53) using Unix Domain (UD)
sockets. Unfortunately, it seems Windows does not have UD sockets, but
it should be possible to do same from Windows using named pipes.
First, make sure google-chrome is running in the background. We will
need to create a Chrome App
that will communicate
with a native host through the native messaging
API. The
native host can be any script that reads messages from its STDIN and
returns replies through its STDOUT. I tested both a Python
script and a Perl script.
Now, in order for a standalone Perl script to communicate with the
Chrome browser, it will send request through a UD socket (created by
the native host) to the native host; the native host will then
forward the request to google-chrome through its standard output
pipe. Then the Chrome App (written in JavaScript)
will receive the request. The Chrome App will use the Chrome
JavaScript APIs to get the requested data and return it to the native
host. Finally, the native host forwards the result through the socket to
the Perl script.
As you can see, there are some details required for setting this up, but I can
confirm that it works on my Linux platform. Please let me know if you need more
details.
Since you mentioned IE8, I'm assuming that you're dealing with a Windows system. And since you mentioned that you had considered WWW:Mechanix::Firefox, it sounds like you are not being restricted to just core modules.
Based on that, the only way that I can think of to automate the Chrome broswer would be to use Win32::GuiTest to control the Chrome browser. If you can figure out how to manually drive your testing using only keyboard input (i.e. no mouse), that would make things easier than trying to figure out the mouse emulation to get the cursor to the correct position for various tasks.
I'm not sure if that's necessarily a route that you will like to use or not. It's just the only way that I can think of to accomplish what you want to do with the restrictions that you have to deal with.
I want to be able to execute local shell commands in a web application.
Chrome Native messaging api seems to be good for that, but as it needs also a service in background, I do not see a real difference with a little http server.
Is there a real structural difference between them? As I see there is somewhere a socket used as an interface.
Is there any other solutions for that?
Chrome Native messaging does not work by calling a running daemon. Instead, it spawns a new process each time sendMessage or connect is called.
While you can keep the process you opened with connect running, if you want to do one-shot commands the sendMessage approach is good.
Do note that you will still need a Chrome App or Extension installed to be able to do it, as well as a (separately installed) Native Host module.
Is there (or is possible) a standard Powershell or commandline in Modern UI in Win 8.x?
It would be pretty nice to have this app "docked" on a part of screen only (for SSH, etc...) and other desktop apps still could be in fullscreen.
You couldn't do this directly. The PowerShell engine isn't available on WinRT. You might be able to do something like create a WinRT app that uses sockets to communicate to a service on the localhost that executes PowerShell for you and returns the results. That would require you to build that service and install it on machines. If this is for a Windows RT device that won't work because only Microsoft can install desktop apps.
Is there a way to debug (specifically step-through) a Google app engine application that has been deployed to the cloud. The reason I am asking is that there are certain things that either cannot be debugged locally or require work-arounds to test locally (eg. CRON Jobs).
Specifically I want to do this using Eclipse.
Update: as of 2015 it is possible to debug AppEngine Java applications if they run on Managed VMs. Also, the debugger is a web-based hosted debugger - no support yet for your popular IDE. See Cloud Debugger.
No, this can not be done.
One of the reasons why this most probably will never be available is that GAE is a distributed cloud system, where an "application" can have multiple instances running in parallel and there is no guarantee that consequent requests (e.g. a user session) would be served by the same instance. So there would be no way to know to which instance to connect debugger to.
You might want to star this acknowledged bug