How To: Use Adblock to Support Creators & Improve the User Experience

This post relates to my blog entry Advertisements & The Internet (AdSense & Adblock) which briefly discusses the benefits of advertisements to content creators of all kind.

You do not need to remove your ad-blocker to support content creators, it’s actually very easy to allow only certain non-intrusive advertisements through without having to allow those stupid online casino pop=ups! Below I have put together brief tutorials for a few of the most popular ad-blocking software out there to help you help me…

AdBlock

AdBlock is my current ad-blocker of choice and I was surprised at how easy it was to allow a few advertisements through it’s massive sweeping net.

  • Right click on the AdBlock symbol towards the top right of your browser & select Options
  • In the tab that opens, remove the tick from the checkbox for Allow some non-intrusive advertising

That’s it. You’re done. No popups and some minor little adverts around that’ll help those that you support.

Update 21/11/16: I have seen that this does not actually allow adverts through, what you may need to do is click the AdBlock symbol & select “Disable AdBlock on this Domain”

AdBlock Plus

AdBlock Plus actually allows non-intrusive advertising by default, however, the way to enable/disable that feature is pretty much the same as the method mentioned above.

The people over at AdBlock Plus have a great mentality regarding acceptable advertisements, stating:

We believe that this initiative is a sustainable middle ground between the user’s choice to use ad blockers and the continued need to support free online content with advertisements. In general, an Acceptable Ad is a non-animated ad, clearly labeled as such, that does not interrupt reading flow.

Through user surveys taken over many months they were able to draw up some guidelines for acceptable ads and implemented these guidelines into their software. This gives both the content creator & the user a better online experience!

For more information on what defines acceptable ads, check out AdBlock Plus’ page on the topic.

Found this helpful? Please share!

Advertisements & The Internet (AdSense & Adblock)

I recently applied for Google AdSense due to the hosting of a website being a costly investment. With AdSense I am able to place advertisements on my site which are targeted at each individual visitor. Now that I have been accepted & verified to the program I have placed multiple advertisements through my site in hopes of being able to recover some of my costs from hosting this site.

Personally, I have no problem with advertisements as long as they’re not intrusive (video ads, hundreds of ads cluttering content, pop up windows & opening additional tabs) however I am aware that some people despise adverts or just wish to avoid them entirely by using browser extensions that filter ads, such as, Adblock Plus for Chrome.

When using ad-blocking software it will most likely improve your general user experience but at a cost to the content creators. Many people rely on revenue from running advertisements, whether it be on their personal website or their YouTube account, to sustain their content and maybe even their lives. Filtering out these advertisements is a loss in revenue to those hosting their content. For example, most ad-block software will prevent advertisements running before YouTube videos allowing you to jump straight into the video you want to watch but AdSense knows when an advert is being blocked leading to the revenue that would have been generated being binned.

There are alternatives to running advertisements which many content creators pursue, things like:

  • Accepting donations / Amazon wishlist purchases
  • Using Patreon to reward investors
  • Hiding content behind paywalls (membership to access site content)
  • Stealing from banks

Ok. Maybe that last one isn’t an alternative, but… you get the gist! As with advertisements, these alternatives have their advantages & disadvantages which I’m not going to thoroughly explore in this post.

If you’d like to help support my site but you are currently running a form of ad-blocker then please check out my guide “How To: Use Adblock to Support Creators & Improve the User Experience“.

 

Found this helpful? Please share!

Software Spotlight: FreeStudio

This is the first in a new series of blog posts where I’ll bring to light some of the great applications and software out there that’s worth the disk space!

Quick Details

Name: FreeStudio
Publisher: DVDVideoSoft
Supported Platforms: Windows (10, 8, 7, Vista, XP SP3)
Site Link: http://www.dvdvideosoft.com/free-dvd-video-software.htm

What is it?

Ever wanted to watch a film on your PS3 or iPad and found it’s in an unsupported format? Want to download that YouTube video for offline viewing? How about managing your uploads to sites like YouTube & Facebook?

