I'm using iterm2 and looking at what is in usr/local/bin. Some apps were installed with homebrew. Others i'm not sure how they got there. Most of the folders are purple. Some are red. So ex: meteor and wireshark are red. I cannot figure out the meaning of this.
The default ls colorscheme on macOS shows executable files as red and symbolic links as purple.
Homebrew organize its installed packages under specific directories that look like /usr/local/Cellar/<name>/<version>. In order to make them discoverable by the rest of the system, it creates symbolic links from standard locations such as /usr/local/bin to those directories.
Hence, the symbolic links (in purple) you see in that directory were very likely installed by Homebrew; while executable files (in red) were installed by other means.
You can have a more detailed view by using ls -l. Among other things, it’ll tell you the target of each symbolic link. If you see something like foo -> ../Cellar/bar/1.2.3/bin/foo, that’s something installed by Homebrew.
Related
I am trying to get a hold of the structure of my Homebrew setup and would like to know what these different directories in /usr/local are for:
/usr/local/bin
/usr/local/Caskroom
/usr/local/Cellar
/usr/local/etc
/usr/local/Frameworks
/usr/local/Homebrew
/usr/local/include
/usr/local/lib
/usr/local/opt
/usr/local/remotedesktop
/usr/local/sbin
/usr/local/share
/usr/local/var
Homebrew
contains the Homebrew app
Cellar
contains all the racks someone installs through Homebrew. A rack contains the different versions of an application
But the rest: bin, etc, Framworks, include, lib, ...?
Many of these directories are part of the Filesystem Hierarchy Standard, and so have a standardised purpose regardless of the fact that you're using Homebrew.
My answer is based mainly from hier(7) for directories that both macOS and Linux share, and the MacPorts wiki for more macOS specific answers.
🖥 Non-Homebrew Specific
/usr/local/bin
This is where your standard executable files are stored. e.g. When you type vim into the terminal, the file that's run is stored here.
/usr/local/etc
These are local configuration files. Shell completion files are examples of this (when you hit tab to autofill a command's options).
/usr/local/include
This is where header files are stored that are used by C programs. These contain pre-defined functions.
/usr/local/lib
Object libraries are stored here.
/usr/local/opt
This contains static files, including licenses, READMEs, and install receipts.
/usr/local/sbin
These are executable files that which aren't normally run by standard users. e.g. System programs and administration utilities.
/usr/local/share
This folder contains architecture-independent files. Examples might include documentation and man pages.
/usr/local/var
Files which may change in size can be stored here. Log files are a good example.
🍎 macOS Specific
/usr/local/Frameworks
This is for native macOS frameworks. Python makes use of this for storing the Python app and executable.
/usr/local/remotedesktop
I'm guessing that this stores files from Apple Remote Desktop.
🍺 Homebrew Specific
/usr/local/Caskroom
This directory contains named casks (i.e. applications) e.g. Firefox, Telegram. See the Homebrew terminology page for more information.
I'm using latex to compile a document but don't want to mess around with installing texlive on my machine again. To that end I've had great luck compiling documents with latex-in-a-docker-container. As a starting point I followed the directions at
https://github.com/James-Yu/LaTeX-Workshop/wiki/Format#LaTeX-files
using the tianon/latex:latest docker image.
However, if I want to use fonts that are installed locally for my document, I run into problems. Some workarounds that I've had some luck with include
1) create a custom Docker image and install each font I may want, individually, e.g. by adding instructions for installing it to the Dockerfile
2) copy the font to my current directory and tell fontspec where to find it
Both of these seem sub-optimal. Ideally I would like to modify my docker run command (see, e.g., https://github.com/Arxisos/LaTex-Workshop-Docker/blob/master/bin/latexmk) so that all my system fonts are copied into the container's /usr/share/fonts directory (I believe this is where the system looks for them -- the Docker image is based on Debian; I'm looking at https://wiki.debian.org/Fonts). Is there a way to copy all the .otf and .tff files from /Users/MyUserName/Library/Fonts (if I'm on a Mac -- would be even better to have a solution that's not Mac-specific) to /usr/share/fonts?
I'm trying configure PyScripter 2.5.3 to use a version of Python that is installed in a non-standard install location (i.e., c:\MyProj\Python27).
NOTE: I also have ActivePython 26 and 27 also installed, in the default locations c:\python26 and c:\python27)
I have a short program that simply dumps the python path to verify that I have the correct version:
import sys; print( "\n".join(sys.path) )
When I'm using the "desired version", I'll see "c:\MyProj\Python27\lib" show up on the path.
I've looked at several postings (one is How to change the version of python that pyscripter uses) and most just say the defaults work and the defaults do work. I'm trying to use a non-default directory.
I've used Tools | Configure Tools to set the Python Interpreter, and Command Prompt to run "MyProj" version of python.
So Tools | Python Interpreter, starts c:\MyProj\Python27\python.exe
Also Tools | Command Prompt, starts c:\MyProj\Python27\python.exe version.
But I can't get the Python IDE to use the desired version when I use "Run | Debug (F9)".
I've configured Tools | Options | IDE Options | Python engine type = peRemote.
I've also tried internal.
I've tried starting PyScripter from the command line with the following options (none of these examples worked)
...\PyScripter.exe --python27 --pythondllpath=C:\MyProj\Python27
...\PyScripter.exe --python27 --pythondllpath=C:\MyProj\Python27\python27.dll
...\PyScripter.exe --python27 --pythondllpath C:\MyProj\Python27
...\PyScripter.exe --python27 --pythondllpath C:\MyProj\Python27\python27.dll
I've tried having only my version of python on the windows PATH (removing c:\Python27)
set PATH=C:\MyProj\Python27;%PATH%
...\PyScripter.exe
This has also failed to work.
Has anyone had success at using a non-standard location? If so what steps were followed?
I don't know if this is the best way to do it, but those are the two ways I did it:
WAY 1 (The best of two)
Go to PyScripter>>Tools>>Options...>>Custom Parameters... and add the following values
1. PythonDir = C:\Program Files\CustomPythonInstallation
2. PythonExe = C:\Program Files\CustomPythonInstallation\python.exe
3. PythonVer = 3.3.3
Note: Adapt the Name = Value pairs above to your case.
And close the window with OK button.
Now select PyScripter>>Run>>Python Engine>>Remote and your are ready to go.
WAY 2 (The more temporary solution)
Go to PyScripter>>Run>>Configure External Run...
set the "Application:" field to your python.exe file
Close the window with OK button.
Make sure you run your scripts with PyScripter>>Run>>External Run (Alt+F9)
I hope this helped, good luck.
I'm using two different pythons, tried to use pyscripter with both, but it kept messing up. My simple solution was to download the standalone pyscripter that doesn't use the registry, put copies into two different directories, then set each up for the different py. You can then right click on their icons and set them to start in the proper directories. You can also make two cmd icons and set them respectively so you have a command line. The command line icon can also be set to start in your working directory, although that's normally one level below python, and if it isn't on the path, you have to type ../python to get it (or use a keyboard macro for that.) This works trouble free.
I did delete both pythons and removed them from the system path just in case pyscripter looked for them. Then I installed 2.7 and set up the first scripter. I installed 34 and set up the second. Oddly, the scripters found the correct py each time - I imagine they go for the highest one. But you can also set that in scripter options. And frankly, it may not be necessary to delete py**. If not deleting them doesn't work you can just make a fresh copy of scripter and try again, since that will be a new standalone. For all I know you can reinstall python on the path once pyscripter is set up for each. I haven't tried that. Fiddle around. You can always make a new copy of the pyscripter standalone directory if things don't work out ;')
The interactions between the registry, the path, and the installed pyscripter just led to too many headaches.
Oh, pyscripter doesn't seem to play well with 3.4 but there's a fixed exe for your 3.4 standalone, here - just replace the 3.4 standalone python.exe with this one:
https://pyscripter.googlecode.com/issues/attachment?aid=7680027000&name=PyScripter-Updated.7z&token=ABZ6GAd40xS88r5vwgY9m8Y18vSFKN8q3g%3A1421517339924
Im using gnat4.6 on Ubuntu installed using apt-get. I need to know where to install downloaded libraries like APQ. What should I set my ADA_INCLUDE_PATH and ADA_OBJECTS_PATH to?
The beauty of Ada support in Debian (on which Ubuntu is based) is that you don't need to mess with ADA_INCLUDE_PATH and friends; supported libraries are installed where the GNAT Project Manager expects to find them. Say gnatls -v to see the default values.
To use the system as intended, you will find it much simpler to use the GNAT Project Manager; you'd say, in your my_project.gpr file,
with "apq";
project My_Project is
...
and build with
$ gnatmake -P my_project
There's online documentation for GPR, but I wouldn't call it particularly user-friendly. There's a set of Youtube videos (I haven't looked at them in any detail; their stated interest is large systems, but hang in there).
I use gnatmake to build; how do I cite my build paths in a correct way?
The relevant options are shown in 6.2 Switches for gnatmake: Source and library search path switches.
Addendum: The development package is libapq3.2.0-dev.
The manual is in /usr/share/doc/libapq3.2.0-dev/manual.pdf.gz
An example and corresponding .gpr file are in /usr/share/doc/libapq3.2.0-dev/examples. As #Simon suggested, the .gpr file begins:
with "apq.gpr";
project APQ.Samples is
The Ada include files are in /usr/share/ada/adainclude/apq.
The libraries are in /usr/lib.
$ dpkg -L libapq3.2.0-dev
/.
/usr
/usr/share
/usr/share/ada
/usr/share/ada/adainclude
/usr/share/ada/adainclude/apq
/usr/share/ada/adainclude/apq/apq_helper.ads
/usr/share/ada/adainclude/apq/apq_helper.adb
/usr/share/ada/adainclude/apq/apq.adb
/usr/share/ada/adainclude/apq/apq.ads
/usr/share/ada/adainclude/apq.gpr
/usr/share/doc
/usr/share/doc/libapq3.2.0-dev
/usr/share/doc/libapq3.2.0-dev/copyright
/usr/share/doc/libapq3.2.0-dev/manual.pdf.gz
/usr/share/doc/libapq3.2.0-dev/examples
/usr/share/doc/libapq3.2.0-dev/examples/apq-samples.adb
/usr/share/doc/libapq3.2.0-dev/examples/apq-samples.ads
/usr/share/doc/libapq3.2.0-dev/examples/apq-samples.gpr
/usr/lib
/usr/lib/libapq.a
/usr/lib/ada
/usr/lib/ada/adalib
/usr/lib/ada/adalib/apq
/usr/lib/ada/adalib/apq/apq_helper.ali
/usr/lib/ada/adalib/apq/apq.ali
/usr/share/doc/libapq3.2.0-dev/changelog.Debian.gz
/usr/lib/libapq.so
I have made the move from TextMate to VIM. I can not use macvim, policy at work does not allow me to install it. I have tried installing command-t to give me "go to file" functionality. However as I am using VIM with the osx terminal, when I press command-t it opens a new tab.
I have now decided to try FuzzyFinder but can not figure out how to search across a directory recursively for a file with it, could anyone show me how to go to a file like command-t but using FuzzyFinder. :-/
Command-T describes its intended use inside MacVim. If you want to use it inside terminal Vim, use the default binding <Leader>t (by default, <Leader> is the backslash key). You can remap this in your Vim config if you'd rather use a modifier key binding.
Fuzzy finder is not under active development. You're way better off with the awesome Command-t. The problem is terminal Vim does support it because terminal Vim needs to be built with Ruby support. It's fairly straightforward to build Vim from source to enable this.
http://brilliantcorners.org/2011/02/building-vim-on-osx-snow-leopard/
Guide for Snow Leopard but works for Lion too. You'll need to have XCode installed, not just the GCC compiler.
You could map it to ctrl or shift easily, which won't conflict with your OS like command, via:
nmap <C-t> :CommandT<CR>
# or
nmap T :CommandT<CR>
In normal fuzzyfinder to search through a directory you can use file globs, like **, e.g., at the fuzzyfinder prompt:
>File>**/yourpattern
Will search all directories under the current directory for your pattern. Just be wary not to try to do that on large filesystems, or you're going to be waiting a while and/or running out of memory. It will index the tree in memory after the first search though, and will be faster afterwards.