Archives 2005 - 2019    Search

Timothy Snyder: Europe, its past and what is its future?

published Sep 10, 2017 01:02   by admin ( last modified Sep 10, 2017 01:02 )

Snyder points out at the end that even if the EU is a great answer to problems of European history, it has not been that articulate about its future Timothy Snyder - Nations, Empires, Unions: European Integration and Disintegration Since 1914 - YouTube

This comes at the end, the whole talk which is from Oslo in 2014, is a great journey through the topic as defined in the talk's title.


Ubuntu 17.04 crashing hard - disable Chrome hardware acceleration

published Aug 20, 2017 05:50   by admin ( last modified Aug 22, 2017 12:37 )

Today my Ubuntu 17.04 crashed hard a couple of times. Even the cursor wouldn't move. After having restarted (again) I used journalctl on the command line, to view what were the messages from the previous boot.

journalctl -b -1

(You need to have journalctl configured to save log messages from previous boots, for this to work)

The very last message was in red and said:

RIP: gen8_ppgtt_alloc_page_directories.isra.38+0x115/0x250 [i915] RSP: ffffb88ac3aab880

I'm not initimately familar with the log severity codes, but RIP sounds likes it's Rest In Peace which might be a bit late in the chain for diagnostics. But there was a message also in red a bit higher up that began with:

kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
kernel: IP: gen8_ppgtt_alloc_page_directories.isra.38+0x115/0x250 [i915]

I googled that and found some ideas, one being to disable hardware acceleration in Google Chrome, since that seemed to trigger the bug. It seems to work!

See: Bug #1680904 “zesty unable to handle kernel NULL pointer derefer...” : Bugs : linux package : Ubuntu


How the extreme left turned to race in order to get rid of the center of politics

published Aug 19, 2017 04:50   by admin ( last modified Sep 17, 2017 10:05 )

The left has always had a problem demarcating to the extreme left. Although they all agree that communism was bad, they seem to have this lingering suspicion that maybe it was good, but just had a bit of bad luck. See for example the recent spate of articles in the New York Times (one example).

Sometimes the leftists' often reasonable actions and views, get hijacked by the extreme left and get tweaked into insanity, and then beamed back at the left.

But the left never, not even the extreme left, ever went for racism. Socialism and even communism is inherently anti-racist. In fact commies see all human individuals as replaceable, so race doesn't make sense. The left could argue for women, for workers, but it would not argue for race. After all the Soviet Union defeated the racist nazis, and although the Soviet killed massive amounts of their own people, it wasn't officially at least based on the principle that you were killed for your perceived race (I write "perceived" because it wasn't up to you to decide what or who you were; it was foisted upon you.).

However as time has gone by and no revolution in the West has turned up, the extreme leftists came to the conclusion that by focusing on race - the taboo subject - they could very well destabilize society in a quicker and more insidious way. Once the chaos arrives, they reason, they can take power and stamp out that pesky race thing which had then served its purpose. But in the history of communism and chaos, it seems to be a bit of a crap shoot: Sometimes the extreme right instead come out as winners, and go on to destroy civilization and society in their particular way.

By embracing race as a divider, the extreme left hopes to nurture the neo nazis and finally get rid of that pesky middle of the political field. They mimic their enemy, and the epic, final standoff should materialize. Although negative rights are important when working against racism, positive rights can be quite dangerous.

Part of the extreme left's success rests on the latent racism present in our societies. The extreme right most certainly do not need the extreme left to flourish it seems, but it does not mind being cast into a nemesis role. This is a war on the political center, coordinated between communists (turned race baiters) and neo nazis.

The solution is to be resistant to thinking in terms of race. Whenever you're tempted to think in terms of race, think in terms of marginalization and lack of opportunities for individuals, not collectives of a certain race, and watch out for discrimination, racist or otherwise. Resist racism when you see it and call it out. And focus on supplying opportunities and justice, i.e. freedom.

Race is bullshit, individuals are not.

 


Accidentally social entrepreneur

published Aug 17, 2017 01:10   by admin ( last modified Aug 20, 2017 05:59 )

Photo from a recent party of ours, © Mikael Ståldal

To be a true entrepreneur, there should be a legacy, something that continues after you quit. It seems I made it, in the unexpected field of sobriety, joy and dancing, of all things.

Five years ago we started monthly sober Saturday night dancing parties in Stockholm. Two weeks ago, after about 60 parties averaging around 150 jolly dancers each, I called it quits.

But the Men Dansa party machine will go on without me. It's cooperative, value driven and supported by many. Here is my thank you note on Facebook:

 

And come to think of it. I do not own Facebook, but I do own my blog. so here comes a copy of the message in text format:

After five years of Men Dansa parties I have decided to step down and let Men Dansa continue with its current strong lineup of board members, organizers and volunteers. 

And remember, due to the sheer number of motivated people involved, the parties will continue to be just as awesome :)