FreeStudio is an amazing conversion suite that offers an array of tools that allow you to:

  • Upload & download YouTube videos in many major formats (intuitive UI that allows download of many YouTube links at once)
  • Burning/Ripping tools for DVDs & CDs
  • Video conversion utilities (convert to iPod, PSP, Blackberry & more supported formats)
  • Basic video & photo editing

Installation

With FreeStudio being freeware (thank you DVDVideoSoft!) it costs you nothing to download and install it… However this does not mean there aren’t a few things to watch out for. DVDVideoSoft need to profit from such an awesome piece of software so they partner with other companies to package things like toolbars & other software within the FreeStudio installer. Don’t let that put you off though, FreeStudio can be installed without all the other guff both quickly & easily.

  • First of all, go to the link mentioned above and hit the blue Download button
  • Launch the downloaded .exe file to begin the installation
  • On the first window click Next to move to the first stage of installation
  • Keep the default installation location unless you have some personal preference and then click Next
  • The next window will be titled “Install Additional Software”, on here you want to select “Click here to customise the installation”  for each item that’s displayed and remove the tick from the checkbox (unless you really want ByteFence & Chromium…?!?)
  • Once you’ve removed the additional software click Next
  • The software will now download & extract the latest version of FreeStudio for installation

The software is now installed and you should be able to use the conversion utilities to your heart’s content!

Found this helpful? Please share!

Game Update: Dandromeda

It’s been a while since I’ve uploaded a newer version of Dandromeda because I’ve been busy working on a few new features. It’s definitely been too long since an update but the new features are as follows:

  • Added life counter system
  • Added soundtrack & sound effects (soundtrack courtesy of Jay Franks, sound effects thanks to bfxr.net)
  • Added new ship designs (available from the Options menu)
  • Added difficulty increase (more meteors as you progress!)

Development on Dandromeda isn’t over yet! In the next few weeks I’ll be adding:

  • Power ups
  • Ship stats (different speeds & damage thresholds)
  • More Dansteroids

On another note, I attempted to integrate a global high score system into the game to inspire a bit of competition but found myself hitting issue after issue. From the looks of things I’ll need to develop a tiny server outside of GMS to store the scores. As great as it would be to have a high score system it is too much hassle for this game, however, I definitely want to create more HTML5 games which would require high-score systems so will look into it eventually.

If you have any comments or feedback on Dandromeda please do leave them below or comment over on the Dandromeda game page.

Found this helpful? Please share!

How To: Initialise a Local Git Repository & Connect to Remote BitBucket Repository

If you’re wanting to start a software project with version control then git is probably the system you want to be using. This guide will help you setup a local git repository for your project and connect it to your repository on bitbucket.org!

– Create local repository

[stuart@asuka git-test]$ git init
Initialized empty Git repository in /home/stuart/PROGRAMMING/git-test/.git/

– Link local repository to BitBucket (you will need to create a repository on bitbucket before this step)

[stuart@asuka git-test]$ git remote add origin ssh://git@bitbucket.org/username/repository.git

– Add remote ssh key to bitbucket account

Go to https://bitbucket.org/account/user/username/

Select SSH Keys

Click Add Key

Set Location name to the machine hostname or something that will let you be able to identify the key entry

Copy the contents of ~/.ssh/id_rsa.pub into the Key section (if you don’t have a public key then one can be generated with ssh-keygen -t rsa)

– Configure global email & username settings (I recommend that you use the same email address as your BitBucket account for clarity)

[stuart@asuka git-test]$ git config --global user.email "email address"
[stuart@asuka git-test]$ git config --global user.name "name"

– Commit an initial file (the file must exist in the project directory)

[stuart@asuka git-test]$ git add file
[stuart@asuka git-test]$ git commit file -m "Initial Commit"
[master (root-commit) ae183f2] initial commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file

– Push to the BitBucket repository

[stuart@asuka git-test]$ git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 205 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To ssh://git@bitbucket.org/username/repository.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.
Found this helpful? Please share!

How To: Download Entire Website with HTTP & Form-Based Authentication

I was recently in the position where I wanted to download many articles from a website… This sounded easy enough and from looking online it seems there are bunch of CLI & GUI utilities that can sort this out, to name just a few:

The main issue I kept facing was with authentication. I had tried this sort of thing with wget before but had no luck getting the authentication to work. The same issues occurred when I was trying to use HTTrack (except this time it was issues with the proxy server configuration defaulting to IPv6).

Finally, I decided to go back to wget to hopefully get this download to work…

Setup

Before I could start downloading I needed to make sure I could access the site with authorisation via wget (downloading hundreds of “You’re Not Authorised to View This Page” pages doesn’t sound like my cup of tea). The site I was accessing had both HTTP & form based login, that is, a pop=up that asks for user details and a form in the website to enter the username and password.

The info you’ll need is:

  • The URL of the login page
  • The value name of the username box
  • The value of the password box

To identify the names of the form elements in order to pass the correct information to wget. This can be done through a web browser by right-clicking and selecting Inspect (Chrome) / Inspect Element (Firefox) on the username & password box (as demonstrated in the screenshots below). What you need to get is the value name for both fields.

right-click-inspect

Initial Authentication

To make sure that the wget command is authenticated for the recursive download we need to obtain & store the cookie. I won’t go into depth with an explanation of cookies but I’m sure you’ve seen many “This site uses cookies” messages online. Basically it’s a locally stored authentication token which removes the requirement to login again if you’ve only recently left & revisited a site.

– Generate cookies.txt file containing the cookie data (replace username= & password= after –post-data with the value names collected earlier)

wget --save-cookies cookies.txt --keep-session-cookies --user="My HTTP Username" --password="My HTTP Password" --post-data "username=MyFormUsername&password=MyFormPassword" http://www.awebsite.co.uk/login.php

Make sure to replace My HTTP Username, My HTTP Password, MyFormUsername, MyFormPassword & http://www.awebsite.co.uk/login.php with the info collected earlier!

Preventing Logouts

A big issue I hit when running this download was that I’d get a few pages downloaded before getting many pages of “You are unauthorised to view this page”. The wget recursion will follow any and all links within the site… including logouts!

This took a bit of trial and error to sort out but eventually I managed to workaround this issue. What you’ll need to do is identify the logout links on the page (either through looking around your website with a web browser or by running wget and looking for any URLs with logout in them). The download command is detailed in the next section.

A directory is created with the website name, you’ll want to touch the files which have logout in the name so that wget will avoid following those links. Example file tree below:

- awebsite.co.uk
  +---- Special:Userlogout
  \---- index.php?title-Special:Userlogout

When I tried the above method it allowed me to get further through the download but I eventually started hitting more logout pages. Depending on the site it may be easier to just touch one or two logout files to alleviate the issue however there were hundreds of links on my site so I took a look back at the wget arguments and found the following was able to exclude all pages that include the word logout:

--reject-regex "(.*)logout(.*)"

Downloading Site

The command used to download the site will run recursively so you’ll have a lot of data to process once the command has exited.

wget --reject-regex "(.*)logout(.*)" -m -c --content-disposition --load-cookies cookies.txt --user="My HTTP Username" --password="My HTTP Password" http://www.awebsite.co.uk/

Output Data

With the site I had downloaded I had ended up with the files in XML format. I was only looking for the content of the article so wrote some wrapper scripts to strip out the tags and remove the parts of the file I don’t need, I won’t disclose this script here as it’s very specific to the site & data I was using but some additional tips are below:

– Remove XML tags with sed (replace webpage.html with the filename to run the command on)

sed -e 's/<[^>]*>//g' webpage.html

 

If you have any feedback or issues regarding this guide then please let me know in the comments!

Found this helpful? Please share!

How To: View & Undo Yum/DNF Commands

Want to see what has recently been installed? Has an update just broken your X server? Then you’ve come to the right place!

In this brief how to I will be explaining the fundamentals of viewing & undoing yum/dnf updates on an RPM-based Linux distro.

What Is Yum? What is DNF?

Yum (Yellowdog Updater, Modified) is the package manager for RPM based distros like CentOS & Fedora, it can be used to install, update and remove packages on the systems. The main benefit of yum over the standard RPM utilities is that it seeks out dependencies to reduce the risk of breaking your system. As of Fedora 22, DNF (Dandified Yum) has become the default package manager, replacing yum whilst retaining similar, but improved, functionality. The DNF command itself works incredibly similarly to Yum so moving from one command to the other is rather easy!

