Skip to content. | Skip to navigation

Personal tools
Log in
Sections
You are here: Home

jorgenmodin.net - Blog

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

Posted by admin |

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

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

News tells us what causes the Venezuela crisis

Posted by admin |

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.

 

May 23, 2017 12:32 | Comments (13)

Memory for different window managers and desktop environments

Posted by admin |

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

 

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

May 22, 2017 01:55

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

Posted by admin |

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 (?)

 

May 08, 2017 10:40

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

Posted by admin |

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.

 

May 03, 2017 06:40

Nikola - a blog generator which site gives a favorable impression

Posted by admin |

Now how's that for depth in research :)

 

Static Site Generator | Nikola

May 02, 2017 11:05
Ads