How to remove gcloud fully? - macos

I'm new on mac. I just remove gcloud folders. And now when I open my command line window I always see next:
-bash: /Users/myuser/gcloud/google-cloud-sdk/completion.bash.inc: No such file or directory
-bash: /Users/myuser/google-cloud-sdk/path.bash.inc: No such file or directory
-bash: /Users/myuser/google-cloud-sdk/completion.bash.inc: No such file or directory
I know that made mistake removing not with gcloud command. But we have whad we have. So the main question is how to not get current logs when opening command line window on mac?

The Cloud SDK makes only the following changes to the filesystem on installation:
Adds and populates the Cloud SDK root directory, where you directed the installer.
Configuration goes in the ~/.config/gcloud directory (by default).
Modifies the RC files that you specified on installation (in response to the questions Modify profile to update your $PATH and enable shell command
completion? (Y/n)? and Enter a path to an rc file to update, or leave blank to use [/Users/$USER/.bash_profile]:.
These paths are slightly different on different platforms, but the three types of files (installation files, per-user config, and .rc files) are the same.

Related

Windows Script Host Error: Invalid character - Code:800A03F6 - Source: Microsoft JScript compilation error

I'm having an issue with Powershell and CMD. When I try to execute Angular CLI commands in CMD like ng --version or ng new projectName, I get this error;
Windows Script Host Error: Invalid character
Code: 800A03F6
Source: Microsoft JScript compilation error
Update:
On Windows .js files are associated to Windows Scripting Host by default, so the script will not be run with Node.
Open a file explorer and find a JavaScript file, open the JavaScript file's properties and then "open with", select the Node.js program file to open that kind of files.
The error should stop after doing this.
This is how I solved it: (on windows 10)
Go to C:\Users\<your_username>\AppData\Roaming\npm\node_modules\#angular\cli\bin
Check for ng.js
Right click on ng.js file and click on "properties" option
You need to open it with node.exe so click on "Change" button go to node js installed directory and
(example: C:\Program Files\nodejs\node.exe)
Select node.exe
Click on OK
It should change the color of ng.js like below:
Now try ng -v and other ng commands
Installing this exact Angular version:
npm -g install #angular/cli#10.3.1
instead of the latest version:
npm -g install #angular/cli
fixed the above error.
I ran into this exact issue after updating to Angular CLI 13. Tried tons of different suggestions from other threads. What is described in the solutions here is essentially what worked for me, but I just want to point out a possible alternative method to applying the fix that doesn't associate all JS files with node.js.
Trying to execute a script from package.json on Windows throws a JScript error
In your windows system environment variables is one variable called PATHEXT. If the value contains .JS;, remove it. Then restart your CMD windows.
make sure you have proper path variable configured as shown below
Go to your system variable settings
path variable snapshot
make sure you have all these mentioned as part of path
C:\Users<userfolder>\AppData\Roaming\npm\node_modules#angular\cli
C:\Users<userfolder>\AppData\Roaming\npm
C:\Program Files\nodejs
make sure you have all these mentioned as part of path C:\Users\AppData\Roaming\npm\node_modules#angular\cli C:\Users\AppData\Roaming\npm C:\Program Files\nodejs
in my case, before npm install -g #angular/cli, the path of my system variable was:
C:\Users\AppData\Roaming\npm\node_modules#angular\cli\bin
I remove \bin and work!!!!!
Remember to fix this for the correct User
Associating .JS files to node.exe is the way to solve this.
BUT after struggling with the same issue, I wanted to add that the file association needs to be done with the same USER that you are working with the Terminal/Shell.
So if you use the Terminal as a Admin, you must login with your Admin Account just to fix the file association.
Cheers

How do I add a file to a directory in terminal?

I am trying to add files to a directory that I created, and I attempted to use
cvs add filename
but that did not work, as I got the error message:
-bash: cvs: command not found
How do I fix this and be able to add files to a directory?
It's either cvs has not been installed or not found in the environment path variable e.g. $PATH. If you're sure that you have installed cvs successfully, try to execute the cvs command by using its absolute path.

What does this ~/ mean on command line

I had to install mule license and this is the command required to run from bin directory.
mule -installLicense ~/license.lic
When I run this command, it says can't find file license.lic. Where is the license file supposed to be to run as it states in command.
I was able to run after removing ~/ though but would like to understand what does this mean
In *nix systems, ~ always refers to the current user's home directory. So, if you ran mule -installLicense ~/license.lic and it didn't work, it means that you had the file stored somewhere else.

How can I install custom git commands (like git hooks) on Windows?

I am trying to use the git-hooks tool on Windows. But, I cannot figure out how to install the git-hooks.sh file such that I can type git hooks --install in Git Bash.
I tried putting it in C:\Program Files (x86)\Git\git, where a lot of other git-*.sh files seem to live. But no luck.
What's the secret?
Like the git-hooks installation instructions say, you need to "Add git-hooks to your PATH environment variable so 'git hooks' can be run" (or copy git-hooks to a directory that already is in your PATH). Neither the C:\Program Files (x86)\Git\git (does that directory really exist for you, I do not see it here) nor the C:\Program Files (x86)\Git\libexec\git-core directories are in your PATH by default. Although in fact any directory which is in your PATH would work, I'd recommend to use the directory where git.exe is located, usually C:\Program Files (x86)\Git\bin. Also be sure to keep the original git-hooks file name, do not rename the file to git-hooks.sh although it is a shell script.

Zend_Tool problem

This is the third time I'm installing zend studio and zend server now these two are installed succesfully (after half a day). But when I'm trying to create a new project I always get this zf error...
`
*************** ZF ERROR ****************
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path. There are a variety of ways that you can
ensure that this zf command line tool knows where the Zend Framework
library is on your system, but not all of them can be described here.
The easiest way to get the zf command running is to give it the include
path via an environment variable ZEND_TOOL_INCLUDE_PATH or
ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use,
then run the command "zf --setup". This command is designed to create
a storage location for your user, as well as create the zf.ini file
that the zf command will consult in order to run properly on your
system.
Example you would run:
$ ZEND_TOOL_INCLUDE_PATH=/path/to/library zf --setup
Your are encourged to read more in the link that follows.
Zend_Tool & CLI Setup Information
(available via the command line "zf --info")
* Home directory found in environment variable HOMEPATH with value \Users\admin
* Storage directory assumed in home directory at location \Users\admin/.zf/
* Storage directory does not exist at \Users\admin/.zf/
* Config file assumed in home directory at location \Users\admin/.zf.ini
* Config file does not exist at \Users\admin/.zf.ini
To change the setup of this tool, run: "zf --setup"
ok (took 0:04.038)
`
I've already set the ZF_INCLUDE_PATH via command line with a new zend-framework library.
I never had a clean install with anything related to zend.
Could someone help me with this?
Thanks
I presume from the paths you are working on a windows machine. Zend Studio uses the zend tool (zf.bat in windows) to create a project. To make it work you must have properly installed the zend tool, i.e. you must be able to open a console (WINDOWS+R, type cmd, type enter) and successfully run the zf command.
In your case probably is a path issue, that you can resolve following the instructions here: http://framework.zend.com/manual/en/zend.tool.framework.clitool.html#zend.tool.framework.clitool.setup-windows
In particular:
The most common setup in the Windows Win32 environment, is to copy the zf.bat and zf.php into the same directory as your PHP binary. This can generally be found in one of the following places:
C:\PHP
C:\Program Files\ZendServer\bin\
C:\WAMP\PHP\bin
You should be able to run php.exe on the command line. If you are not able to, first check the documentation that came with your PHP distribution, or ensure that the path to php.exe is in your Windows PATH environment variable.
The next order of business is to ensure that Zend Framework library is set up correctly inside of the system PHP include_path. To find out where your include_path is located, you can type php -i and look for the include_path variable, or more succinctly execute php -i | grep include_path if you have Cygwin setup with grep available. Once you have found where your include_path is located (this will generally be something like C:\PHP\pear, C:\PHP\share, C:\Program%20Files\ZendServer\share or similar), ensure that the contents of the library/ directory are put inside your include_path specified directory.
If you are running on Ubuntu or Debian--or maybe Linux in general--it now seems you must create the environment variable ZEND_TOOL_INCLUDE_PATH. Having zend framework in your include_path (or copying zend framework to you existing include_path) no longer seems to work.
To manually install the latest version zend framework on Ubuntu/Debian, this is what I did after downloading ZF and extracting it to ~/temp
sudo cp -R ~/temp/ZendFramework-1.11.11/library/Zend /usr/share/php
sudo cp -R ~/temp/ZendFramework-1.11.11/extras/library/ZendX /usr/share/php
sudo cp ~/temp/ZendFramework-1.11.11/bin/zf.sh /usr/bin
sudo cp ~/temp/ZendFramework-1.11.11/bin/zf.php /usr/bin
Next edit /etc/environment, if you want other programs, like Netbeans, to be able to invoke zf.sh. Edit ~/.pam_environment, if you want only the current user to execute zf.sh. Add this line:
ZEND_TOOL_INCLUDE_PATH=/usr/share/php
You may need to log out and log back in after doing this.

Resources