In this article I use the dnf command but you can replace dnf with yum if you’re running an older version of CentOS/Fedora.

View History

– View list of transactions

[stuart@asuka ~]$ sudo dnf history
ID     | Command line             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    46 | install httraqt.x86_64   | 2016-10-17 15:16 | Install        |    1   
    45 | install httrack.x86_64   | 2016-10-17 14:17 | Install        |    1   
    44 | update spotify           | 2016-09-26 12:05 | Update         |    1   
    43 | install Downloads/SOFTWA | 2016-09-23 11:31 | Install        |    1 EE
    42 | install java-1.8.0-openj | 2016-09-23 11:28 | Install        |    3   
    41 | update java              | 2016-09-23 11:27 | Update         |    2   
    40 | reinstall icedtea-web    | 2016-09-23 11:08 | Reinstall      |    1 EE
    39 | remove jre-1.7.0_51      | 2016-09-23 11:07 | Erase          |    1 EE
    38 | reinstall icedtea-web.x8 | 2016-09-23 11:05 | Reinstall      |    1 EE
    37 | install icedtea-web.x86_ | 2016-09-23 11:02 | Install        |    7 EE
    36 | remove icedtea-web       | 2016-09-16 11:46 | Erase          |    7  <
    35 | update spotify           | 2016-08-17 12:58 | Update         |    1 > 
    34 | install icedtea-web.x86_ | 2016-08-16 16:52 | Install        |    7

The above command output has been stripped down to show a few parts of the history. As you can see, any transaction is logged, not just installs & updates.

View Details of Transaction

– View details of transaction (using ID from previous command output)

[stuart@asuka ~]$ sudo dnf history info 45
Transaction ID : 45
Begin time     : Mon Oct 17 14:17:46 2016
Begin rpmdb    : 2307:e53988d93aa852086c981c3ba998e011cd8dc4d8
End time       :            14:21:22 2016 (216 seconds)
End rpmdb      : 2308:32a323e0478b458c74e9600ab5266f373badb04f
User           : Stuart Franks <stuart>
Return-Code    : Success
Command Line   : install httrack.x86_64
Transaction performed with:
    Installed     dnf-1.1.10-1.fc23.noarch        (unknown)
    Installed     rpm-4.13.0-0.rc1.13.fc23.x86_64 @updates
Packages Altered:
    Install httrack-3.48.22-1.fc23.x86_64 @updates

As you can see, the only alteration was that the package httrack was installed into the system. More complex transactions will show the dependencies installed as well, see the below example for the installation of icedtea-web (a package for running Java web applications).

Transaction ID : 37
Begin time     : Fri Sep 23 11:02:49 2016
Begin rpmdb    : 2297:a73b3ab5c399514bd42d7c3c1841e4bb2f006c88
End time       :            11:03:12 2016 (23 seconds)
End rpmdb      : 2304:80d53902f883c9b5880eed00e9ec826a687f6edc
User           : Stuart Franks <stuart>
Return-Code    : Success
Command Line   : install icedtea-web.x86_64
Transaction performed with:
    Installed     dnf-1.1.10-1.fc23.noarch        (unknown)
    Installed     rpm-4.13.0-0.rc1.13.fc23.x86_64 @updates
Packages Altered:
    Install hawtjni-runtime-1.10-5.fc23.noarch @fedora
    Install icedtea-web-1.6.2-1.fc23.x86_64    @updates
    Install jansi-1.11-9.fc23.noarch           @fedora
    Install jansi-native-1.5-9.fc23.x86_64     @fedora
    Install jline-2.13-1.fc23.noarch           @updates
    Install rhino-1.7.7-2.fc23.noarch          @fedora
    Install tagsoup-1.2.1-10.fc23.noarch       @fedora
Scriptlet output:
   1 the primary link for libjavaplugin.so.x86_64 must be /usr/lib/mozilla/plugins/libjavaplugin.so
   2 warning: %post(icedtea-web-1.6.2-1.fc23.x86_64) scriptlet failed, exit status 2

