Laur's blog
  • Home
  • About
  • Support my work
Sign in Subscribe
Fix "No Voice" with Kraken 7.1 and VLC on OSX
boom

Fix "No Voice" with Kraken 7.1 and VLC on OSX

Today I had an odd issue with my Kraken 7.1 Chroma: I could not hear the voices in a movie in VLC. I could however hear the other sounds (like the voices were filtered out). I could also hear everything with the internal speakers or one of the monitors.
Aug 10, 2016 1 min read
Mock an Observable Interface
interface

Mock an Observable Interface

TL;DR: Use a doAnswer() with a new Answer<Observable<Type>>() if you have to mock observables. Today I wrote my first test where I had to mock an observable interface: public interface UserDatabase { Observable<User> readUser(String username); } where the User model is:
Aug 1, 2016 1 min read
Fix "Multiple dex files define L..." Errors
android

Fix "Multiple dex files define L..." Errors

Today I got an error when building the APK: Multiple dex files define L/... My scenario is that of a project with 2 modules: a core and an app. Both modules use a plugin named androiddevmetrics, which generate some code, including a class which has the same signature in both
Jul 22, 2016 1 min read
Thou Shall Stop Reading
develop

Thou Shall Stop Reading

I've caught myself reading about a subject matter (now, that's android). I've been reading articles, documentation on new libraries, looking for inspiration on the net about UI... All for an app I'm upgrading with new functionality and looks. This is bad and
Jun 30, 2016 1 min read
Mirror a Website with WGet
form

Mirror a Website with WGet

TL;DR: if you want to mirror a site where you need to authenticate, you need to do it in two steps. In the process of testing my app, I needed a mirror of the website I'm using. Since the website has authentication (via a form), the mirroring
Jun 10, 2016 1 min read
Replace a colour in an image with imagemagick
batch

Replace a colour in an image with imagemagick

I had to change the colour of some monochrome icons for a personal project, from black to something else (i.e. not black). I've tried in python with PIL. Unfortunately, my attempts to use ImageOps failed miserably, because I'm working with RGBA images, not RGB :(. Of
Jun 8, 2016 2 min read
Strip HTML tags in python
beautiful

Strip HTML tags in python

Note: This is a post transferred from Laurii for historical and consolidation purposes. A common problem I have to deal with quite often is to remove all HTML tags from a document. While this is easy for XML (well formatted etc.) and you could do it by hand with a
Jun 5, 2016 2 min read
Gitlab Dreamhost SMTP
docker

Gitlab Dreamhost SMTP

The other day I've tried to install GitLab on Docker because I've got a Synology NAS which does support Docker :) I've found that if I create an user, it sends a confirmation email (of course it does!) and, unlike with Django, I'm
Jun 1, 2016 1 min read
Outlook VBA: Iterate recursively over folders
folders

Outlook VBA: Iterate recursively over folders

Note: This is a post transferred from Laurii for historical and consolidation purposes. As part of the program I've started, I had to perform a recursive walking of all sub-folders from a starting point in a .pst file. Code looks like this: Sub WalkFolders(fnum) Dim olApp As
May 31, 2016 2 min read
Cascade get value from dictionary in Python
cascade

Cascade get value from dictionary in Python

Several times I've been faced with the problem: Get a value from a dictionary. If the key is not present, then get from another key. Normally, the implementation would go like this: if dict.has_key(key1): return dict[key1] elif dict.has_key(key2): return dict[key2]
May 31, 2016 1 min read
Outlook VBA: Write to a file
macro

Outlook VBA: Write to a file

Note: This is a post transferred from Laurii for historical and consolidation purposes. I'm not a master in VB (I hate it actually) not in VBA, but it;s quicker to write something like a hack in VBA for outlook than in C#. So, here's a
May 30, 2016 1 min read
Find your cake day on Reddit
account

Find your cake day on Reddit

The past couple of days I've seen a raise in "cake date" posts on reddit. I'm probably behind the trend on this one, but I never paid attention to the dates I open an account. Nevertheless... I had to find mine, so here'
May 30, 2016 1 min read
Rules for Your Bathtub
bathtub

Rules for Your Bathtub

One of the important areas in the house is the bathroom. After looking for more types of tubs, I've got a few generic rules: 1. First determine the exact dimensions of the space where the tub will be placed and then consider the types of installations that could
May 15, 2016 1 min read
Some Interview Questions
epso

Some Interview Questions

The other day I've gotten wind of a bunch of interview questions for the EU Institutions. This apparently was a specialist interview in one of the Executive Agencies, so here it goes: Head of Department We have invited everybody who was successful in the preliminary tests for this
May 13, 2016 1 min read
Change a django password manually
application

Change a django password manually

The other day I've been confronted with a strange situation: I forgot the admin password for a django application. I was playing with installing my own pypi repository, I've configured and deployed a test application and, after a couple of weeks, I forgot the password. I
May 4, 2016 2 min read
French - Short Essay - What's in it for you?
belgium

French - Short Essay - What's in it for you?

The other day I had to write a short essay on What do you think you'll get from this course? The result is: Je pense que la question est un peu compliquée pour être seulement 150 mots, car il y a des plusieurs aspects. Tout d'abord,
Apr 25, 2016 1 min read
Material Drawer and Toolbar Options
android

Material Drawer and Toolbar Options

The latest couple of days I've spent in adding the Excellent Material Drawer to one of my applications. In my case, the drawer is shown on the second activity in the workflow. Below, I'll outline my experiments. Preamble First, the requirements are: 1. An android application
Apr 15, 2016 2 min read
Avoid Typing Password on Git Every Time on Windows
git

Avoid Typing Password on Git Every Time on Windows

Today I've updated Android Studio and, when I wanted to fetch stuff from git, it failed (connection issues). Initially, I thought it was because I'm behind a proxy, but all proxy settings were working OK (unchanged, also command line worked just fine). Apparently, the git plugin
Apr 14, 2016 1 min read
Set Up Concourse Behind a Proxy
build

Set Up Concourse Behind a Proxy

TL;DR: Most important thing is to find out if your proxy mangles/removes headers. If yes, then you need to contact your IT department. I've got the following error: Get https://registry-1.docker.io/v2: net/http: request canceled while waiting for connection (Client.Timeout exceeded while
Apr 7, 2016 1 min read
Dark
belgium

Dark

Today is a dark day. My thoughts are with the victims' families. Unfortunately, I don't know how to disable the add for a particular post...
Mar 22, 2016
Intercept OkHttpClient Response for Debug
android

Intercept OkHttpClient Response for Debug

I wanted to log the data retrieved by OkHttpClient for debugging purposes. After digging for a while, the process seems quite straight-forward now. First, we create the OkHttpClient: OkHttpClient client = new OkHttpClient(); client.setFollowRedirects(false); client.setFollowSslRedirects(false); Then, we add an interceptor: client.interceptors().add((chain) -> { /** Interceptor
Mar 16, 2016 1 min read
Speed-Up your CV Updating on EPSO
CV

Speed-Up your CV Updating on EPSO

TL;DR: Open two browsers and use the script below to be quick in inputting your EPSO application. This tutorial is for: * People who already have filled up their EPSO accounts and just need to copy-paste data around * People with lots of entries * Who is sick and tired of scrolling
Mar 10, 2016 2 min read
Access Data Files for Local Tests in Android
android

Access Data Files for Local Tests in Android

TL;DR: Put your data files in test/resources and access it with: InputStream inputStream = this.getClass() .getClassLoader() .getResourceAsStream(path); I've got an android application with a module performing data processing (HTML scraping in fact). This part is pure java and all its tests are in the src/
Mar 9, 2016 1 min read
Use XPath in PL/PGSQL for Batch Processing
batch

Use XPath in PL/PGSQL for Batch Processing

A while ago I had to process XML loaded in a PostgreSQL database. The task was to extract references from a publication structure. Fortunately, PostgreSQL allows you to use XPath in plpgsql, but there are some things you need to be aware. First, you need to note all namespaces: nsarray
Mar 5, 2016 2 min read
Change Decimal Comma to Dot in Excel Mac
change

Change Decimal Comma to Dot in Excel Mac

TL;DR: There are two things you can do: 1. Change in Language & Region -> Advanced... 2. When converting a text to columns, you can specify the delimiter (Step 3 of 3 -> Advanced...) Regional settings The regional settings will affect all applications, not only Excel. Here
Mar 3, 2016 2 min read
← Newer Posts Page 16 of 26 Older Posts →
Laur's blog © 2026
  • Sign up
Powered by Ghost