Export PowerPoint slides as image in custom resolution

2016-12-03-23_01_40-imageexportaddin

The default resolution when exporting a PowerPoint slide to an image format is 96 dpi. If users want to export PowerPoint slides as image in custom resolution they have to change the default value in the Windows registry (https://support.microsoft.com/en-us/kb/827745).

It is common knowledge that a resolution of about 300 dpi is needed when using a picture in a document with the intention to print it. But often people are in need of more than one resolution, i. e. if they want to publish the picture in the web context as well. To edit the registry every time seemed no good solution for this.

I recently developed a small PowerPoint addin that enables users to export the current slide in all formats supported by PowerPoint and in a user defined resolution.The addin lets users choose the format and resolution of the image export without the need to edit the registry every time.

I published it to GitHub, so please download it: PowerPointImageExportAddin.

Kind regards

Oliver

Setup Azure agent on RHEL-7 running npm, git and maven

Introduction

When using the hosted VSTS (Visual Studio Team Services) Azure agent one can use 220 minutes of free build time a month. This seems to be a large amount of time but it not meant per team but per account. If you have more than one team working in the environment you will have to use your self hosted agent soon.

The tutorial on VSTS that describes how to install a Linux agent does not cover how to install dependencies like npm, git or maven. When I tried this myself using RHEL-7 (Red Hat Enterprise Linux 7) I stumpled upon some problems at first, so I think it is something worth talking about here.

Predonditions

This post starts at the point after installing the azure agent on a fresh installed Azure RHEL-7 VM.

Installing git

The first problem when you try to install git is that the packaged version(s) do not work with the agent. The standard version is to low (1.8.3):

##[error]Min required git version is '2.0', your git ('/usr/bin/git') version is '1.8.3'

The rh-git29-packages providing a higher version did not work because of library issues:

git-remote-https: error while loading shared libraries: libcurl-httpd24.so.4: cannot open shared object file: No such file or directory

The git authors explain on their homepage that some Linux distributions like RHEL-7 ship older versions of git and recommend to build it from source or to use 3rd party repositories such as IUS community project. This recommendation seems easier than to build from source and can be done as follows:

sudo yum install epel-release-latest-7.noarch.rpm
wget https://rhel7.iuscommunity.org/ius-release.rpm
sudo rpm -i ius-release.rpm

After installing the repositories the installation of git can be started:

sudo yum install git2u-all.noarch
git --version
git version 2.10.

This version works perfectly together with the azure agent.

Installing npm

Just like with git the npm versions in the standard repositories are not necessarily the newest. To ensure having the current version installed the instructions on https://git-scm.com/download/linux can be used (just added the sudo command, because the root access is not enabled):

sudo curl --silent --location https://rpm.nodesource.com/setup_7.x | sudo bash -
npm --version
3.10.9

You can now install the packages needed in global scope using the following command:

sudo npm install -g yourpackage1 yourpackage2

Installing maven

The maven version in the default repository works fine with the Azure agent:

sudo yum install maven.noarch

Restart azure agent

After installing all these dependencies do not forget to restart the Azure agent. If you forget this, the build job in VSTS will not start because of the error message “no agent available”:

sudo ./svc.sh stop
sudo ./svc.sh start

Next steps

After installing the packages the agent in the environment built a angular2 app using npm and a Java EE application using maven without any problems.

rpm repository: How to create a rpm package and install it to a http reachable rpm repository

Introduction

The following post will describe how a rpm repository to install packaged applications from can be configured and how the build process does work.

General

Preconditions

The documentation is written and tested for SUSE Enterprise Linux 12 (SP1) (SLES12) as build- and reposerver.

The following packages need to be installed:

  • createrepo
  • httpd
  • rpmbuild

Operation Protocol

The following steps can be performed to create a rpm repository and build an rpm package.

Access control lists

To access the logfiles of the httpd service and to be able to create the repository in the htdocs directory one will need the following access control list settings:

sudo setfacl -R -m u:user:r-X /var/log/apache2
sudo setfacl -R -m u:user:rwX /srv/www/htdocs

(r: read, w: write, x: execute, X: directory access)

Create rpm repository

We will only build packages on x86_64 architecture for SLES12. One can create additional packages for different architectures or linux derivates using the example directory structure.

mkdir -p /srv/www/htdocs/repo/SUSE/Updates/12/x86_64
createrepo /srv/www/htdocs/repo/SUSE/Updates/12/x86_64

Build rpm package

To build an example minimal rpm package for the rpm repository the following steps are needed. All steps to achieve this I did not find out myself. The source is an article of devzero2000  (http://stackoverflow.com/questions/880227/what-is-the-minimum-i-have-to-do-to-create-an-rpm-file/1165200#1165200).

Create rpm build environment

mkdir -p ~/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}

cat <<EOF >~/.rpmmacros
%_topdir   %(echo $HOME)/rpmbuild
%_tmppath  %{_topdir}/tmp
EOF

cd ~/rpmbuild

Create a tarball of the project

This step shows how to create a tarball that consists of a war file for deployment on Apache Tomcat and a web page, because the application I tested it with has a rest backend running in a tomcat container and a Angular web app for the client side.

mkdir myapp-1.0
mkdir -p myapp-1.0/srv/www/htdocs/
mkdir -p myapp-1.0/usr/share/tomcat/webapps/

Now copy the webapp in a subfolder of the htdocs folder and the war file in the webapps directory (this is only a minimal example, in production the apache2 configuration in /etc/apache2/conf.d with an alias to some folder in /usr/share/ containing the web app should be used).

Afterwards create the tar ball and copy it to SOURCES:

tar -zcvf myapp-1.0.tar.gz myapp-1.0
cp msbs-1.0.tar.gz SOURCES/

Now create a spec file with the basic install commands:

cat <<EOF > SPECS/myapp.spec

%define        __spec_install_post %{nil}
%define          debug_package %{nil}
%define        __os_install_post %{_dbpath}/brp-compress

Summary: MyApp - An example application
Name: myapp
Version: 1.0
Release: 1
License: Your license
Group: Tools
SOURCE0 : %{name}-%{version}.tar.gz
URL: https://science-site.de

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

%description
%{summary}
%prep
%setup -q

%build
# Empty section.

%install

rm -rf %{buildroot}
mkdir -p  %{buildroot}

# in builddir
cp -a * %{buildroot}


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
# %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
/srv/*
/usr/*

%changelog
* Wed Nov 27 2016   Your Name <your@mailaddress.de> 1.0-1
- First Build
EOF

Afterwards the package can be created using the following command:

rpmbuild -ba SPECS/myapp.spec

Deploy rpm package

To deploy the created package to the repository the rpm file has to be copied and the repository has to be refreshed:

cp RPMS/x86_64/myapp-1.0-1.x86_64.rpm /srv/www/htdocs/repo/SUSE/Updates/12/x86_64
sudo createrepo --update /srv/www/htdocs/repo/SUSE/Updates/12/x86_64

Add repository on target host

The repository can now be added as source to install using zypper or yum. The following example describes the process using zypper.

cat <<EOF > /etc/zypp/repos.d/MYAPP-SLE12.repo
[MYAPP-REPO]
name=MYAPP-REPO
enabled=1
autorefresh=1
baseurl=http://hostname/repo/SUSE/Updates/12/x86_64
type=rpm-md
EOF

After refreshing the repositories the new package can be installed:

sudo zypper refresh
sudo zypper search myapp

S | Name | Summary                                                                                    | Type   
--+------+--------------------------------------------------------------------------------------------+--------
i | myapp | MyApp - An example application                                                            | package

sudo zypper install myapp

Next steps

The next steps should be to configure package dependencies for the rpm package (Tomcat and httpd), to use an Apache alias for the web app and to add an undeploy step before installing the tomcat war.

Xerox XM3-19W driver download using Windows 7/8 will cause problems

If you try to find drivers for the display Xerox XM3-19W for Windows 7 or Windows 8 using google (I searched “xerox xm3-19w driver”) you mostly will find adware and spyware from different sources. None of the sites I found had something useful to offer. Xerox does not provide any drivers as well.

I have another solution for you that will work if you use a Nvidia graphic card. I think system tools of other graphic card providers can help as well, but I tested it only with the nvidia system control center.

You can use the display with current Windows versions following the steps below. Unfortunatley the software uses german language and I could find no option to set english as default. I think you will nevertheless find the options in your own language.

1. Open the nvidia system control center using the taskbar symbol:

open_nvidia_control_center

2. Select the task “Change resolution” in the task list on the left. The display Xerox XM3-19W will be shown as “analog display device”. None of the resolutions fits to the standard resolution of the display. You have to create your own settings. To do that click on the button “Modify” below the resolutions list.

nvidia_system_settings

3. The new dialog makes it possible to create a “user definded resoultion”. Create one by clicking on the button.

nvidia_modify_resolution

4. I tried different settings. The only that worked is shown below. The resolution is set to 1440×900 and the timing option “CVT – reduced blanking” has to be used. Test the settings using the button “Test”.

xm3_19w_settings

The display now should work as expected if you select this user defined resolution for the display. As you can see a Xerox XM3-19W driver download is not necessary.

Kind regards

Oliver

Exclude websites from google search

If you want to exclude a whole website from your google search, you can achieve this by adding -site:yourwebsite.com to your search.

For example, if you want to find a download link for a software, you can exclude the website chip.de. I use this example because they began to install annoying adware with their “download manager”, that has to be used for some time now instead of a direct download of the file you want to have.

For better usability you can also save a link in your bookmarks that sums up some sites you do not want to see in your search:

https://www.google.de/?q=-site%3Achip.de%20-site%3Aanotherwebsite.com

Let me know, if you found a besser possibility that works for you.

Kind regards

Oliver

Invert two finger scrolling using Windows

Picture of a MacBook Pro. Invert two finger scrolling let Windows work like Mac OS X.

If you use Windows and Mac OS X on laptops you will know the feeling… When having worked some time on your Mac and then use the Windows machine it can drive you mad that the touchpad in Windows works differently than on your Mac.

The Windows philosophy is that the two finger gesture moves the scroll bars, so if you move your finger down the page scrolls down, too. On a Mac (or on touch devices) you move your fingers to move the content of the page, not the scrollbars. This is kind of intuitive, if you are used to it.

I cannot say which way is “better”, but I would like to use only one way on every computer. Because I spend more time using my Mac’s touchpad I decided to change my Bootcamp Windows behavior and invert two finger scrolling.

If you are interested too, you can find the best tip that I found here: http://www.howtogeek.com/57542/how-to-get-the-worst-os-x-lion-feature-in-windows-reverse-scrolling/

The title of this post is brilliant, and what they suggest to invert two finger scrolling works just fine!

Kind Regards,

Oliver

Finder alternative: muCommander

MuCommander icon - a Finder alternative

Coming from Windows and Linux before, I can never get used to the way Finder sorts items. Especially that folders are not shown at top of the list and that there is no permanent reachable address bar to type in a path, is something I don’t like personally.

Currently I am testing muCommander (http://www.mucommander.com/) as an Finder alternative, which reminds me of Total Commander under Windows. It is free of charge, licensed under GPL 3.0. In addition to everything Finder can do, you can connect FTP, HDFS, HTTP, NFS, S3, SFTP. It is a cross platform application, what is a main advantage for me, because I can get used to it way better now, using it on my Linux and Windows machines as well.

Your files are displayed in two columns showing you exactly what you need to know: filename, size, date and access rights. You can define if you want to open the last visited folder or a user defined folder when you start the application. You can control everything in the application by keyboard. For everything a short key is configured and can be customized as you like.

As it comes out muCommander as finder alternative seems ideal for me. I am confident that it will be very useful and will keep you posted if something new arrives.

Best regards,

Oliver

KeepassX 2.0-alpha4 with new fonts for PasswordFields

KeepassX_v2_by_G_rawl

KeepassX for Mac OS X has only been published in its alpha version 2.0-alpha4. For its main purpose the tool absolutely suffices. Only one little thing nerves quite much. There are some password fields that do not let you paste passwords from your clipboard. Normally you can use autotype for them, but this feature has not been released for Mac OS X yet.

So there is only one last option: Typewriting the password by making it visible in KeepassX 2.0. Now but here is the catch: KeepassX uses the font “Lucida Grande UI” for its fields, which is a beautiful font but has one main disantvantage. There is simply no way to distinguish between capital i and lower case L.

So… one afternoon I spent some time on changing the font of the password fields to Courier New. If you are interested you can download this version here:

KeePassX-2.0-alpha4-courier-new.dmg.zip

This version has been compiled for 64 bit Mac OS X architecture. If this does not fit your needs you can check out this version from my GitHub repository and compile it yourself:

https://github.com/oli-ver/keepassx

Kind regards,

Oliver

Fun with installing Windows in Apple’s Bootcamp

windows-7-apple-mac

Today it took several hours installing Windows 8 in Apple’s Bootcamp (Macbook Air Mid-2012).

For all those who have read Apple’s Bootcamp Assistent’s error message: “The disk is not journaled. You must enable using Disk Utility before using Boot Camp Assistant”:

Do not reinstall Mac OS X or buy iDefrag (what is suggested in several forums all over the internet)! Simply delete your Recovery Partition and resize your Mac OS X partition to its max size…. Done! After that the Bootcamp assistent will guide you through your installations without any problems.

If you need the recovery menu later you can use the internet recovery of your Macbook (press cmd+r during boot). As an alternative you can use a recovery USB stick (download from Apple http://support.apple.com/kb/DL1433).

Best regards,

Oliver