Opening a Neptune Notebook on a different browser (not the default one) - authentication

OK, so I've gotten acquainted with Neptune notebooks (a fork of Pluto notebooks) and they work fine on my machine, even on the FF browser (my default browser right now).
However, as the printing capabilities of these notebooks aren't quite there yet, I need to open a notebook on Chrome (or its open-source version, Chromium). When I try to do that, I get an authentication error (something about a "secret" that it needs, though it's quite vague as to what that is and where it would be inputted on the browser). I have full access privileges to all the folders involved, on my Linux Mint machine, running one of the latest versions of Julia.
Is there a way to do that, without having to make that my default browser?
Thanks

Just use the option launch_browser=false when starting Neptune.
julia> Neptune.run(;launch_browser=false)
Go to http://localhost:1234/?secret=xs5m1mnx in your browser to start writing ~ have fun!
Press Ctrl+C in this terminal to stop Neptune
Now copy the link that you see in console (http://localhost:1234/?secret=xs5m1mnx in my case) to Chromium and have fun!

Related

The Local Testing connection could not be configured

I can’t run local testing(for example http://localhost:3000) on browserstack.
I'm using Linux Mint 18.3 Sylvia x64. Browser is Chromium.
The browser’s extension (app) is installed.
The screenshot shows that there is no connection.
http://joxi.ru/Y2LJBv0H9MBv8r
The checkbox is checked.
http://joxi.ru/1A5PvVpCnzMww2
I tried this manual https://www.browserstack.com/local-testing.
./BrowserStackLocal --key
The above command is started, but nothing happened.
BrowserStack's Support Answer:
Thank you for joining the screen share session. As per our investigation, it seems that few of the IP's of our servers hosted on AWS are blocked due to Telegram blockage by Roskomnadzor which is leading towards the issue.
Having said that, our team is evaluating alternate solutions for our Russian users and I will be sure to notify you of the developments.
Cool!
But my neighbour doesn't have problems, he has Windows.
We have a common Internet provider.
Try replacing 'localhost' in the URL you are using with the IP address of the machine. For example, if you are testing the URL "http://localhost:3000/index.html" try using http://<machine_ip_address>:3000/index.html instead.

Reconnect to Google Cloud Platform Terminal

I am running a python machine learning script on google cloud platform. I have connected through SSH in browser. When I run the code it works, but when I close the browser it seems to stop running.
I believe I can make it run in the background with nohup, but I want to be able to check back in on it as it prints outputs on its progress.
Basically I want to be able to start the script, close the terminal and then reconnect from any machine to check on its progress. Any help would be really appreciated.
I am new to google cloud platform if any of this was unclear please as an ill try providing more detail.
You may use an app called as screen. Just install it using `sudo apt-get install screen`` (if debian, ubuntu).
In some cases it might be already installed in your instance, you may check it.
Once installed enter the following command into the terminal:
screen
and press enter. Now, You may start with your job in terminal.
The moment you need to disconnect you may press Ctrl+A and then d.
The session would be disconnected. You may note the session id that would be displayed (eg. detached from 1498.pts-1.server)
You may now close the terminal.
When you come back, use the following command to get back into the older session.
screen -r *screen_id* (eg. screen -r **1498.pts-1.server**)
This process is checked for google cloud, ssh through browser, it really works.
Check this site for mode details.
It sounds like you're referring to the Google Cloud Shell feature. If so then what you desire is not possible, the cloud shell is not intended for non-interactive operation. From Usage limits:
Cloud Shell is intended for interactive use only. Non-interactive
sessions will be ended automatically after a warning.
The cloud shell operates on a temporary Compute Engine virtual machine, which is running only while the cloud shell session is active in the browser.
Apart from the obvious approach of keeping the browser session active while your application is running, you could also provision yourself a non-temporary Compute Engine instance (a free one is available), to which you can connect and on which you can run non-interactive applications as you desire.

Use the remote debugging protocol in the Chromium based Opera

I use the Google Chrome remote debugging protocol to get benchmarking information of the page loading process with Google Chrome. I would like to switch to Opera which should offer the same functionality now that it runs on Chromium.
I started Opera with the cli parameters "--remote-debugging-port=9222 --enable-benchmarking --enable-net-benchmarking" similar to starting Google Chrome. I discovered that benchmarking seams not to be started in Opera - the chrome.benchmarking object is not visible to JavaScript.
I didn't find any documentation on the cli parameters for Opera, neither how to work with the remote debugging protocol in Opera.
Does anybody know how benchmarking can be enabled and/or the remote debugging protocol works in Opera?
Maybe you don't need this anymore, but I did today.
For some reason (maybe it's by design, but I didn't bother to check), you can't really start two separate instances of Chropera. Therefore, you first have to exit opera (from the menu to save your session).
Then, find your installation directory, and start Opera with the params:
C:\PROGRA~2\OperaNew\31.0.1889.174>opera --remote-debugging-port=9222 "http://www.opera.com"
(Maybe you can use launcher.exe, but I didn't bother checking)
Then, using another browser, visit http://localhost:9222. Maybe you can use the same one, but again, I didn't bother checking.
Now it's just the same as the Chrom(e|ium) protocol.
Hope that helps somebody.

running autoit/autohotkey scripts from server? or other automation alternatives?

I have some scripts (AutoIt) browsing YouTube for list of trending videos etc. It involves no mouse clicks (just keystrokes). The script takes a long time to finish and I can't use my PC during this time (it needs the window activated to work on it).
Is there anything I can do about this? Can these scripts run from a server or some stuff like that?
I've run into a similar problem: got to run automation with AutoIt on a Windows Server and the whole thing had got to be headless. Using Remote Desktop simply didin't work because then I'd had to keep a client opened and maximized all the time.
Short solution: install a VNC server in the Windows Server, open a client from another computer, log in and close the client. As the AutoIt script was being started by a Jenkins job, before closing the client the Jenkins applet had to be started via web interface.
By the way, I've had this idea from this post: How to run remote headless GUI automation.
As Johannes said, AutoIt probably wouldn't be suitable (and likewise AutoHotkey), but you could check out the many GUI and web testing frameworks that exist for other languages. With some of those, you can run a "headless" browser (a program that navigates the web just like a browser, but has no visible window); or you can run a standard browser on a virtual display like a Xvfb X11 server. This would be easiest if the server (or wherever it's going to run) is running a Unix-like OS, but it may be possible with Windows too.
Selenium Webdriver seems to be a very popular choice for scripting and testing actual browsers. It's natively Java but has bindings for languages like Ruby. It can also hook into something called HtmlUnit, which is also Java; that's one of the more popular headless browsers. Another (a relative newcomer) is phantom.js, which is in Javascript but (again) has bindings for other languages.
As far as I know this will not work unless the user account is logged on. You could try to see if you could convert it to an exe and run this as a service, but even then I don't think this will work. Let me know if you found out!
You can either:
Hide your window (SetWindowState #SW_HIDE) or something like that...
and use ControlClicks (if the they are original controls!)
or
Hide your window and use SendControl
or
use SendKeepActive
or
use OLEObjects like ie.au3 for automation.
Good Luck

Selenium tests and continuous integration (Running browser in background)

We have Xserver-less CentOS system for continuous integration. So no UI.
I want to run selenium test cases on it. I am using new Alpha version of Selenium2 which has WebDriver integration. It starts and ends browser by its own. Now, How do I start that in background? Something similar is possible with Internet Explorer?
I am able to run correctly on local machine. But it opens Firefox UI.
Are you able to run a virtual frame buffer? That way, all the GUI programs can believe there's graphics happening, even if there's no actual screen. You may wish to search for the term "headless". One example.
Another possibility may be to use Celerity - a ruby-based "headless browser". It uses the Watir interface (originally a competitor to selenium), which I understand to be merging with webdriver.