↓ Skip to main content

Osx

Native OS-X Docker (Beta) - not quite there yet

·644 words·4 mins
I was intrigued by convenience of using Docker natively on Mac, without dealing with differences localhost != dockerhost, so I subscribed for Beta and installed it. Good news 1 # It can coexist with previous Docker installation (mostly) - see the note at the end. As long as you do not try to run native Docker and docker-machine at the same time, things coexist.

Starting ACC (ATG Control Centre) on OS-X

·102 words·1 min
Copy the installation of ACC for respective version from a Linux VM: The startup script in bin/startClient will fail, because it cannot determine which Java to use to run the app. It is trying to determine Unix flavour, failing that defaults to Solaris and ends up with invalid settings. Fix # Set the variable JAVA_VM to path to executable command on your system.

Git project statistic tool

·756 words·4 mins
Git project statistic tool # Python based, requires Python 2.6+ Works OOTB on Mac Installation # Download TAR from Github unzipped to /opt ➜ ll /opt/gitinspector-0.3.2 total 52K -rw-r--r-- 1 miro 999 Jul 29 2013 DESCRIPTION.txt -rw-r--r-- 1 miro 32K Jun 14 2013 LICENSE.txt -rw-r--r-- 1 miro 78 Jul 2 2013 MANIFEST.in -rw-r--r-- 1 miro 681 Jan 13 2014 README.txt drwxr-xr-x 45 miro 1.5K Mar 20 2015 gitinspector -rw-r--r-- 1 miro 1.9K Jan 14 2014 setup.py -rw-r--r-- 1 miro 110 Jul 27 2013 stdeb.cfg create symlink from ~/bin (or from whatever directory on $PATH) ln -s /opt/gitinspector-0.3.2/gitinspector/gitinspector.py ~/bin/gitinspector.py ➜ ~ ll ~/bin | grep gitin lrwxr-xr-x 1 miro 52 Mar 20 16:06 gitinspector.py -> /opt/gitinspector-0.3.2/gitinspector/gitinspector.py Example # Look at scala sources - git@github.com:scala/scala.git

Fixing docker-machine error after upgrade

·388 words·2 mins
I had to upgrade docker toolbox on Yosemite to get latest docker-compose additions. After installing the new package, I was not able to connect to docker machine: ➜ ~ docker-machine status Stopped ➜ ~ docker-machine start default Starting "default"... (default) Check network to re-create if needed... (default) Waiting for an IP... Machine "default" was started. Waiting for SSH to be available... Detecting the provisioner... Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command. ➜ ~ docker-machine env default Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": tls: DialWithDialer timed out You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'. Be advised that this will trigger a Docker daemon restart which will stop running containers. Regenerating the certificates did not solve the problem. Neither did reboot.

Accessing internal AWS servers directly from Mac

·729 words·4 mins
Motivation for this hack is my unwillingness to suffer the pain of using Windows UI just to access BCC, ACC or other ATG tools requiring non command-line interface. The credit for finding out about approach is blog post by James McOrmond - VPN over SSH - who is using this neat trick from Linux for quite some time. The software mentioned https://github.com/apenwarr/sshuttle supposedly works on OS-X, however, it has not been updated for 4-5 years and would not function for me (OS-X Yosemite).

Docker - getting started

·201 words·1 min
After the reboot # docker version Client: Version: 1.9.1 API version: 1.21 Go version: go1.4.3 Git commit: a34a1d5 Built: Fri Nov 20 17:56:04 UTC 2015 OS/Arch: darwin/amd64 Cannot connect to the Docker daemon. Is the docker daemon running on this host? ➜ gitolite-admin git:(master) docker-machine active No active host found ➜ gitolite-admin git:(master) docker-machine env default Error checking TLS connection: default is not running. Please start it in order to use the connection settings ➜ gitolite-admin git:(master) docker-machine start Error: Expected to get one or more machine names as arguments ➜ gitolite-admin git:(master) docker-machine start default (default) Starting VM... Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command. ➜ gitolite-admin git:(master) docker-machine env default export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://192.168.99.100:2376" export DOCKER_CERT_PATH="/Users/miro/.docker/machine/machines/default" export DOCKER_MACHINE_NAME="default" # Run this command to configure your shell: # eval "$(docker-machine env default)" ➜ gitolite-admin git:(master) eval "$(docker-machine env default)" ➜ gitolite-admin git:(master) docker version Client: Version: 1.9.1 API version: 1.21 Go version: go1.4.3 Git commit: a34a1d5 Built: Fri Nov 20 17:56:04 UTC 2015 OS/Arch: darwin/amd64 Server: Version: 1.9.1 API version: 1.21 Go version: go1.4.3 Git commit: a34a1d5 Built: Fri Nov 20 17:56:04 UTC 2015 OS/Arch: linux/amd64 Useful guide # See https://viget.com/extend/how-to-use-docker-on-os-x-the-missing-guide

How to keep git log and less output on the screen

·123 words·1 min
When git uses less as pager the output of commands like git log disappears from the console screen when you exit from less. This is not convenient in many cases so here is how to fix this. Just for git commands: git config --global --replace-all core.pager "less -iXFR" For less globally (including git) - add to .bashrc / .zshrc / etc: export LESS=-iXFR The options we set for less are:

Dealing with 'Java Runtime SE 6' required error

·151 words·1 min
When trying to start DBeaver (http://dbeaver.jkiss.org) I got this I do have Java 7 installed: ➜ Contents java -version java version "1.7.0_55" Java(TM) SE Runtime Environment (build 1.7.0_55-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode) ➜ Contents which java java is /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/bin/java java is /usr/bin/java which should be a superset. But it is not. Solution # Oracle seems to screw up the PLIST capabilities in JAva7 install

Folder action to autorename screenshots

·55 words·1 min
Move the location of the screenshots # I do not want to have ~/Desktop polluted with files. Thus mkdir -p ~/Documents/Screenshots defaults write com.apple.screencapture location ~/Documents/Screenshots killall SystemUIServer Test the screenshot - it does it Automator based auto-rename # Create Folder action for ~/Documents/Screenshots