The above output shows that multiple packages were installed as well as detailing the warning/error messages from the RPM scriptlets.

Undo Transaction

– Undo transaction (using ID from the first command output)

[stuart@asuka ~]$ sudo dnf history undo 42
Last metadata expiration check: 2:12:00 ago on Tue Oct 18 11:40:58 2016.
Undoing transaction 42, from Fri Sep 23 11:28:28 2016
    Install giflib-4.1.6-14.fc23.i686                               @fedora
    Install java-1.8.0-openjdk-1:1.8.0.102-1.b14.fc23.i686          @updates
    Install java-1.8.0-openjdk-headless-1:1.8.0.102-1.b14.fc23.i686 @updates
======================================================================================================================================================
 Package                                        Arch                    Version                                     Repository                   Size
======================================================================================================================================================
Removing:
 giflib                                         i686                    4.1.6-14.fc23                               @fedora                      86 k
 java-1.8.0-openjdk                             i686                    1:1.8.0.102-1.b14.fc23                      @updates                    503 k
 java-1.8.0-openjdk-headless                    i686                    1:1.8.0.102-1.b14.fc23                      @updates                    101 M

Transaction Summary
======================================================================================================================================================
Remove  3 Packages

Installed size: 102 M
Is this ok [y/N]:

Undo Fails

Note: This section currently only applies to CentOS.

If you’re undoing a transaction that upgraded a package instead of installing a package then the package manager needs to be able to locate an older version of each package. This can be done by enabling the vault repository for your distribution as explained below (OS used in example is CentOS 6.5).

– Create new repository file

vim /etc/yum.repos.d/CentOS-Vault.repo

– Populate with the following information

[C6.5-base-vault]
name=CentOS-6.5 - Base - Vault
baseurl=http://vault.centos.org/6.5/os/x86_64/
enabled=1

The undo command should now be able to find the appropriate packages to roll back to.

Found this helpful? Please share!

Reducing the Cost of CFD Hardware – TotalSim Blog

I’ve been quite busy recently with going to Download 2015 and currently in the process of moving out so haven’t had many chances to update the website.

This is just a quick post to let you know that a blog post I wrote for where I work (TotalSim Ltd) went live at the beginning of this month.

The blog post regards what considerations are made at TotalSim to reduce the costs of our components for cluster builds.

You can read the full post here – http://www.totalsimulation.co.uk/wp/reducing-costs-cfd-hardware/

Stu.

Found this helpful? Please share!

How To: Custom Nvidia Resolution on Linux

We recently bought a GTX 780 at work. My boss was interested in utilising the 4k (4096×2160) capabilities of the card so gave me the task of setting this up.

The machine that has the 780 doesn’t have a screen attached so making it even start the X window system without a screen needed some trickery (using edid).

I thought that custom resolutions on linux with nvidia cards would be a common setup but after some internet searching I was unable to find anything except people on forums trying to reach a solution.

After some playing around, the solution was a lot simpler than I expected.

First of all, in a terminal, create a modeline for your desired resolution:

cvt 4096 2160

Which will give you an output like the one below:

# 4096x2160 59.98 Hz (CVT) hsync: 134.18 kHz; pclk: 760.00 MHz
Modeline "4096x2160_60.00"  760.00  4096 4432 4880 5664  2160 2163 2173 2237 -hsync +vsync

Open up /etc/X11/xorg.conf with your favourite text editor (my preference being vim) and do the following:
– In Section “Monitor” add

Modeline "4096x2160_60.00"  760.00  4096 4432 4880 5664  2160 2163 2173 2237 -hsync +vsync

– In Section “Screen” add

Option        "UseDisplayDevice" “none”

– In Subsection “Display” add:

Virtual        4096 2160

Restart the X window system:

/sbin/init 3

/sbin/init 5

The above solution has been tested on Centos6.3 running the Nvidia 331.10 graphics driver. You can do any custom resolution you want, just replace 4096 with your desired width and 2160 with your desired height. Just make sure it’s a resolution supported by your graphics card!

Found this helpful? Please share!