Terminal Has Two Environments in Parentheses - bash

While trying to set up Google Colab so I could access a ton of large jpgs for a CNN, I was running into problems. In my flustered state I tried to follow a now-forgotten website's advice. It did not work. But what did happen was now my terminal has two virtual environments (I think) listed one after the other. I'm on a macbook pro, using Zsh.
(firstEnv) (myenv) johndoe~$
I would prefer to revert back to having just my virtual environment
(firstEnv) johndoe~$
I tried:
conda deactivate myenv
but nothing changes

If you've made non-persistent changes to your shell environment inside a Terminal window, then you can discard those changes by simply closing that window and opening a new one.
If persistent changes were made then they would have been effected by updating one or more files, (probably) in your home directory. For Zsh, these would be one or more of .zshenv, .zprofile, .zshrc, and .zlogin.

Related

How to name Gedit windows?

I work with multiple Gedit instances on a VM running KDE on top of CentOS. Each window is open to a specific issue, typically about a dozen, with files taken from one of about half-a-dozen branches. How can I name the individual windows to keep track of which bug or branch they are from?
THere's nothing in Preferences for this

Possible for different Anaconda environments to have different working directories?

Depending on what Anaconda notebook I'm working in, I'm often working out of different directories. When I launch a terminal session for a particular environment, is there any way to specify what directory I want that session to be in at session launch? I use Anaconda on macOS, Windows, and Linux, and would be interested in all solutions if they happen to be different

How can I launch IPython Notebook quietly on Windows?

When I start IPython notebook from the start menu item generated by the installation, it spawns a terminal window running the server. Can I somehow make the server run in the background so I don't need to have this "useless" window around? I tried various tips found online involving changing the shortcut to use pythonw.exe instead of python.exe, but none of them seem to work.
You can do
pythonw -m IPython notebook
Seems a bit tricky though, since you won't notice whether the server is running or not.

Using WebStorm (JetBrains) with SSHFS mounted development server (Mavericks, OSXFUSE)? Constantly dismounts drive

UPDATE: I saw that someone was trying to use PyCharm with SSHFS and JetBrains said: "no". Perhaps this just won't work?
I'm trying to work with WebStorm on an SSHFS mounted disk at a client's office I'm working at — I've never used SSHFS before. I am using OSX 10.9.2, installed SSHFS thru home-brew and installed OSXFUSE.
The SSHFS mount dismounts periodically in any case, but since I started trying to use WebStorm with it it dismounts every time I start WebStorm and it starts scanning the files on the SSHFS disk — WebStorm gives the message "external file changes sync may be slow: Project files cannot be watched (are they under network mount?)" and if I try to open files it freezes. The SSHFS disc meanwhile has been dismounted. If I remount via terminal WebStorm isn't happy and either freezes or just sits there.
I set up the WebStorm project using "New project from existing files" — is there a way to set it up using SSHFS as a server? Beyond the login and password to the SSHFS disc I don't have any other server-specific info, but perhaps could get it.
Thanks for any help — 
This is how I operate, and maybe it can help you. If there's a config setting I seem to have glossed over, just ask and I'll fix this up. But all in all, this is wonderfully successful:
My build environment is tucked away on a Linux distro, but my development environment is co-located on a Mac Desktop (when I'm at work) and a Mac Air (when I'm at home). My projects are enormous, and contractually I can't move the code to any machine where it might be accessible if my laptop is stolen. So I pretty much have to use ssh (and sshfs) to get anything done.
When I am at home, and I sit down to work, I manually initiate the VPN -- since there are so many variations, I'll assume you know how to do this part.
I open a terminal and invoke:
caffeinate &
because I hate getting disconnected whenever the computer goes into screen saver. This may be why you get disconnected? I leave this terminal open whenever I'm developing. I also use tmux so that my terminal session can be shared between computers. Anyway...
I set up a mount point set up between the server and the client. I have a script that I run when the mount point goes down (customize for your own work):
umount -f /Volumes/$MOUNTDIR/
umount -f /Users/$HOMEUSER/$MOUNTDIR
mkdir /Users/$HOMEUSER/$MOUNTDIR
sshfs $HOMEUSER##SERVERADDR:/usr/$HOMEUSER/$MOUNTDIR /Users/$HOMEUSER/$MOUNTDIR
I then launch Webstorm, PyCharm, ADS, IntelliJ (I'm a Jetbrains fan).
At this point you can open the directory within $MOUNTDIR and start working. If you find that you need to run builds, here's a tip -- do not build locally. Instead use SSH to issue the build commands (or run scripts) on the server. The overhead of synching after the build has run is most likely far less than fetching and writing all of the steps of the build.
I only find I get disconnected if I lose the VPN. I used to get disconnected whenever the computer would sleep. Caffeinate fixed that.
For reasonable sized projects, this is probably all you need. So what follows is an optimization -- only do it if you are having headaches:
To speed up load times, what I do is create a local project that is not part of the mount. There is a .IDEA directory that gets created and written to a lot at the base of the first directory you open as a project. Inside of this directory are lots of files that get written to a lot, and depending on your network speed, it might cause grief. It does mean some settings have to be maintained everywhere you go, but in my case it's a small price to pay for big performance gains.
So because I do this, I'll have to manually add directories to my project (Under Preferences/Directories). But if you work with huge APIs, you might be doing this anyway. I am careful to mark directories I don't need to reference as 'excluded', to make life easier on the indexer. I work in a shared directory structure with thousands of other employees, and I make sure the streams don't cross.
Now I have many many thousands of files, and it is true that sync can be slow. But sync is only triggered when you leave the app and come back in. And honestly, it's not that terrible, so long as you have a reasonable internet connection.
I hope this helps. Once I started using this as my workflow, I never went back.

Emacs on Window 7 saving files to VirtualStore directory

I've recently installed ClojureBox on a Windows 7 machine after using it on a different, XP machine for a while. When I created and saved a file, it wasn't being saved where I expected, but to the \Users\xxxx\AppData\Local\VirtualStore directory. This happened as long as I wasn't running emacs as the local administrator.
A Google search returned only a couple of hits, and with nothing I could really apply other than to run emacs as a local admin.
Any other way to get around this? Is there a windows setting, or something I could configure in emacs?
Thanks.
You can right-click Emacs and "run as Administrator" which I expect will get annoying quickly. Further, if you launch other apps from inside it you might be misled about the behaviour of those apps under normal circumstances. A better approach would be to save your files somewhere other than under Program Files or the root of C, thus avoiding virtualization.

Resources