HOME BLOG

Incredible Brick Breaker 2.1.0 is Launched for Android!

Posted on: July 9th, 2018 by Olu No Comments

We’ll like to announce that Incredible Brick Breaker 2.1.0 has been released for Android. This is a major update. It features improved ball control to allow you finish levels faster and in a more fun way. It also features a leaderboard to record your high scores and help you compare your high scores with your friends.

As always, we like to know what you think about the game. Feel free to contact us. And if you haven’t yet installed the game, get it from Google Play.

How to fix NullPointerException RoboVmRunProfileState.startProcess error of RoboVM iOS not starting

Posted on: June 10th, 2018 by Olu No Comments

Hi folks,

Here I describe quickly how to fix a problem of RoboVM iOS not running on Android Studio. The error in question is one of the form:

Couldn't start application
java.lang.NullPointerException
 at org.robovm.idea.running.RoboVmRunProfileState.executeRun(RoboVmRunProfileState.java:57)
 at org.robovm.idea.running.RoboVmRunProfileState.startProcess(RoboVmRunProfileState.java:126)
...

 

According to a RoboVM issue page, the problem seems to be due to some FacetManager component markup present in ios.iml. The markup looks like:

 

<component name="FacetManager">
    <facet type="android-gradle" name="Android-Gradle">
      <configuration>
        <option name="GRADLE_PROJECT_PATH" value=":ios" />
      </configuration>
    </facet>
    <facet type="java-gradle" name="Java-Gradle">
      <configuration>
        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
        <option name="BUILDABLE" value="true" />
      </configuration>
    </facet>
  </component>

 

Removing the markup solves the problem.

Till next time.

How to Access USB Stick from Terminal on Ubuntu

Posted on: April 14th, 2018 by Olu No Comments

In this article I go over how to access a USB stick from the terminal on Ubuntu.

 

1. Find what the drive is called
You’ll need to know what the drive is called to mount it. To do that run one of the following commands:

lsblk
sudo blkid
sudo fdisk -l

 

You’re looking for a partition that should look something like: /dev/sdb1. Find it and remember what it’s called.

 

2. Create a mount point (optional)
This needs to be mounted into the filesystem somewhere. You can usually use /mnt/ if you’re being lazy and it isn’t already used, otherwise create a new directory using a command like:

sudo  mkdir /media/usb

 

3. Mount device

sudo mount /dev/sdb1 /media/usb

 

4. Unmount device
When you’re done using the device, run the following command:

sudo umount /media/usb

 

References

1. command line – How to access a usb flash drive from the terminal? – Ask Ubuntu. https://askubuntu.com/questions/37767/how-to-access-a-usb-flash-drive-from-the-terminal

How to run a script on start up on Ubuntu

Posted on: April 1st, 2018 by Olu No Comments

Hi folks,

In this short article,  I will briefly describe how to set a script to run on reboot.

An easy way to do this is to edit /etc/rc.local, add a line to execute your script, the save and close the file.

Now you can test it works by restarting your computer and verifying it works.

That’s all for now. Till next time.

DiffPDF – A tool for comparing PDF files

Posted on: February 21st, 2018 by Olu No Comments

Hi folks,

I just want to talk a bit about a handy tool I tried recently. It’s called DiffPDF and, as the name implies, it helps you compare PDF files for textual differences. It is provided by Qtrac Ltd.

I tried it because I had two large PDF files generated by a similar process and wanted to see if they were identical. DiffPDF did a decent job at comparing the two files. It gives a page-by-page analysis of the comparison so you can easily view at a glance what pages differ. The user interface is quite intuitive and the application is easy to use.

You can try out the application free using a trial license by going to Qtrac’s website http://www.qtrac.eu/diffpdf.html and downloading an appropriate version. After 20 days, a license is needed.

One downside I can see for this app is that it only supports Windows.

So, if you ever need to compare PDF files quickly, try DiffPDF. That’s it for now.

How to Completely Uninstall PyCharm on macOS

Posted on: February 21st, 2018 by Olu No Comments

Hi folks,

Quick tip today. I will share how to completely uninstall PyCharm on a Mac. Why may you want to do this? The other day there was an issue with my PyCharm installation. It was always getting stuck on ‘Indexing…’ on opening a particular project. So, I thought, perhaps installing a fresh updated copy will help. Here are the steps I followed to completely uninstall the existing copy:

1. Go to Applications > right click PyCharm > move to trash

2. open a terminal and run the following: find ~/Library/ -iname “*pycharm*”

verify that all of the results are in fact related to PyCharm and not something else important you need to keep. Then, remove them all using the command: find ~/Library -iname “*pycharm*” -exec rm -r “{}” \;

I was able to install a new version and it worked like a charm. That’s all folks.

Sources

Complete uninstall on Mac – IDEs Support (IntelliJ Platform) | JetBrains. https://intellij-support.jetbrains.com/hc/en-us/community/posts/206593875-Complete-uninstall-on-Mac

How to make MacOS Remember your SSH Passphrase

Posted on: February 18th, 2018 by Olu No Comments

Hi folks,

Here’s a quick tip on how to make your macOS remember SSH passphrases. If you use public/private key authentication to access servers, you probably wouldn’t want to have to enter the passphrase every time you access the server. To make your client store the passphrase, all you have to do is enter the following into  ~/.ssh/config



Host *
    UseKeychain yes