I took the initiative to and then co-founded Men Dansa with Janne Pettersson and Mikael Ståldal. This is more than five years ago now. We started the Men Dansa as a non profit organisation and decided that Men Dansa should be built on voluntary work, including ourselves: The only one who gets paid is the accountant. If we get a surplus at the end of the year, we donate it. So far it has been to “Cancerfonden” each year. 

Through the years hundreds of volunteers, dozens of organizers and teachers and DJs, and a bunch of board members have helped making the Men Dansa parties the most open, cozy and welcoming Latin dance parties in Stockholm ( in my humble opinion :) ).

We wanted to get new people into the fantastic Latin dance culture where alcohol can not only be absent, but is truly irrelevant, and where drunkenness – given the complexity of the dances we offer – becomes impossible. We wanted to give a solid alcohol free Saturday night alternative to hanging out at drinking places.

Me stepping down is not due to any conflict, it’s rather that I think that we have a really strong lineup of organizers and members of the board, so I feel that I can leave and the show will go on. This will be a very managed handover. In fact I have tried to wind down my participation for some time!

There are so many people I would like to thank: The board and organizers warrant a special mention. You guys – past and present – are ultimately the guys that define the organization. In my experience the volunteers at these passionate dance parties, the organizers, dance teachers, DJs, and all the people who have handled the door & the food – in all we are talking of hundreds of people – are some of the nicest people I’ve met. I’d like to thank you all for having created such great parties together with me and all our guests!!


Internet (som det används nu) balkaniserar Sverige

published Aug 11, 2017 11:19   by admin ( last modified Aug 11, 2017 11:19 )

Internet kan användas på olika sätt. Man kan kommunicera med människor med tusentals olika åsikter och läsa texter med lika många olika perspektiv.

Men ett annat sätt använda Internet är att kommunicera med dem som tycker likadant som en själv. Och det är där de flesta av oss hamnar. Det är ju inte precis så att man letar upp folk man inte gillar och blir Facebook-vänner med dem.

Detta gör att man smygande börjar få en lite felaktig bild av världen. Man tror att folk är mer som man själv än vad de egentligen är. Man snackar ihop sig. Och man känner mindre behov av att prata med och förstå andra människor bara för att de finns i ens fysiska närhet. Ju mer ihopsnackad man blir med sina vänner och bekantskaper, desto konstigare framstår "de andra".

Men dessa "andra" människor kommer att fortsätta att finnas runt omkring en. Och när deras åsikter och ens egna åsikter blir alltför annorlunda, när var och en seglar ut i sitt eget sociala nätverk, då smäller det förr eller senare mellan dessa grupper.

Förut hade vi TV och tidningar. Dessa gav ofta en felaktig bild, men det var en bild som vi alla delade.

Strax efter klockan 20 igår gick jag och en kompis vid Slussen i Stockholm. Ett halvdussin polisbilar med påslagna sirener for förbi oss. Senare förstod vi att de ingripit vid en attack mot afghaner på Mynttorget. Dessa afghaner protesterar mot beslut att de ska skickas tillbaka till Afghanistan. När de fredligt protesterar mot detta beslut blir de attackerade av nynazister.

Och det slog mig ikväll, hur når man dessa nynazister? Och jag insåg att det kan bli svårt. De har säkert sina egna sociala nätverk, sina egna texter och det gör att de kan bli ännu mer extrema. För det som är extremt börjar uppfattas som normalt. För tjugo år sedan hörde jag en märklig konversation bland några unga människor som gick förbi mig, den gick så här:

-Vi tog taxi hem

-Men blir inte det väldigt dyrt?

- Nä vi gasa han [tårgas, min anmärkning].

- Vem?

- Taxichauffören

- Varför det?

- Det är billigare.

