Skip to content. | Skip to navigation

Personal tools
Log in
You are here: Home - Blog

Kritik, från bäst till sämst metod

Posted by admin |

Det finns en skala vad gäller kvalitet i debatt: Att säga att någon har fel i sak, att säga att någon är inkompetent, att säga att nån är dum i huvudet, och att säga att någon är köpt eller manipulerar för egen vinning.

Kritik, från bäst till sämst metod.
Säga att nån:

  1. Har fel i sak
  2. Är inkompetent
  3. Är dum i huvet
  4. Är köpt eller manipulerar för egen vinning
Aug 11, 2017 01:23

How to install TFHE homomorphic encryption & run the tutorial

Posted by admin |

How to install the TFHE Fast Fully Homomorphic Encryption over the Torus library and run its tutorial on Linux.

Make sure you have the dependencies, for ubuntu it is:

sudo apt-get install build-essential cmake

Download the tfhe source tarball, extract it and enter the top directory

mkdir build
cd build

Change "/home/jorgen/usr/local" to where you want your local install below:

cmake ../src -DCMAKE_INSTALL_PREFIX=/home/jorgen/usr/local
make install

Download the example files from

Make sure you have correct paths by making a script called "" with the following content:

#configure environment variables
TFHE_PREFIX=/home/jorgen/usr/local #the prefix where you installed tfhe

Run it from the terminal you are in with:


Enter the directory where the tutorial files are

Make a shell script called "" with the following contents:

g++ -o alice alice.c -ltfhe-spqlios-fma
g++ -o cloud cloud.c -ltfhe-spqlios-fma
g++ -o verif verif.c -ltfhe-spqlios-fma

chmod 755 alice
chmod 755 cloud
chmod 755 verif


Run it

Aug 06, 2017 02:15

How to move the close button to the right in Gnome (Ubuntu 17.04)

Posted by admin |

Tested by me:

gsettings set org.gnome.desktop.wm.preferences button-layout 'minimize,maximize:close'
Jun 30, 2017 12:46

An opinionated short guide on how to use Ansible

Posted by admin |

Only use files that end in ".yaml". Except for the ansible.cfg, which need to be in INI format.


There are playbooks which configure your servers. You can have one playbook which is basically empty and is just listing what other playbooks to call, in sequence. So let's call the main playbook "manage.yaml" and the other ones "stage1.yaml", "stage2.yaml" and so on which are just listed in "manage.yaml", one after the other.

- hosts: cluster
- include: ./stages/stage1.yaml nodes=cluster

These playbooks all take their configuration variables from something called the inventory.


The inventory can be specified on the command line with  the "-i" flag. Here is what an inventory file could look like for a testing setup:

      name: node1
      some_app_privKey: 3132333435363738393031323334353637383930313233343536373839303131
      some_app_pubKey: 02ee99c1a7f1defbf22c5c6c58f738755836a6797e45ce569ffb80428e7d07540e
      name: node2
      some_app_privKey: 3132333435363738393031323334353637383930313233343536373839303132
      some_app_pubKey: 03c7a5a5f02f132b6047ee6bfc8a0b01a2b9c3f28f914fae750faf0e35b5d03e7c

  vars: # common values for all nodes, can be put per node above too, if need be
    ansible_user: user        # user name
    ansible_ssh_private_key_file: "{{ inventory_dir }}/id_rsa"
    production: False


The inventory is just a list of whatever data you need to deploy: Ip numbers, private keys for signing stuff, public keys, config variables and so on.

Sub playbooks - stages

Each playbook contains steps, which are done in sequence, once for each server listed in the inventory.

For each step you can do a test if the step should run at all, then test if the step is already installed, and if not run the step. The step mutates the server in some way: Installs a package, configures a config file, or copies over some files, or starts/restarts a server process. That is about it.


- hosts: "{{ nodes }}"

  become: true
  - name: Update repositories cache and ensure "libpq-dev" package is installed
      name: libpq-dev
      update_cache: yes


At first, Ansible seems to be very smooth but there are some problems mainly with syntax where you have to do a bit of googling on how to do stuff.

Here is a list of my ansible problems, to date:

Jun 30, 2017 12:35

Formatting of HTML & Javascript for Sublime Text 3 & brackets indication

Posted by admin |

This is the one I want, HTML CSS and Javascript Prettify:


Bracket Highlighter BracketHighlighter - Packages - Package Control

Jun 01, 2017 12:25

Qubes OS - kort översikt

Posted by admin |

Qubes OS försöker göra din dator säkrare genom att isolera olika aktiviteter i egna virtuella maskiner. Till exempel kan man ha en virtuell maskin för jobb, en annnan för bankärenden och en tredje för slösurfning.

Qubes OS är baserat på Fedora Linux, men man kan köra t ex Debian inuti den. Jag har provat att köra Qubes OS på min laptop, på en USB-sticka. Det funkade bra. Qubes OS består av ett antal virtuella maskiner, och man gör egentligen inget arbete ute i värdsystemet. T o m nätverkskopplingarna ligger i en egen virtuell maskin, som de andra maskinerna kopplar sig genom. Man bör ha en del RAM och man kan installera Qubes OS på en 32GB USB-sticka (Installationen kräver minst 24GB) och testa först.

Så det yttersta systemet i Qubes OS är inte en virtuell maskin, utan värdsystemet, som är en del av Qubes OS. Detta värdsystem är byggt på Fedora.



May 26, 2017 09:05