↓ Skip to main content

Posts

2016

Git committer activity

·672 words·4 mins
Git command git shortlog is very handy to see what is team activity. Show committer activity - whole project # (output shortened to first 20 lines) git shortlog -sn | head -20 2991 Paul King 1757 Cedric Champeau 1615 Jochen Theodorou 1031 James Strachan 749 Guillaume Laforge 312 Roshan Dawrani 306 Jason Dillon 301 Danno Ferrin 284 Alex Tkachman 273 PascalSchumacher 230 John Wilson 217 Pascal Schumacher 204 pascalschumacher 160 Thibault Kruse 158 Jeremy Rayner 134 Russel Winder 123 Cédric Champeau 122 Hamlet D'Arcy 116 Dierk Koenig 104 Pilho Kim variant (without n) has different ordering:

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).

2015

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

Starting ACC in VM

·179 words·1 min
The ACC is installed in default location: ~/ATG/ACC11.1 This does not work OOTB. You must set 2 additional ENV properties cd ~/ATG/ACC11.0 export ACC_HOME=`pwd` export JAVA_VM=/usr/java/jdk1.7.0_51//bin/java bin/startClient & Starting from dyn/admin # The start in separate VM works OK. Start in server VM brings errors message very often complaining of malformed Help URL. The issue is documented here: http://stackoverflow.com/questions/20868244/how-to-fix-malformed-help-url-while-opening-acc-atg - for JBOSS.

How to truncate Git history

·650 words·4 mins
The general idea # #!/bin/bash # Parameter: tag or sha1 git checkout --orphan temp $1 git commit -m "Truncated history" git rebase --onto temp $1 master git branch -D temp Requires Git 1.8+ Works well for mostly linear history (aka Git used for diff-ing of the catalog feeds). How it works # Starting repo (training):

How to get information about all ATG components

·795 words·4 mins
How to get information about all ATG Nucleus components # Dyn Admin has useful feature - Configuration reporter: http://localhost:8080/dyn/admin/atg/dynamo/admin/en/config-reporter-property-representation1.jhtml There are two variations of the report: Property representation report - PRR (shorter version) and Bean representation report (BRR). The PRR does not report properties that have default values, while BRR is reporting current values of all properties. Compare the sizes

Accessing Keepass information from command line

·592 words·3 mins
This is mainly for Linux and Mac as they do not have good client. It requires relatively modern Perl - 5.1x should work. I have ➜ ~ perl --version This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level (with 2 registered patches, see perl -V for more detail) Get the kpcli distribution Download from Sourceforge - http://sourceforge.net/projects/kpcli/ or get the attached script kpcli-3.0.pl Make it executable and put it on the path: