Posts

Showing posts with the label Mac

Quit hiding the scrollbars on a Mac! Make Mac scrollbars always visible

Image
macOS on Mac and MacBook machines automatically hides the scrollbars when you aren't scrolling. It is a great space saver, but it can make things difficult. This behavior violates the "what you see is what you can do" implicit contract between users and the system. It makes it impossible to scroll applications or browser windows that contain a scrolling drawing area.  An example is the DASH  plotting and dashboard system. The graph view grabs all scale and drag operations to the full width of the screen. The trackpad just affects the content area and not the page-level scrolling. We have a fix for that! Make scrollbars on macOS always visible You can do this via the macOS Settings application Settings --> Appearance --> Show scrollbars Created 2025/07

Get AI code assist VSCode with local LLMs using Ollama and the Continue.dev extension - Mac

Image
This is about running VSCode AI code assist locally as a replacement for Copilot or some other service.  You may run local models to guarantee none of your code ends up on external servers. Or, you may not want to maintain an ongoing AI subscription. We are going to use Ollama  as our LLM service and the continue.dev  VSCode extension as the language service inside VSCode.   This was tested on a MacBook using the Apple GPU. Macs are an interesting platform for running local AI code assist and LLMs because you can treat much of main memory as GPU VRAM. Related blog articles and videos Several related blogs and videos that cover VSCode and local LLMs Blog  Get AI code assist VSCode with local LLMs using Ollama and the Continue.dev extension - Mac Get AI code assist VSCode with local LLMs using LM Studio and the Continue.dev extension - Windows Rocking an older Titan RTX 24GB as my local AI Code assist on Windows 11, Ollama and VS Code YouTube Video ...

Quit worrying and love VMs and Containers

Image
Did you ever wake up, look at your development box and wonder "when did that happen"?  I've started using Docker for deployed services like databases, messages brokers etc.  At the same time, I've been trying to use Kali Linux for hackathons and general security work.   Windows gaming, my pathetic mobile efforts and windows docker development are done using Windows 10.  Windows must run under a Hypervisor or as a dual boot.  That is how you end up with three hypervisors, three operating systems and two docker environments on the same machine. The following diagram shows the underlying complexity of all this. Hypervisors in action HyperKit on OS/X:  Docker for Mac desktop runs docker containers inside a HyperKit virtual machine that leverages the Mac OS/X Hypervisor.framework.  Docker named drives live inside this virtual machine. VMWare Fusion on OS/X:  VMWare Fusion can host Windows and Linux virtual machines. Fusion suppor...

Setting Mac ITerm tab titles to the current directory

Image
It is easy to set the iTerm titles to final part of the current working directory and the iTerm window title to be the full path of current tab. Start a new terminal window or tab after making the following changes.  New tabs and iTerm windows create new login sessions that read these file contents. Modify ~/.bashrc Edit  ~/.bashrc.  Create ~/.bashrc if it doesn't exist. Add the following text to the file.  Note that this text has comments that document where I found this on the internet # https://gist.github.com/phette23/5270658#gistcomment-1265682 # https://github.com/fish-shell/fish-shell/issues/2692 # Set iTerm2 tab titles to the last directory in PWD tabTitle() { echo -ne "\033]0;"$*"\007"; } # Set iTerm2 win titles to the full directory of PWD winTitle() { echo -ne "\033]2;"$*"\007"; } # Alias 'cd' to list directory and set title cd() { builtin cd "$@"; ls -lFah; tabTitle ${PWD...

Cloning a Mac / Bootcamp disk to a larger drive

