New gadget – Dynam USB RC

Arrived yesterday after a three weeks trip from Hong Kong.


Nothing fancy, but works great with Freerider FPV on Linux — trims neutral, Mix off, Gear/Pit neutral, plug in before launching Freerider, calibrate in game before starting the sim. All the channels should be aligned at the start in the game’s calibration screen, if they aren’t check the switches and restart Freerider.

Compared with flying my Hubsan X4 (expert mode off) the response of the sim copter is less rubbery (maybe latency is not modeled?). Unlike on Hubsan’s RC, throttle control (up-down on left lever) is stepped. I still have to fly the Hubsan with proper trimming — which I’m learning to do quickly with the sim — and expert mode on.

Enter future here

Q. Do you ever end up reading/thinking about stuff like the heat death of the universe or Earth
being destroyed by red giant Sun and causing you to have an existential crisis? I somehow manage to do this to myself a few times a year.

Fran Ontanaya: No. Hypothesis about the future five billion years into the future are still just speculation. You
couldn’t pick something more uncertain to be existential about. Some people get existential about that thinking
humanity would still be sitting on their asses on Earth to watch the Sun inflate.

Entropy describes the universe as a dumb, inanimate system. To put it in an extreme, imagine each photon was sentient, and could decide upon spawning to fly towards the center of the universe. Someone would observe it and say, everything tends to revert to the Big Bang. That universe would be anti-entropic — it would return always to a higher order state. Now, there’s no sentience in photons that we know of, but since we are here, we do know our universe doesn’t completely lack sentience. So the future is unclear.

I’ve even seen people be existential about the notion of becoming immortal — as in, existing too much. That’s when I get really Spock-faced. Existentialism is the failure of imagination.

List of transhumanist websites

Taken from here with CC By-SA license:

Transhumanism Websites

  1. ACN Newswire (
  2. Adam Ford (
  3. ASU Transhumanism (
  4. Ben Goertzel (
  5. Big Think (
  6. BlogKinnetic (
  7. CARTA (
  8. Diginomics (
  9. Do The Math (
  10. Eliezer S. Yudkowsky (
  11. Extropy Institute (
  12. Fernando Pizarro (
  13. Fusion (
  14. The Future Of Human Evolution (
  15. Futureseek Link Digest (
  16. H+ Magainze (
  17. The Hedonistic Imperative (
  18. Humanity+ (
  19. Institute For Ethics And Emerging Technologies (
  20. Institute For Social Futurism (
  21. Io9 (
  22. Jason Silva (
  23. Joao Pedro De Magalhaes (
  24. Juice Rap News (
  25. Journal Of Evolution And Technology (
  26. Kurzweil (
  27. LessWrong (
  28. Metanexus (
  29. MIT News (
  30. The National Bureau Of Economic Research (
  31. Nautilus (
  32. Nick Bostrom (
  33. Orion’s Arm Universe Project (
  34. Science, Technology And The Future (
  35. Singularity Hub (
  36. The Singularity Is Near (
  37. Singularity Symposium (
  38. Singularity University (
  39. Singularity Weblog (
  40. Technological Singularity Subreddit (
  41. TED (
  43. Transhumanism And Transhumanist Art (
  44. Transhumanism Meetups (
  45. Transhumanism Subreddit (
  46. The Transhumanist Party (
  47. Transhumanist Party Australia (
  48. Transhumanist Party Blog (
  49. What Is Transhumanism? (
  50. Wired (
  51. World Transhumanist Association (
  52. Zoltan Istvan (

Posting multipart content with PHP and cURL

Recently we had a situation in which a user needed by the end of the day to have their PHP platform submit files directly to a form with login tokens, so I supplied him with a snippet to do so.

The backend (Django) is developed by our engineers and I had no prior knowledge of this piece of UI, so the first part took some source inspection and checking the POST request log on Firebug, to find out if it needed any extra fields or headers.

Next thing was to write a simple cURL function for the user (reusability/tests etc. weren’t the concern here, just keeping it down to the minimum). In our case the data passed in the cookies was enough and it didn’t require to add any extra headers.

function curlPost($url, $authcookie, Array $data) {
    $cr = curl_init();
    curl_setopt($cr, CURLOPT_COOKIE, $authcookie);
    curl_setopt($cr, CURLOPT_URL, $url);
    curl_setopt($cr, CURLOPT_POST, 1);
    curl_setopt($cr, CURLOPT_POSTFIELDS, $data);
    curl_setopt($cr, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($cr);
    return $result;

The user already had a solution for getting the credentials and the only thing needed was passing them:

$id = somenumber;
$token = 'sometoken';
$uuid = 'someuuid';
$sid = 'somesessionid';

$url = "{$id}/submit/";
$authcookie = "uuid={$uuid}; sessionid={$sid}; token={$token}";

The form sends both a file and the token in the same POST request. To make it simpler we used a PHP 5.5+ object called CurlFile:

$data = array(
        'token' => $token,
        'thing' => new CurlFile('/path/to/my/')

$result = curlPost(

The content type is automatically set to multipart/form-data and CurlFille fills in the rest of the headers for the file submission, including the file size.

Finally I posted to a file on the local server containing:


to check that all the request contents were there.

Broken mysql server: Can’t open and lock privilege tables

After a series of bad hard reboots mysql stopped working on my Ubuntu 15.04 install, with this showing up on /var/log/mysql/error.log:

[ERROR] Fatal error: Can't open and lock privilege tables: Incorrect file format 'user'

Trying to purge and reinstall mysql server packages didn’t work, and the reinstall would hang up when trying to restart the service. The blocking error is not in the packages, configurations, folder permissions or apparmor settings — it’s actually the folder that contains the data /var/lib/mysql being corrupted and hanging up everything else.

Before going on a “forum fixes” wild ride, back up /var/lib/mysql, nuke it, purge mysql-server and mysql-server-5.6, reinstall mysql-server and mysql-server-5.6 and run sudo service mysql start.

After that it’s all about restoring the databases and skipping whatever is broken.

Makes you wonder why couldn’t it be handled more gracefully — last thing you want on Linux is a hung up apt-get process.