Laur's blog
  • Home
  • About
  • Support my work
Sign in Subscribe
PyCharm: Change the location of .PyCharmXX
cache

PyCharm: Change the location of .PyCharmXX

In the good practice of IntelliJ application, PyCharm creates its own cache directory in your home. Mind you this can get really big (300Mb+) and if you sync your home with a networked drive, you'll get penalised (time-wise). Following this discovery (my login/logout time is up to
Oct 1, 2014 1 min read
Android Studio: Change the Cache Location (AndroidStudioBeta)
android

Android Studio: Change the Cache Location (AndroidStudioBeta)

Android Studio (AS) creates a directory .AndroidStudioBeta (which will likely be .AndroidStudio once it's launched officially). This happens for each user and looks like a cache directory, where local bits are stored. Unfortunately, the size of mine (after only a couple of projects) is of about 350Mb (1200+
Sep 30, 2014 1 min read
IntelliJ: Change the default cache location (e.g. .IntelliJIdeaXX)
cache

IntelliJ: Change the default cache location (e.g. .IntelliJIdeaXX)

Everything started from a problem I had with PyCharm, where it would create a ".PyCharm30" directory in my home, which would end up being about 300Mb, with a lot of files (2000+files, approx 200 directories). This gets taxed since my home dire gets synced at login/logout
Sep 30, 2014 1 min read
Android java.lang.VerifyError and Boilerplate code
android

Android java.lang.VerifyError and Boilerplate code

TL;DR: Change the java version compatibility in your gradle file (see below) or remove Hugo references from your e.g. "debug" code in Velcro. The other day I discovered a bunch of template-based application generators for android. While they are very interesting and apply some of the
Aug 19, 2014 1 min read
ELI5 - Injection Concepts
android

ELI5 - Injection Concepts

TL;DR: Injection is the process to automatically initialise variables (or parameters) when building an instance. I'we tried to wrap my head around dagger for a few days until I realised I was missing actually the concept of injections in java (to my defense, I stopped using recent
Aug 9, 2014 2 min read
ELI5 - Android and Java Libraries and Concepts
andriod

ELI5 - Android and Java Libraries and Concepts

These days I'm learning how to build an Android application. After building a step-by-step simple app (like a "Hello world!", but with lists and fragments), I wanted to go further and build something more complex, using afree tamplate. There are a lot of boilerplate templates for
Aug 8, 2014 1 min read
Android - Speed up Building with Android Studio and Gradle
android

Android - Speed up Building with Android Studio and Gradle

I've noticed that building a small application with gradle is slow (in my case because I'm only starting with Android development and I compile stuff way too often). One of the things I found online was a way to speed up building by using the gradle
Aug 5, 2014 2 min read
Python Tutorial - Guess a Number Game
basic

Python Tutorial - Guess a Number Game

A while ago I had a problem to solve: Write a program to guess a number between 1 and 1,000,000 in python. This is a simple learning program, done in high school or university, particularly when learning a programming language. The Problem The problem can be translated in
Aug 1, 2014 2 min read
Gradle and Proxy Authentication in Android Studio
android

Gradle and Proxy Authentication in Android Studio

Update: This is obsolete as Android Studio is going to eliminate JVM arguments for gradle. See this post for a more future-proof approach. The other day I did an exercise to install Android Studio ("AS" henceforth) (0.8.4 at the moment of writing) and create a project
Jul 28, 2014 2 min read
EPSO - Various Information and Tips
concours

EPSO - Various Information and Tips

Soon, I'll start writing various articles related to EPSO, with information and tips and tricks I've learned in the last years. TL;DR: Have a look at my EPSO-related site for some tips and other information on competitions. Who Here is some info about me on
Jul 28, 2014 1 min read
Load a CSV File with Header in Postgres via Psycopg
copy_expert

Load a CSV File with Header in Postgres via Psycopg

My task is to create a script to load a bunch of files into a DB model. The files are CSV, with quoted strings and headers. Postgres has a COPY command which I find fabulous for loading data. unfortunately, the psycopg implementations copy_from() , copy_to() and copy_expert() have
Jul 5, 2014 1 min read
Braindump: Use a Decorator to Time your Python Function
decorator

Braindump: Use a Decorator to Time your Python Function

In the programs I write these days I use timing methods to profile the code, mainly because I find it easier to split and sum deltas based on functions. For example, I have a script that loads an XML file, parses it into a relational-ish layout, and uploads the layout
Jul 4, 2014 2 min read
Braindump: Save State on Activity Rotation Lifecycle - Android
activity

