I can't change permissions - visual-studio-code

So my "code ." command doesn't work. I get the error
/usr/local/bin/code2: line 6: python: command not found
/usr/local/bin/code2: line 10: ./MacOS/Electron: No such file or directory
I saw that I just have to change python to python3 in the code file in /usr/local/bin. Except when I change the file, I'm unable to save it with the change. I get all sorts of errors telling me I don't have permission to change it. So then I look up how to change it, and it says to click on get info on the file, and then change the permissions in the sharing and permissions section. But my get info doesn't HAVE a sharing and permissions section!
What do I do?
PS: I realized I can see permissions if I do get info on the whole bin directory. I made it so everyone can read & write. Except I still can't save the altered version of the code file. I still don't know what to do anymore.

Ok I still have no idea how to save an edited version of the code file, but here is how I got around it for now.
brew install python
ln -s /usr/local/bin/python3 /usr/local/bin/python
Now I can use code . but I'm still very upset with my computer for not cooperating with me. 😡

Related

Changed Starting Path with PowerShell Profile But Cannot Change it Back

While learning Anaconda I had a problem with "cd" not working in Anaconda PowerShell, so I did what is recommended here, manually created a profile and set the path to a specific folder. It worked.
But today somehow I found "cd" is working for me again, so I was going to delete that ps1 file. But the folder together with the file in that was no loner there, completely gone. Now I am stuck with my temporary path on every PowerShell start-up.
According to Microsoft documentation, $profile should return my profile variables, which it did:
C:\Users\myname\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
But first, this is not the file name I gave it; second, this path is also non-existent, both folder and file.
I tried notepad $profile, then Notepad told me "The system cannot find the path specified." But it is exactly the path the system told me.
Some answer I saw here says that is because my profile is non-existent, I need to create one first. That is not the case here. I definitely overwrote my starting path, but I cannot find the actual profile file to edit that back.
I also tried doing it the same way again but changing "YOUR_FILE_PATH" into "%Home" hoping to "overwrite" it back, yet somehow this time it did not work and the file did not disappear as it did the first time.
I am really confused on this.
If you want to reset PowerShell to the original settings when PowerShell was installed.
Uninstall PowerShell from the Add or Remove Programs.
Restart your computer.
Reinstall PowerShell.

Does universal-ctags support exuberant-ctags config files?

I've got a $HOME/.ctags file from exuberant-tags, but universal-tags doesn't seem to be picking up my options from it. Does universal-tags support these config files?
See this documentation for details. The quick answer is:
mkdir $HOME/.ctags.d
mv $HOME/.ctags $HOME/.ctags.d/default.ctags
As an added bonus, you can now add comments to the file.
Apparently the file must have a name. at least in windows. so
.ctags will never work. As soon as I renamed my file to defaults.ctags the executable started reading it, if you enter bad syntax in the ctags file you will see errors output on the command line.

Zencart zc_install/index.php page showing blank

I am trying to install reinstall zencart setup again on the following link:-
http://hobbystii.ro
But when i click to start the setup it shows a blank page. I am not able to understand the problem. Can please anyone help.
For my confirmation i deleted the database cleaned everything and tried reinstallation but same error showing blank screen.
I suggest you rename the install directory "install" to start with; that is the original name if i remember correct. And try replacing the folder with original one from ZIP file.
However the best option would be to do a fresh install since your existing database will be wiped during an install either way. After doing so you can simply copy your theme files across or if you have customizations attempt copying the entire code from previous install across. Make sure to keep backups of everything and replace the configuration files for both admin and user side with that of the new one.

options "--read-only" Ipython Notebook

I can't run my ipython notebook with the --read-only option.
It says :
[NotebookApp] CRITICAL | Unrecognized flag: '--read-only'
It's weird because I've seen several blog mentionning it.
I'm running with the 1.1 version of ipython.
Do you know if this option was removed or moved elsewhere?
There is a super easy way to do what you're trying to do I think though--simply use OS security.
Do this:
When you're ready to deploy to read only, make a special folder
for your read-only work, and copy your *.ipynb files into that.
Make the *.ipynb files read-only at the Linux level: chmod 444
*.ipynb.
Run iPython Notebook from that directory. Use a different port
so that it won't conflict.
Send the URL to everyone using the URL that has the read-only
port.
They can then read it all, even run code, but they will not be
able to save changes.
They cannot navigate anywhere outside that directory. E.g. the
little home icon only brings them to the folder with your read-only
content.
Thus they have full access to the page and its functionality, but
cannot mess it up on anyone else. And all you need is a cp and a
chmod. Profit!
At least this solved my need. I have my regular port with write authority for all my development, then I copy it over, chmod it, and let people at it. Works just fine for me.
Hope this helps others!
Yes the option was removed, it might be re-introduced in another form later when nbconvert/nbviewer is refined, but you better run your own local instance of nbviewer to this effect.

