Update your Nikon DSLR firmware on Ubuntu

I’ve just invested in a new DSLR, a Nikon D750. One of the first things I do after unboxing it, is to update its firmware to the latest version, to have the latest functionalities and fixes.

Ubuntu (and other Linux distributions) is, as often, forgotten by these major manufacturers, who only provide Windows and Mac OS solutions.

To update the firmware on a Linux distribution:

  • download the Windows updater (F-D750-V110W.exe) from the Nikon download center
  • extract the content of the exe file, which is actually a rar archive: unrar e F-D750-V110W.exe
  • copy the content of the archive (D750_0110.bin) on an SD card, and put it in the slot 1 of your camera
  • in the Setup menu of your camera, select “Firmware version” and follow the on-screen instructions to complete the firmware update
  • once the update is complete, turn the camera off and remove the card
  • delete the bin file from your card

And voilà, your Nikon DSLR has the latest firmware!

No tips yet.
Be the first to tip!

Like this post? Tip me with bitcoin!

1GNVaSvTfP3ojgzCe8P3o5mTj2uSUD2FGr

If you enjoyed reading this post, please consider tipping me using Bitcoin. Each post gets its own unique Bitcoin address so by tipping you're not only making my continued efforts possible but telling me what you liked.

OVH awesome database backups

Yesterday, I made a huge mistake while testing a new version of my RSS syndication application: I ran the installation script, which has the effect of (re)creating all the tables used by the application.

This has reminded me of 2 things:

  • an installation script should not wipe existing tables, at least not without warning the user
  • a backup strategy would not be the worse idea

But knowing that and having a solution to my current problem are two completely different things.

Fortunately, OVH (the hosting service I’m using) are awesome, and allow you to retrieve a backup of your database, either from yesterday or from last week.

To create a dump of your database, connect to your hosting with SSH, then enter the following command:

mysqldump --host=your_host --user=your_user --password=your_password --port=3307 your_bdd > mybackup.sql

Port 3307 is used for yesterday’s backup, port 3317 is for last week’s.

This will create a dump of your database in the file mybackup.sql. To import it back, enter:

cat mybackup.sql | mysql --host=your_host --user=your_user --password=your_password your_bdd

And voilà, your database is back to the state it was in yesterday.

No tips yet.
Be the first to tip!

Like this post? Tip me with bitcoin!

1x7d9oGVqGxFvJj9yHRADoV1C4NAdywGG

If you enjoyed reading this post, please consider tipping me using Bitcoin. Each post gets its own unique Bitcoin address so by tipping you're not only making my continued efforts possible but telling me what you liked.

152311

No tips yet.
Be the first to tip!

Like this post? Tip me with bitcoin!

15djKcZ9T8xLYMe1dYgpUJMafJB9EtvWwT

If you enjoyed reading this post, please consider tipping me using Bitcoin. Each post gets its own unique Bitcoin address so by tipping you're not only making my continued efforts possible but telling me what you liked.

Libération, ou la double facturation

Libération, ou la double facturation

Un petit billet d’humeur aujourd’hui, et plus précisément de mauvaise humeur.

J’ai repéré aujourd’hui sur Twitter un article sur Jérémie Zimmermann, de la Quadrature du Net, et l’ai mis de côté pour le lire plus tard. Il s’agit de cet article: Jérémie Zimmermann, réseauteur du réseau.

En rentrant chez moi, j’ouvre le lien, commence à lire le premier paragraphe, et là…

Il faut payer maintenant !

Ok, Libé a décidé de faire payer la consultation des articles sur son site. Je ne suis pas un grand fan de cette technique de financement, mais je comprends, les journaux papier se font concurrencer par les sites internet gratuits, et ils justifient ces abonnements par une information “de qualité” (ceci n’est pas un jugement de ma part, mais un des arguments des sites de presse payants).

Par contre, ce que je n’apprécie pas (du tout), c’est de voir, quelques lignes plus bas :

Eh oui, des pubs

Alors non, Libé, soit vous faites payer vos abonnés pour accéder aux articles, soit vous vous financez par de la pub, mais pas les deux a la fois. Si je tombe sur un article que je ne peux pas lire sans payer, je ne veux pas voir de pub sur cette même page ! Surtout quand il s’agit d’un immense bandeau, et pas d’un petit encart discret.

No tips yet.
Be the first to tip!

Like this post? Tip me with bitcoin!

17uoSMYSbXTKQgmojHHcdQQryWzA87sW4U

If you enjoyed reading this post, please consider tipping me using Bitcoin. Each post gets its own unique Bitcoin address so by tipping you're not only making my continued efforts possible but telling me what you liked.

Moving a PHP project to Composer

A few months ago, I’ve discovered Composer, which is a dependency manager for PHP (you can compare it to Maven, for Java). With Composer, you can simply checkout the main project, and install the dependencies.

The transition to a Composer project is very easy, so I decided to start using Composer in my ComicsCalendar project. In this post, I’ll explain how you can migrate to Composer for a very simple project (in this case, using PropelORM to access your databases).

The project structure at the start of this work is:

- comicslist
    - application
        + build
        + config
        + controllers
        + helper
        - plugins
            + propel
              recaptchalib.php
        + views
          build.properties
          propel-gen
          runtime-conf.xml
          schema.xml
    + static
    + system
      .gitignore
      .gitmodules
      .htaccess
      index.php

1. Install Composer

It’s really easy to install Composer. Just follow the instructions on the official documentation.

In the following commands, I’ll assume that you’ve installed Composer so you can run it with:

$ composer

2. Create the setup file

Each Composer project requires a composer.json file. This file (equivalent to the pom.xml file for Maven), contains a list or the project dependencies (and lots of other things I won’t mention here).

Create a composer.json file at the root of your project:

{
    "require": {
        "propel/propel1": "1.7.1"
    }
}

As you can guess, this will install version 1.7.1 of PropelORM.

This is the only dependency you will install right now (Composer automatically installs the dependencies of your dependencies).

3. Install the dependencies

To install the dependencies, run from the project root:

$ composer install

This command created the vendor folder (if it doesn’t exist), and the vendor/autoload.php file, which contains the list of files to include into the project.

4. Include the dependencies in the project

The work is almost done, you just need to include the dependencies in your project. As I just explained, the file vendor/autoload.php contains the dependencies you need to include.

Just include this file in any “global” PHP file:

<?php
require_once('vendor/autoload.php');

5. Clean-up the project

The last action is to clean-up the project from the previous Propel installation. Remove the application/plugins/propel folder (which contains the old Propel classes), the .gitmodules file (which contains references to the Git sub-modules), as well as the reference to the main Propel script (which is now referenced in the autoload.php file).

6. Configure Git

If you’re using Git to track your sources, you’ll need to add a few changes to your project.

Add a .gitignore file at the root of the vendor folder, containing:

*
!.gitignore

This will allow you to commit the vendor folder, without any sub-folders (those will be re-created when running $ composer install).

You also need to add the composer.json and composer.lock files. The composer.lock file contains the actual versions of all your dependencies (since you can specify ranges in the versions), so someone who installs the dependencies will have the same versions as you do.


You’re now ready to keep using PropelORM, and add new dependencies that could help you (yes Monolog, I’m looking at you…).

No tips yet.
Be the first to tip!

Like this post? Tip me with bitcoin!

16XaKtprp6XZkfnND1cFRxqewmpEvahiLz

If you enjoyed reading this post, please consider tipping me using Bitcoin. Each post gets its own unique Bitcoin address so by tipping you're not only making my continued efforts possible but telling me what you liked.