Braindump: Save State on Activity Rotation Lifecycle - Android

Now I'm trying to write a (more complex) Hello World application for Android following a bunch of internet resources. I've read that an Activity has a life cycle (create/start/stop/resume/pause/destroy). This makes sense, because most UI elements (also in other frameworks) can
Jul 1, 2014 2 min read
Smart-Monitor your Site via e.g. Pingdom
devops

Smart-Monitor your Site via e.g. Pingdom

I use pingdom to check if one of my sites is up and running, getting an email if the root index.html page doesn't behave. I just read the single most interesting piece to use pingdom to check your whole site: I recommend creating an internal status page
Jun 20, 2014 1 min read
Fix Crazy/Jumping Cursor on a MacBook (Pro)
crazy

Fix Crazy/Jumping Cursor on a MacBook (Pro)

A couple of days ago, my baby managed to take a jab at my laptop (several actually), and hit the both keyboard and the trackpad. I don't know how, but this managed to get the cursor to jump all over the screen, some clicks triggered, some virtual screens
Jun 17, 2014 1 min read
Change a Domain Renewal Order on Blacknight Solutions
blacknight

Change a Domain Renewal Order on Blacknight Solutions

Recently I've received a renewal order for domain hosting on Blacknight. Last time, the domain was renewed last year and I wanted to renew it for a longer period (3 years). After a brief chat with the billing customer support, I've came up with a list
Jun 11, 2014 1 min read
Renew a Payment on Blacknight Manually
blacknight

Renew a Payment on Blacknight Manually

As part of making a multi-annual order for a domain (instead of single-year), I needed to create manually a domain renewal order. Here are the steps I used. First, log in onto your control panel (if you're not already logged in). Then, form the list of owned domains,
Jun 11, 2014 1 min read
Search exact string in a file on Windows
exact

Search exact string in a file on Windows

The other day I found a file with a peculiar format and I needed to find it again. There are two problems I've encountered: 1. Size: It's one of 20,000,000 XML files 2. Search: I need to find a file containing a string "
Jun 6, 2014 2 min read
Monument Valley
android

Monument Valley

Here's a catchy puzzle game. Love the perspective visual tricks and the Escher stuff! :)
May 29, 2014
Root a LG G2 on OSX
android

Root a LG G2 on OSX

I've got a LG G2 the other day to replace my old Galaxy Nexus (RIP). I've seen a lot of info about benefits of having different ROMs like Cyanogen, and I've decided to have a go. However, in order to do it, I needed
May 19, 2014 2 min read
Multipool.us APIs
api

Multipool.us APIs

Multipool is a multi-coin mining pool, capable of dynamically switching between currencies, to maximise the profitability. They offer an API which allows nice access to their data. Unfortunately, I've found that it's quite difficult to find what's what, so I've decided to
May 15, 2014 10 min read
Insert in PostgreSQL in (Almost) Constant Time
copy

Insert in PostgreSQL in (Almost) Constant Time

One of the things I did was to write a script to insert records in a PostgreSQL database. The records have with a quite simple structure: * id - char(20) * content - XML field * aside - XML field I was working with a sample of 10,000 entries out of
May 15, 2014 4 min read
PostgreSQL: Call a Stored Procedure for Every Row
call

PostgreSQL: Call a Stored Procedure for Every Row

I guess that newbies in PostgreSQL like me have first question when they create a store procedure: How do I call it? The answer is simple; you just execute SELECT your_procedure_name(parameters); Then, usually immediately the second question pops up: I wrote a procedure which I need to
May 13, 2014 1 min read
Formless Step in FormWizard
context

Formless Step in FormWizard

Sometimes you'd need to show a purely informational page as part of a FormWizard. As far as I could see, there are two solutions to the problem: 1. If the info is something like a summary, you have it available in the "success" page (the one
May 7, 2014 2 min read
Create Data Once in a FormWizard
data

Create Data Once in a FormWizard

At one of the sites I'm building I need to walk users through a registration process: 1. Select a supported tool 2. Generate an ID 3. Create a configuration based on the previous two steps To do this, I chose to use a FormWizard with three steps, one
May 6, 2014 2 min read
← Newer Posts Page 22 of 26 Older Posts →
Laur's blog © 2026
  • Sign up
Powered by Ghost