OWC and others recommend that you do a fresh installation when moving a Mac with Windows BootCamp to a larger drive.  That is probably a good idea. Sometimes you just decide to do things the hard way. This is what I did for my Macbook Air when I bought a larger SSD.  It had OS/X on the first partition and Windows 7 on the second partition. Backup your data. Create a Clozilla bootable thumb drive. Get an OWC drive with external case. Plug in the new drive in the external case. Boot Clonezilla from the thumb drive.  Clone the internal disk to the new, larger, external disk. Make an exact copy of the disk using Clonezilla. This exact copy will not make use of the full drive. Power off the machine Remove the old disk.  Install the new disk inside your machine. Boot into the mac OS on the disk you just installed. Move GPT bookkeeping data to the actual end of the disk. Download and use gdisk to copy the MBR/GPT info to the end of the new drive. You ma...

Viewing all files in OSX Mavericks

I was having a problem with VMWare after my Windows 8.1 upgrade.  Windows 8.1 had no network connectivity.  I ran into the same problem after upgrading a Windows 8 guest to Windows 8.1 on a Windows host. I wanted to look at my VMWare Fusion configuration for my bootcamp partition.  VMWare stores its information in ~/Library/Application Support/VMware Fusion/Virtual Machines which is normally not visible in the Mac Finder.  There are a bunch of pages on the interweb that describe how to make all directories and files show up in Finder.  Many of them are incorrect for Mavericks which is now case sensitive.   This posting describes how to show all files in Finder. You can show all files by typing the following in a terminal window defaults write com.apple.finder AppleShowAllFiles -boolean true killall Finder You can go back to the default view by typing the following in a terminal window defaults delete com.apple.finder AppleShowAllFiles killall ...

Subdomain DNS for VMWare/Hyper-V Virtual Lab on a MAC

Image
Scenario I have a Windows 7 VM that I do general development on in addition to writing Java or other code on my Mac.  Sometimes I want to push code from my Windows 7 VM to a virtual Windows Server Lab set of VMs.  Other times I want to write a program on the Mac that communicates with servers in my virtual lab.  Direct IP address connection is always possible across these machines butI want name based address resolution so that I can test software the same way it would be in our data center. The virtual lab is powered down most of the time so the DNS solution must work well for general internet traffic when that lab's DNS server is unavailable.   The virtual lab has its own AD server that registers all the Domain members host names and IP addresses. In my case, I have it act as a subdomain of a domain that I have. The subdomain DNS is visible to machines on that private network whether they are in the AD Domain or not. My Windows 7 development VM and my ...

Install a Microsoft Virtual Lab on a Mac with Fusion and Hyper-V

Image
Modified 2013/02/09 to add remote management enablement We're going create a Hyper-V Microsoft virtual lab environment on a Mac with the following configuration as discussed in this previous blog article  http://joe.blog.freemansoft.com/2013/01/run-microsoft-virtual-lab-on-mac-with.html .  We can use the same approach on Linux machine using VMWare workstation / player. Our mini-data center consists of 5 machines. A Windows 2012 Server hosting Active Directory and DNS.  The machine also holds/manages the hyper-v environment used to run the rest of the machines Two Windows 2012 servers to be used as application machines One Windows 2012 server used to run SQLServer 2012 One Windows 2012 server used to run the on-prem version of windows service bus We're not actually going to install any application software in this article.. The basic steps are Install Windows Server 2012 that will be our AD/DNS/Hyper-V host Hack the VMWare/Fusion/Workstation dhcp....

Run a Microsoft virtual lab on a Mac with Fusion and Hyper-V

Image
An integrated Microsoft environment provides a lot of standard infrastructure for your project.  It also requires a certain amount of standard infrastructure irrespective of the size of the project. Active Directory is the most obvious example of this   Developers that want to test out Microsoft tools or sub-systems almost always need a multi-system environment because most  Microsoft products work best when bound to Active Directory, a tool that needs to run on its own system.  Virtualization can help here making it easy to build virtual labs , "personal clouds" or use something like Azure. I've been working on a Microsoft project where all of our virtualization is done using Microsoft's Hyper-V.  This pushes me towards Hyper-V as my virtualization platform when sharing work with others on the team.  My most powerful laptop is my 16GB Quad-Core Macbook Pro.  Hyper-V doesn't run on OS/X so we can instead make use of a technique used by a lot of VMWar...