Running the whole set of unit tests with
npm run unit everytime you make a change to a component takes several seconds. This definitely doesn’t fit my “code a little, test a little” workflow. Before I wanted to dive into webpack and the karma setup to employ something like a watch mode, I searched the Internet and found a neat solution to achieve the goal:
autoWatch option, which I added to my
package.json file like this:
An error message everyone finds himself surprised to see once you start unit testing Vue components which have a dependency to vuex:
Searching the web for the error message quickly unveils a solution on Stack Overflow:
Install Babel Polyfill:
then include the polyfill file before your source and test files within the files section of your karma.conf.js:
Bitrise (iOS & Android Build Automation), lets you automatically sign your apk files and offers you two options to achieve this: You either specify code sign configuration in your Gradle configuration, or you let sign-apk step sign your unsigned apk. Unfortunately, if you want to build more than one build variant or you have different platform variants or flavors, you can’t specify which apk the sign-apk step should pick up and sign. There is already an issue reported for support of multiple apk in android workflows.
For 3 3 5, I didn’t want to wait until Bitrise provides an out-of-box solution, but at the same time I wanted to:
- Build a debug and a release apk,
- Automatically sign the release apk during the build process,
- Not specify sign configuration in Gradle configuration, and
release-unsigned-bitrise-signedto a nicer name.
I came up with two little shell scripts I placed before and after the sign-apk step in the build workflow. The before script “Set APK path for signing” looks for the unsigned apk file and sets an environment variable with its file path.
In order to not surprise myself in the future, I set the environment variable
$MY_APK_PATH which is then used in the sign-apk step as an input value:
The after script “Rename, remove APKs” cleans up the deploy directory after the sign-apk step.
There was a little surprise when
rename threw errors about not allowed words in a regular expression. Apperantly,
rename on Debian is
prename. The supplied expression is being executed as a perl script and there must be some conflict with imported libraries and symbols. Didn’t investigate that any further and instead used
mv in a for loop.
exiv2(1) is a tool for image metadata manipulation that also lets you rename files based on its metadata. From the manpage:
mv | rename
Rename files and/or set file timestamps according to the Exif create timestamp. Uses the value of tag Exif.Photo.DateTimeOriginal or, if not present, Exif.Image.DateTime to determine the timestamp. The filename format can be set with -r fmt, timestamp options are -t and -T.
To rename all JPEG files in a folder, use
Filename format for the ‘rename’ action. The format string follows strftime(3) and supports the following keywords:
\:basename\: - original filename without extension
\:dirname\: - name of the directory holding the original file
\:parentname\: - name of parent directory
Default filename format is %Y%m%d_%H%M%S.
To only prefix the filenames with the timestamp:
Too lazy to remember and type that fileformat, I try to remember
Sloppy bash script to migrate tests written with
Took me hours to figure out I should completely reinstall the node and bower packages:
Interesting that things like these made a difference to the generated /dist/assets/tests.js
Athletica provides all functionality necessary to successfully manage track and field athletics meetings. This post describes its installation of version 6.3 on CentOS 7.
Make sure you have root privileges or, much better, your user is in the sudoers list. For instruction on how to change the sudoers list visit http://blog.zwiegnet.com/linux-server/add-user-to-sudoers-group-centos/.
For the installation of Athletica we need two tools which are not in the minimal installation of CentOS 7:
Install and start Apache daemon:
Auto start daemon on startup:
To test whether your Apache is running, try to download the index page with
wget localhost. You should get
403 Forbidden. This is because the directory
/var/www/html/ is empty and directory listing is disabled.
Optional: To enable upload and restore of large Athletica backup files, change the PHP configuration like this:
MySQL is not in the default repositories of CentOS. Instead, there is a MySQL Yum repository that you can find at mysql.com:
To install the repository, execute the following command:
Install and start MySQL daemon:
You can find the latest version of Athletica at swiss-athletics.ch: http://swiss-athletics.ch/de/athletica/athletica.html.
Download and unzip:
- Harden MySQL installation
- Character set problem
No Node.js 0.12 build on fedora packages:
Bug on Red Hat Bugzilla:
Bug 1192647 - 0.12 is released but fedora still using 0.10.xxx
How do I install Nodejs v.0.12.* on Fedora 21?
Install npm packages globally without sudo on OS X and Linux: