Pass Through a Corporate Proxy in Java

Posted by in Software, Tutorial

TL;DR: There’s no easy way to create a proxy 🙂 I’ve tried for a while to build a way to request something through a proxy, for testing an emulated android app. The solution came from Octavian who kindly provided me a snippet to run once per app lifetime. It tackles the problem from two fronts: Sets proxy system properties (http.proxy* and https.proxy*) Sets the default Authenticator The code is:

One thing that can be improved would be a configuration-based (e.g. defined environment variable) bypass code, rather than a hostname…read more

Get all Proposal Names from the Participant Portal

Posted by in Software, Tutorial, Uncategorized

I’ve found out the participant portal for H2020 offers an API. This is quite neat as one can integrate with the data, e.g. by reading and listing the calls. I’ve written a proof of concept to list all calls from this and last years. First, we load the data in a JSON object:

Then, we extract the year:

Lastly, we iterate through all calls and extract the ones we need:

For the calls API, you can have access to the following information (fields): CallIdentifier FileName – e.g….read more

Inject Proxy Settings in Selenium/Chrome

Posted by in Software, Tutorial

I have the following situation: I’m behind a corporate proxy and I need to run a test accessing an external website. To do this, I’ve picked up chrome/chromium as driver of choice. My current solution implies an authentication via plugin. The plugin The chrome plugin is essentially 2 files: a manifest file a JS containing a listener Manifest The manifest file is:

The script Following script performs the proxy authentication:

,where the PROXY_* variables are the components of the proxy URL. Plugin The plugin is created by zipping…read more


Move SQL Developer Data from the Roaming Profile in Windows

Posted by in IT

TL;DR:: Set up IDE_USER_DIR. I have to keep my roaming profile on a diet and this means moving a bunch of default directories around. The latest victim is SQL Developer According to this post, the environment variable to be changed is IDE_USER_DIR. From the post: According to documentation, the IDE_USER_DIR is picked up automatically if set, so there should be no need for an additional conf file set statement in any recent SQL Developer release. If this doesn’t work, you may try editing config files around as described in the…read more

AppleIntelSKLGraphicsFramebuffer – Kernel panic with Intel530

Posted by in Hardware, IT

TL;DR: My solution was to just set the DVMT (Dynamic Video Memory Technology) to 64M. YMMV though… Yesterday I decided I want to start building a hackintosh to replace my old mac mini. My system has the following components: Asus Maximus Hero VIII Alpha 16 GB of RAM I6700k Some SSDs, HDDs and a NVMe I chose not to get a graphics card since the nice ones are both expensive (600+ for a GTX1080) and unsupported (there are reports of RX480 working-ish). So, for the time being I’m stuck with…read more

BIOS Loads from 0x7c00

Posted by in Software, Tutorial

Today I was investigating a bug where a simple program wasn’t executing properly. It emerged that BIOS loads the code from the MBR at 0x7c00. Relevant info reproduced here: The (legacy) BIOS checks bootable devices for a boot signature, a so called magic number. The boot signature is in a boot sector (sector number 0) and it contains the byte sequence 0x55, 0xAA at byte offsets 510 and 511 respectively. When the BIOS finds such a boot sector, it is loaded into memory at 0x0000:0x7c00 (segment 0, address 0x7c00). (However,…read more

Set Different Gradle Configurations

Posted by in IT, Tutorial

TL;DR: create a global file (in <HOME>/.gradle or GRADLE_USER_HOME if defined). Place there the system specific configuration. The other day I had the unpleasant surprise that Android Studio replicated my proxy settings into and got committed to Git. Including a password (which has since became obsolete). Since my other environment doesn’t use a proxy, I got an error there. Now, the question became: How do I create a single project gradle settings file which would allow me to run smoothly in both places? Although I thought of a…read more

Migrate Chromium and Keep all Settings

Posted by in IT, Tutorial

TL;DR: Backup App Data\Local\Chromium on your old machine, copy it to your new one and uncompress (in the same place), install Chromium, profit. With the migration to a new computer, I’ve managed to keep all my Chromium settings. The steps I did are the following: On the old computer Note the chromium version you’ve installed Go to App Data\Local Archive the Chromium directory Note: this might be huge! To reduce it, clean the Chromium\User Data\Default\Cache Note the plugins (optional) – this might be useful if you have plugins depending on…read more

Install and Use Package Control Behind Proxy

Posted by in IT, Tutorial

TL;DR: Install Package Control manually. Add the proxy settings to the configuration file as described in step 2 below. Today I’ve had to install Sublime Text 3 again on a new computer. Package control didn’t want to install due to my proxy settings (I was getting a 407 error code – Proxy authentification required). I managed to do it with two simple steps: Install Package Control manually. At the time of writing this post, the process is simple: Click the Preferences > Browse Packages… menu Browse up a folder and…read more