Och jag tänkte att detta var personer för vilka ett kriminellt beteende var normaliserat. De hade egna normer. Men på den tiden, för 25 år sedan var de ändå en liten kriminell grupp vars normer och världsbild snart skulle komma att slås sönder när de splittras och sugs upp i större sociala nätverk. Men idag kan väldigt avvikande normer hållas levande via våra bubblor på Internet.

Jag tror följande behöver göras:

  • Vi måste ha en ordningsmakt som är en självklar del att se i vardagen. Vi måste ha vänliga patrullerande poliser, i princip allestädes närvarande. När människor kan segla ut i fantasterier på Internet om hur världen fungerar, behövs det några ute i den fysiska världen som förankrar dem i att bete sig som folk.
  • Vi vanliga människor måste ta tag i folk och prata med folk som vi normalt sett inte umgås med. Att gå runt utan att behöva växla några ord med andra, är i och för sig många Stockholmares våta dröm (och kanske även i andra delar av landet), men man kan inte ignorera den fysiska verklighet man lever i. Det är den fysiska verkligheten som kan bli farlig för dej, inte text och bilder på Internet från dina vänner. Ja det kommer att bli ytligt, det blir ansträngda leenden och ytliga sociala aktiviteter tillsammans med folk man knappt känner. Men det måste nog till. Vi måste umgås mer.

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

published Aug 11, 2017 01:23   by admin ( last modified Aug 11, 2017 01:23 )

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

How to install TFHE homomorphic encryption & run the tutorial

published Aug 06, 2017 02:15   by admin ( last modified Aug 08, 2017 11:28 )

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
make install

Download the example files from

https://tfhe.github.io/tfhe/assets/data/samples.tar.gz

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

#configure environment variables
TFHE_PREFIX=/home/jorgen/usr/local #the prefix where you installed tfhe
export LIBRARY_PATH=$LIBRARY_PATH:$TFHE_PREFIX/lib
export C_INCLUDE_PATH=$C_INCLUDE_PATH:$TFHE_PREFIX/include
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$TFHE_PREFIX/include

Run it from the terminal you are in with:

. initialize.sh

Enter the directory where the tutorial files are

Make a shell script called "run.sh" 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

./alice
./cloud
./verif

Run it

. run.sh

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

published Jun 30, 2017 12:46   by admin ( last modified Jun 30, 2017 12:46 )

Tested by me:

gsettings set org.gnome.desktop.wm.preferences button-layout 'minimize,maximize:close'

An opinionated short guide on how to use Ansible

published Jun 30, 2017 12:35   by admin ( last modified Jun 30, 2017 12:39 )

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

Playbooks


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.

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:

cluster:
  hosts:
    192.168.0.79:
      name: node1
      some_app_privKey: 3132333435363738393031323334353637383930313233343536373839303131
      some_app_pubKey: 02ee99c1a7f1defbf22c5c6c58f738755836a6797e45ce569ffb80428e7d07540e
    192.168.1.86:
      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.

(stage1.yaml)

- hosts: "{{ nodes }}"

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

Problems


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:


Link: Transcript of Rich Hickey's talk on complexity

published Jun 26, 2017 01:50   by admin ( last modified Jun 28, 2017 08:23 )

Re-using the word "complect" among other things:

 

talk-transcripts/SimpleMadeEasy.md at master · matthiasn/talk-transcripts


CopperHead OS - an attempt to make a secure Android

published Jun 18, 2017 10:58   by admin ( last modified Jun 18, 2017 10:58 )

FHNW/collective.clipboardupload: Allows uploading images into Plone site by pasting them into TinyMCE WYSIWYG editor

published Jun 03, 2017 12:22   by admin ( last modified Jun 03, 2017 12:22 )

Link: Guide to installing Qbuntu (Ubuntu 16.04) TemplateVM in Qubes 3.2

published Jun 03, 2017 05:55   by admin ( last modified Jun 03, 2017 05:59 )

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

published Jun 01, 2017 12:25   by admin ( last modified Jun 01, 2017 06:01 )

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

https://packagecontrol.io/packages/HTML-CSS-JS%20Prettify

 

Bracket Highlighter https://packagecontrol.io/packages/BracketHighlighter BracketHighlighter - Packages - Package Control


Qubes OS - kort översikt

published May 26, 2017 09:05   by admin ( last modified May 27, 2017 02:02 )

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.

 

 


News tells us what causes the Venezuela crisis

published May 23, 2017 12:32   by admin ( last modified May 23, 2017 12:32 )

News tells us what causes the Venezuela crisis, well at least some news does. You have to dig a bit.

