[manjaro] installation fails, unknown public key

January 17, 2018 Leave a comment

I couldn’t update a package due to the following error:

==> Validating source files with sha256sums...
    gcc-7.2.1-20171224.tar.xz ... Passed
    gcc-7.2.1-20171224.tar.xz.sig ... Skipped
    isl-0.18.tar.bz2 ... Passed
==> Verifying source file signatures with gpg...
    gcc-7.2.1-20171224.tar.xz ... FAILED (unknown public key BBE43771487328A9)
==> ERROR: One or more PGP signatures could not be verified!
==> ERROR: Makepkg was unable to build mingw-w64-gcc.
==> Restart building mingw-w64-gcc ? [y/N]
==> --------------------------------------
==> ==> ERROR: unable to update

I asked this on reddit and /u/SuperGrip kindly provided the solution:

This is a common issue when an apps key is not included in the ArchLinux Keyring, to solve this issue you can add the key manually by running the following command: gpg --recv BBE43771487328A9

For further information check the package comments on the AUR site. https://aur.archlinux.org/packages/mingw-w64-gcc/

Categories: manjaro Tags: , , , ,

DigitalOcean has new droplet plans

January 17, 2018 Leave a comment

DigitalOcean has some new droplet plans (more info here). The cheapest droplet was 5 USD, and you got 512 MB RAM and 20 GB SSD for this price. Now, for the same price you get 1 GB RAM and 25 GB SSD.

If you have a standard droplet, you can upgrade it for free. I did it today and it was just one click :) Of course, I made a snapshot first, but the upgrade went smoothly, so after some testing I removed the snapshot.

If you want to try DigitalOcean, here is my referral link: https://m.do.co/c/01da80980c60. If you sign up through this link, you also support me :)


Categories: linux Tags: ,

Books for Professionals

January 5, 2018 Leave a comment

See http://books.goalkicker.com/. Simply awesome! All books are free. The Python book is 700+ pages for instance.

Categories: book Tags: ,

Software Carpentry

January 3, 2018 Leave a comment

Software Carpentry is a community of volunteer instructors who teach short workshops and develop lessons which empower researchers of all disciplines to learn about and improve the ways in which they create software and collaborate.” (source)

I found them today: https://github.com/swcarpentry/swcarpentry . Looks good!

Getting started on Twitter

January 2, 2018 Leave a comment

You have a site and you want to create a Twitter site for it too where you want to send posts, probably in an automatic way.

If you have a gmail account, you can use it to create several Twitter accounts. The trick is to make the e-mail addresses different with a dot. Example: myself@gmail.com and my.self@gmail.com . If you send an e-mail to these addresses, they’ll arrive in the same mailbox, though Twitter treats them as two different addresses.

Then, follow the steps at https://python-twitter.readthedocs.io/en/latest/getting_started.html to register your app.

Sample Python code
Here is a simple example to post a tweet:

#!/usr/bin/env python3

import config as cfg
import tweepy

def get_api(cfg):
    d = cfg.twitter_keys
    auth = tweepy.OAuthHandler(d['consumer_key'], d['consumer_secret'])
    auth.set_access_token(d['access_token'], d['access_token_secret'])
    return tweepy.API(auth)

def main():
    api = get_api(cfg)
    tweet = "just a test"
    status = api.update_status(status=tweet)    # update_status -> send a tweet

if __name__ == "__main__":
Categories: python, web Tags: , , , ,

[VS Code] When commenting a line, move the cursor to the next line

January 2, 2018 Leave a comment

In IntelliJ IDEA, when you comment a line, the cursor is moved automatically to the next line. This way it’s very easy to comment several lines. In VS Code the cursor stays on the same line. How to copy the behavior of IntelliJ?

I asked this question on reddit, and /u/AlGonzalez kindly gave me the solution:

Use the geddski.macros extension to bind the two commands to a key combo:

Add the following macro to settings.json:

  "macros": {
    "commentLine": [

Then map a key in keybindings.json:

    "key": "ctrl+numpad_divide",
    "command": "macros.commentLine",
    "when": "editorTextFocus && !editorReadonly"
Categories: Uncategorized Tags: , ,

[mongo] Upgrade to version 3.6

January 1, 2018 Leave a comment

Under Manjaro, my MongoDB 3.4 was upgraded to version 3.6 and it stopped working. Great!

In the log file I found this error: “IMPORTANT: UPGRADE PROBLEM: The data files need to be fully upgraded to version 3.4 before attempting an upgrade to 3.6; see http://dochub.mongodb.org/core/3.6-upgrade-fcv for more details.

Visiting the link in the error message, it was suggested to execute a DB command in the mongo shell. But the Mongo server was not willing to start, thus I couldn’t connect to it with the Mongo shell!

So I downgraded to version 3.4 just to be able to start the Mongo shell and execute the command “db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )“. Now I upgraded MongoDB to version 3.6 and it started happily.

Categories: linux, manjaro, mongodb Tags: ,