iphone build error that makes me want to buy a nail gun

I'm just trying to build a simple update (which I have done before) for an iphone app, but now for some reason I'm getting this error. Can anyone tell me what it means?
Command/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist failed with exit code 127
sh: plutil: command not found
Here are the Build Results:
CopyPNGFile /Users/me/path/build/Dist-iphoneos/MyApp.app/img_000.png images/img_000.png
cd /Users/me/
setenv COPY_COMMAND /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/System/Library/Frameworks/JavaVM.frameworK/Versions/1.6/Home/"
"/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS Build System Support.xcplugin/Contents/Resources/copypng" -compress "" /Users/path/images/img_000.png /Users/me/path/build/Dist-iphoneos/MyApp.app/img_000.png
sh: dirname: command not found
CopyPlistFile /Users/me/path/build/Dist-iphoneos/MyApp.app/Entitlements.plist Entitlements.plist
cd /Users/me/
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/System/Library/Frameworks/JavaVM.frameworK/Versions/1.6/Home/"
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist --convert binary1 Entitlements.plist --outdir /Users/me/path/build/Dist-iphoneos/MyApp.app
sh: plutil: command not found
Your PATH variable is screwed up for some reason. You want to look into how exactly that happened. This is yours (colon-separated for emphasis):
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
:/Developer/usr/bin
:/System/Library/Frameworks/JavaVM.frameworK/Versions/1.6/Home/"
This is what a working PATH looks like:
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
:/Developer/usr/bin
:/usr/bin
:/bin
:/usr/sbin
:/sbin"
(line separation is to clarify how PATH variables are separating paths)
Notice how mine has /usr/bin:/bin:/usr/sbin:/sbin and yours does not? This is the problem right there. The shell script only finds executables in its path, and while the files are in /usr/bin/, it doesn't find them.
For an SO discussion on Xcode PATH's, see e.g. where is $PATH set in xcode?
Is it possible that your path environment variable is not set somehow?
You have:
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/System/Library/Frameworks/JavaVM.frameworK/Versions/1.6/Home/"
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist --convert binary1 Entitlements.plist --outdir /Users/me/path/build/Dist-iphoneos/MyApp.app
While I show:
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/opt/local/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin"
builtin-infoPlistUtility test34-Info.plist -genpkginfo /Users/gnd/Desktop/test34/build/Debug-iphonesimulator/test34.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -o /Users/gnd/Desktop/test34/build/Debug-iphonesimulator/test34.app/Info.plist
I don't see /usr/bin in your path.
(in terminal:
echo ${PATH}
though most OS X GUI applications get their path from ~/.MacOSX/environment.plist not 100% sure about Xcode though.
Additional Info:
from the 'man bash' page:
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.
So if you have it in .bash_login but .bash_profile exists, then your change will not be seen.
Also note the comment about the GUI apps PATH definition alternate file above.
You may need to log out and then back in to get the change to "take".
I had same problem.... the problem is that plutil is not in any of the directories in PATH.
My solution was to make a copy from /usr/bin to /user/local/bin which is in the PATH.
No idea if the problem is Xcode, OS X or Apple.
plutil usually resides in /usr/bin. Make sure it's there. If it's not, you may have installed your Developer Tools without unchecking (or with unchecking) the System Tools checkbox, which puts the base Mac OS X programmer tools into /usr.
Tried reinstalling the SDK?
I have gone over the answers provided and none of them worked for me. The problem persisted.
I looked carefully at the error in xcode and notice that it was looking for the image in the wrong place. In my case I had copied and renamed the directory containing my project. None of the references to my images were updated.
I fixed my problem by right clicking the project file in finder and clicking Show Package Contents. I then opened the *.pbxproj in xcode. I did a find and replace on the file to replace the name of the old folder with the new folder.
After closing and opening xcode this solved my problem.
I hope this helps others...
I've seen this error before. The issue lies in a corrupted .png file. The error is pretty deceiving. Try deleting the affected .png and replace it back in your project from a backup or clean version of that file. That should clear up the build errors.
this error will also show if you deleted a file via finder (not in xcode) then try to archive. So make sure that none of your files are listed in red and if they are remove it from your project.