People are prevented to cooperate and create value, to the point of starvation and under abundant abuse by criminals and people turned criminals.

Many news articles seem to miss that point. Here is a recent BBC article that barely mentions the economic situation as behind the turmoil, truly remarkable: Venezuela crisis: What is behind the turmoil? - BBC News

Let's dig a bit deeper and start with CNN Money:

4 reasons why Venezuela became the world's worst economy - Oct. 25, 2016

Two reasons could be valid as causing the others and the crisis:

  • Government spending
  • Price controls

Time Magazine is starting to give some answers Venezuela Government to Blame as Economic Situation Worsens:

Venezuela depends on oil for about 96% of export earnings and nearly half its federal budget. When prices were high, policymakers could have created a rainy-day fund. Some of that money went toward lifting poor people from poverty, but much was stolen: Venezuela is the most corrupt country in the Americas and the ninth most corrupt in the world, according to Transparency International.

Ok, so they used oil money to run the state and when that got less, there was less money for handouts and subsidies.

The Guardian gives more hints Venezuela's worsening economic crisis – the Guardian briefing:

Chávez build his popularity on oil money and foreign debt, using both to fund consumption, while nationalising more than 1,200 private companies deemed not to be functioning in the public interest.

So 1200 companies were nationalised.

The overall themes seem to be two:

  • Reckless spending that has put people in a position of dependency, and when that spending dries up, people have no means, networks, trust in each other or experience to cooperate around creating value
  • An obsession with control, that puts people in charge who are incompetent and corrupt, and price controls that make it impossible to sell imported stuff at market value

To summarize these two themes, it's about preventing people to cooperate and create value, to the point of starvation and abundant abuse of people by criminals. I talked to some Venezuelans about two years ago here in Sweden and they told me how bad the situation was then for their loved ones. I cannot imagine how bad it is now.

 


Memory for different window managers and desktop environments

published May 22, 2017 01:55   by admin ( last modified May 22, 2017 02:00 )

Memory requirements of different window managers and desktop environments on Linux (a bit old)

 

Source cmp-all4.png (PNG Image, 698 × 690 pixels)


Ansible variables that tells you the location in the controller's file system

published May 08, 2017 10:40   by admin ( last modified Jun 30, 2017 12:44 )

Taken from here, where there is a list of many more variables in Ansible: lorin/ansible-quickref: Quick reference for Ansible variables

  Description
playbook_dir Directory that contains the playbook being executed
inventory_dir Directory that contains the inventory
inventory_file Host file or script path (?)

If you are using included playbooks, playbook_dir get really confused. It will report a path such as:

/home/use/playbook_dir/./sub_playbook_dir

You can truncate the path to before the dot, with a filter, like this:

"{{ playbook_dir | regex_replace('(/\\./.*)', '')  }}

How to loop over hosts data from a Yaml file in Ansible

published May 03, 2017 06:40   by admin ( last modified May 03, 2017 08:46 )

I had an inventory file in this format in Yaml:

cluster:
  hosts:
    192.168.0.79:
      name: node1
    192.168.0.86:
      name: node2

 

And I want to loop over the names of all hosts when processing each host.

This seems to work in the playbook:

- hosts: cluster
  tasks:
  - debug:
      msg: "Computer is {{ hostvars[item]['name'] }}"
    with_items: "{{ groups['cluster'] }}"

This threw me a bit, albeit I am new to Ansible. It seems to me that the Yaml structure in the inventory file implies that there is a one key dictionary (to use python lingo, which is appropriate I believe for Ansible). So something like this:

{'cluster':
    {'hosts':
        {'192.168.0.79':
            {'name':'node1'},
         '192.168.0.86':
            {'name':'node2'}
        }
    }
}

However looking at the working code in the playbook, first it seems to be wrapped in a magical key "groups" (maybe this is standard for inventory files, I don't know), then you get the next magical variable "item" which points to the key of the dictionary under "hosts" which means we have somehow jumped past "hosts". Ok, so can I get deeper into the data with item? Nope, that's it. But wait, maybe it is treated as a name space so I can just write {{name}}? Yay it works! No, wait that is the wrong name. It is the name of the host I am configuring.

 


Nikola - a blog generator which site gives a favorable impression

published May 02, 2017 11:05   by admin ( last modified May 02, 2017 11:05 )

Now how's that for depth in research :)

 

Static Site Generator | Nikola