Once you do this, you would need to enter the passphrase once and afterwards it will be remembered. This was tested on macOS High Sierra.

That’s all for now. Happy coding.

 

Sources

macOS keeps asking my ssh passphrase since I updated to Sierra. https://superuser.com/questions/1127067/macos-keeps-asking-my-ssh-passphrase-since-i-updated-to-sierra

Introduction to PhantomJS

Posted on: March 14th, 2017 by Olu No Comments

Hi folks,

In this post I briefly go through how to navigate pages using PhantomJS perhaps while writing automated UI tests, scraping web pages, etc. To facilitate this we will use the example code supplied by PhantomJS itself [1].

 

Let’s look at the first chunk of the code

"use strict";
var sys = require("system"),
    page = require("webpage").create(),
    logResources = false,
    step1url = "http://en.wikipedia.org/wiki/DOM_events",
    step2url = "http://en.wikipedia.org/wiki/DOM_events#Event_flow";

if (sys.args.length > 1 && sys.args[1] === "-v") {
    logResources = true;
}

In the first line we create an object of sys module which we use later on to check the number of arguments. That’s useful if your script is going to accept arguments. The important bit, though, is the page = require(“webpage”).create() line. That creates a page.

 

Next, to open a page, we use code like

 

setTimeout(function() {
    console.log("");
    console.log("### STEP 1: Load '" + step1url + "'");
    page.open(step1url);
}, 0);

 

That is, we call open() method on the page object. Notice how we wait for 0 seconds before making this call. For subsequent calls one waits for longer periods of time.

 

Next, to click a line on a page, we can use code like

setTimeout(function() {
    console.log("");
    console.log("### STEP 3: Click on page internal link (aka FRAGMENT)");
    page.evaluate(function() {
        var ev = document.createEvent("MouseEvents");
        ev.initEvent("click", true, true);
        document.querySelector("a[href='#Event_object']").dispatchEvent(ev);
    });
}, 10000);

 

Notice how we create a MouseEvents object and call initEvent method on that object, passing “click” to it. Then we dispatch the event on the selector we want to click.

 

Finally, in a PhantomJS script, it’s good to close out the page and exit PhantomJS. We do that using code as shown below:

setTimeout(function() {
    console.log("");
    console.log("### STEP 5: Close page and shutdown (with a delay)");
    page.close();
    setTimeout(function(){
        phantom.exit();
    }, 100);
}, 20000);

 

To see a more full-fledged example, check out Amir Duran’s excellent example of using PhantomJS to log in to Amazon [2]. The PhantomJS website [3] also has lots of good examples demonstrating usage. That’s all for now. Happy coding.

 

References

1. Page Events example. https://raw.githubusercontent.com/ariya/phantomjs/master/examples/page_events.js.

2. How to login Amazon using PhantomJS – Working example | Code Epicenter.
http://code-epicenter.com/how-to-login-amazon-using-phantomjs-working-example/

3. Examples | PhantomJS. http://phantomjs.org/examples/

Bash Scripting Introduction

Posted on: February 17th, 2017 by Olu No Comments

Hi folks, this article is meant to be a really short introduction to Bash.

First, what is Bash? Bash is a Unix shell and command language developed by Brian Fox for the GNU Project as a free software replacement for the Bourne shell [1]. Bash is the default shell on most Linux and macOS systems. Bash has even been ported to Windows as it is supported natively in Windows 10 and through Cygwin and MinGW. A Bash script is a file containing one or commands and can be very useful to automate commands that you may otherwise have to type out yourself each time on a terminal. Without further ado, let’s dive in.

 

Interpreter Directive

A common way to write Bash scripts is to add an interpreter directive as the first line of the file, e.g.
#!/bin/bash

This way, once the file is made executable, a user can execute the file directly from a terminal and it will be executed with Bash automatically.

 

Variable assignment

Variable assignment is done as follows:

x="some tuff"

Note that there shouldn’t be space between the letter and the = sign.

Referencing variables
y=$x

E.g.

x=5
y=$x
echo y is $y

 

If conditions

Here is an example of how to write an if statement.

if [ $x == "some stuff" ]
then
echo some stuff
fi

 

If/else conditional statement

if [ $x == "stuff" ]
then
echo some stuff
else
echo some other stuff
fi

 

If/else if/else clause

if [ $x == "foo" ]
then
echo some stuff
elif [ $x == "bar" ]
then
echo some other stuff
else
echo the last stuff
fi

 

Arrays
myArray=(1 2 3)

 

While Loop Through an Array

myArray=(1 2 3)
count=0
while [ "x${myArray[count]}" != "x" ]
do
echo element is ${myArray[count]}
count=$(( $count + 1 ))
done

 

You can find much more details in Mike G’s excellent BASH Programming website [2].

 

References

1. Bash (Unix shell) – Wikipedia. view-source:https://en.wikipedia.org/wiki/Bash_(Unix_shell) [16/02/17].

2. BASH Programming – Introduction HOW-TO. http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html [16/02/17].

Incredible Brick Breaker 1.2. is Launched

Posted on: January 11th, 2016 by Olu No Comments

Hi folks,

We’ll like to announce that Incredible Brick Breaker 1.2 has been released. This is a minor update and contains a fix for the bug where the app crashes on navigating from the Main Menu to the About page and back to the Main Menu. Some usability improvements were also implemented.

As always, we like to know what you think about the game. Feel free to contact us. And if you haven’t yet installed the game, get it from Google Play.