Blog

  • Fifty

    Between birth and death,
    Three in ten are followers of life,
    Three in ten are followers of death,
    And men just passing from birth to death also number three in ten.
    Why is this so?
    Because they live their lives on the gross level.

    He who knows how to live can walk abroad
    Without fear of rhinoceros or tiger.
    He will not be wounded in battle.
    For in him rhinoceroses can find no place to thrust their horn,
    Tigers no place to use their claws,
    And weapons no place to pierce.
    Why is this so?
    Because he has no place for death to enter.

    Lao Tzu Tao Te Ching translated by Gai-Fu Feng and Jane English

  • Advanced Bash-Scripting Guide

    An in-depth exploration of the art of shell scripting

    Mendel Cooper

    This tutorial assumes no previous knowledge of scripting or programming, but progresses rapidly toward an intermediate/advanced level of instruction . . . all the while sneaking in little nuggets of UNIX® wisdom and lore. It serves as a textbook, a manual for self-study, and as a reference and source of knowledge on shell scripting techniques. The exercises and heavily-commented examples invite active reader participation, under the premise that the only way to really learn scripting is to write scripts.

    This book is suitable for classroom use as a general introduction to programming concepts.

    Advanced Bash-Scripting Guide dyhr.com
    Advanced Bash-Scripting Guide freecode.org (original)

  • My Mac OS X Desktop icon’s Disappeared

    Today suddenly all icon’s on my Mac OS X Desktop disappeared or went missing and showed only the default icons. When I opened the Console app and searched for the icon process I saw messages like this:

    24/11/13 13.36.30,122 com.apple.IconServicesAgent[262]: main Failed to composit image for binding VariantBinding [0x34b] flags: 0x8 binding: FileInfoBinding [0x253] - extension: jpg, UTI: public.jpeg, fileType: ????.

    Ahh…. it’s the  “com.apple.IconServicesAgent” who is the culprit.

    Well, I just removed the “Finder” preference file in my home folder and restarted Finder.

    $ rm ~/Library/Preferences/com.apple.finder.plist; sudo killall -v Finder

     

  • How to install Lubuntu Server on Cubietruck from Mac OS X

    This is how to install and set-up the latest Lubuntu software pack on to the NAND Flash on the Cubietruck  from a Mac OS X computer.

    mac_cubietruck

    Cubietruck

    The Cubietruck is a 5V 2A single-board computer “SBC” / PC on Board “PCB” – much like the Raspberry Pi that has taken the World with a craze – but the Cubietruck is just faster, better and stronger..  In realty Cubietruck is more like a real Mini PC.

    The Cubietruck is based on the dual core Cortex-A7 (912MHz each) ARM  Allwinner  CPU with 2 GB Ram. Cubietruck has 8 GB onboard bootable NAND flash memory and it is expandable with a micro sdcard up to 32GB. You can connect a monitor/TV via the VGA or HDMI interface. The Cubietruck comes equipped with both Wifi and Bluetooth, Gigabit Ethernet, 2 USB 2.0, 1 Micro USB, OTG, SPDIF, IR, and Headphone. You can easily add a and fit a 2.5 inch Hard Disk Drive to the Cubietruck out the box. Power:DC5V @ 2.5A with HDD and support Li-battery & Real Time Clock “RTC”.

    The Cubitruck was released for sale on the 31th. of October 2013 from cubieboard.org.

    Supported Operative Systems  “OS”:

    • Android
    • Fedora
    • Lubuntu
    • Lbuntu Server

    BTW: I look forward to an Arch Linux distro for Cubietruck ( you can check here: )!

    The Cubietruck comes with Android preinstalled on the NAND – and it works out the box. Cubietruck looks after a bootable OS on the Micro SDcard before it boots from the NAND flash memory.

    There are 3 different ways to install and run Lubuntu on the Cubietruck:

    1. NAND flash
    2. Micro SD card
    3. 2.5 HHD / SSD ( or a 3.5 HHD with an external power supply )

    1. NAND Installation of the Lubuntu Server

    You need this in advance:

    • A Mac running a newer version of OS X with access to the Internet. I am doing this from a MacBook Pro Retina running OS X version 10.9 Mavericks.
    • An assembled Cubietruck with incl. cables with 2.5 HHD
    • USB Power supply 5v 2/2.5A.
    • An ethernet Internet connection.

    Get the software

    Download and install the LiveSuit NAND installer in your app folder: LiveSuit_ForMac.zip

    Download the latest Lubuntu NAND image for Cubietruck: Cubietruck Lubuntu Desktop Releases or A20-Cubietruck Lubuntu Server Releases

    Connect the mini USB to your mac (mac only).

    Open LiveSuit and Select the downloaded Lubuntu NAND image (.img)

    Cubietruck_FEL_buttonEnter FEL Mode

    1. Press FEL key and hold it in
    2. Plug in mini usb cable to the Cubietruck and wait for the prompt
    3. Release FEL key

    Flash to Board

    When you see the prompt, you have entered FEL mode. Select Yes to continue.

    That’s it!

    2. Customizing

    Changing Boot Parameters

    # mount /dev/nanda /mnt
    # vi /mnt/uEnv.txt

    Change it as you want!

    # umount /mnt
    # sync
    # reboot

    Update Lubuntu Sever

    Normally its good practice to update and upgrade your system to the latest version.

    # apt-get update; apt-get upgrade
    # apt-get install python-apt

    NB! You need to install the python-apt package to use do-release-upgrade.

    # do-release-upgrade

    Modify System Files

    To change your local timezone, you need to edit the file /etc/timezone.

    # ls /usr/share/zoneinfo

    Ex.:  “Europe/Copenhagen”

    Remove your old timezone link and make a new one.

    # rm /etc/localtime

    You can now create a symlink to the appropriate timezone information.

    # ln -s /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime

    Change timezone ex. “Europe/Copenhagen”.

    # nano /etc/timezone

    ( Use CTRL-x to exit, hit Y to save the file in nano. )

    Change hostname /etc/hostname and the hosts file /etc/hosts .

    # nano /etc/hostname
    cubietruck

    Change “Cubietruck” to the name you have in mind. I like cubietruck, so I keep it! 🙂

    Edit the /etc/hosts file to reflect the hostname.

    # nano /etc/hosts

    Modify the line of the file to read:

    127.0.0.1 localhost
    127.0.1.1 yourhostname

    If not already so replacing your hostname with the name you put in /etc/hostname.

    Mac OS X specific linux software & daemons

    In order for your Mac’s to automatically see and discover services on your Cubietruck it is convenient to install Apple’s zero conf network service “Bonjour” or “Rendezvous” and Netatalk AFP

    #apt-get install avahi-daemon

    You can verify the install of Bonjour on Cubietruck in your with ping on your Terminal App on your Mac OS X computer.

    # ping cubietruck.local

    If you want to connect you Cubietruck with Apple’s file service AFP “AppleTalk” so your Cubietruck automatically shows up in Finder, you need to install the open source version Netatalk.

    #apt-get install netatalk

    You will find the Netatalk config files in /etc/netatalk.

    Security

    Its good practice to change the root password straight away.

    NB! You should also remove the default user linaro and and disable ssh for root.

    # passwd

    Create a new regular user :

    # adduser

    Follow the prompts; use whatever username you’d like to log in. The next available UID is fine. Use the default users as the initial group.

    Add the user to the Super User Do list.

    Logout, and relogin as the regular user:

    # logout
    login: newuser
    password: yourpassword

    3. Moving Rootfs From Nandflash To Hard Drive

    Installation

    Prepeare the drive for rootfs

    Th drive must have a primary partition formated with filesystem “ext4”. You can use the Linaro user interface DISK app, gparted or use the following shell commands to partition your HDD.

    List all available drives:

    # fdisk -l

    Choose the drive you want to make changes to (e.g. sda):

    # fdisk /dev/sda

    Use “p” (print partition of a drive), “d” deletea partition or “n” (create new partition). The partition should be of type “83”.

    Format the partition for rootfs with EXT4 filesystem:

    # mkfs.ext4 /dev/sda1

    Copying Rootfs

    Assuming that /dev/sda is the hard drive we want to install.

    $ sudo su - root
    # dd if=/dev/nandb of=/dev/sda1 bs=1M

    Changing Boot Parameters

    $ sudo su - root
    # mount /dev/nanda /mnt
    # nano /mnt/uEnv.txt
    root@cubietruck:~
    console=tty0
    
    extraargs=console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p50 rootwait panic=10 rootfstype=ext4 rootflags=discard
    
    nand_root=/dev/nandb

    Change the contents of uEnv.txt  from “nand_root=/dev/nandb” to “nand_root=/dev/sda1“. And check the changes with cat command.

    # cat /mnt/uEnv.txt

    Unmount the partition.

    # umount /mnt

    Flush the file system buffers with sync.

    # sync
    # reboot

    That’s it!

    References:

    Cubieboard3: Cubietruck is all ready with links software etc. cubieboard.org
    LiveSuit Guide cubieboard.org
    Moving Rootfs From Nandflash To Hard Drive cubieboard.org
    Tutorials for Cubietruck cubieboard.org
    FAQ specs and faq’s cubieboard.org
    A20-Cubietruck specs from SUNXI
    Cubieforum for Q&A’s

    Linux:

    The Debian Administrator’s Handbook by Raphaël Hertzog and Roland Mas
    www.lubuntu.net
    www.ubuntu.com
    manpages.ubuntu.com
    How to use Logical Volume Manager (LVM) to grow etx4 file systems online techrepublic.com

    InstallingANewHardDrive – Installing a new HHD, help.ubuntu.com

  • Magnus Carlsen in the lead 4-2 in Chenai

    Today Magnus Carlsen won “a look a like” drawn rook endgame in the Fide World Chess Championship against the current World Chess Champion Vishy Anand. Magnus play is in general that of a true World Chess Champion. It seems that Magnus took good advantage of the win yesterday by pressing Vishy. Magnus is now in the lead with 4 points against 2 with only 6 more games to go!

    [pgn height=500 autoplayMode=none]

    [Event “Fide World Chess Championship 2013”]

    [Site “Chenai, India”]
    [Date “2013.11.16”]
    [Round “6”]
    [White “Vishy Anand”]
    [Black “Magnus Carlsen”]
    [Result “0-1”]
    [BlackElo “2870”]
    [ECO “C65”]
    [EventDate “2013.11.16”]
    [WhiteElo “2775”]

    1.e4 e5 2.Nf3 Nc6 3.Bb5 Nf6 4.d3 Bc5 5.c3 O-O 6.O-O Re8 7.Re1 a6 8.Ba4 b5 9.Bb3 d6 10.Bg5 Be6 11.Nbd2 h6 12.Bh4 Bxb3 13.axb3 Nb8 14.h3 Nbd7 15.Nh2 Qe7 16.Ndf1 Bb6 17.Ne3 Qe6 18.b4 a5 19.bxa5 Bxa5 20.Nhg4 Bb6 21.Bxf6 Nxf6 22.Nxf6+ Qxf6 23.Qg4 Bxe3 24.fxe3 Qe7 25.Rf1 c5 26.Kh2 c4 27.d4 Rxa1 28.Rxa1 Qb7 29.Rd1 Qc6 ( 29…exd4 { -0.26/30 } 30.Rxd4 Qc6 31.Rd5 Re5 32.Rxe5 dxe5 33.Qf5 f6 34.Kg3 Qe8 35.Qg4 Kf8 36.Kf2 Qa8 37.Qf5 Qb7 38.Kf3 Qc6 39.Qg4 Kf7 40.Qh5+ Kg8 41.Qf5 Kf8 ) 30.Qf5 exd4 31.Rxd4 Re5 32.Qf3 Qc7 33.Kh1 Qe7 34.Qg4 Kh7 35.Qf4 g6 36.Kh2 Kg7 37.Qf3 Re6 38.Qg3 $6 { Deep HIARCS:-0.83/28 } ( 38.Kg1 { Deep HIARCS:-0.50/23 } 38…h5 39.Qf4 Re5 40.Kh2 Kf8 41.Qh6+ Kg8 42.Qf4 Kg7 43.Kg1 ) 38…Rxe4 39.Qxd6 Rxe3 40.Qxe7 Rxe7 41.Rd5 Rb7 42.Rd6 f6 43.h4 Kf7 44.h5 gxh5 45.Rd5 Kg6 46.Kg3 Rb6 47.Rc5 f5 48.Kh4 Re6 49.Rxb5 Re4+ 50.Kh3 Kg5 51.Rb8 h4 52.Rg8+ Kh5 53.Rf8 Rf4 54.Rc8 Rg4 55.Rf8 Rg3+ 56.Kh2 Kg5 57.Rg8+ Kf4 58.Rc8 Ke3 59.Rxc4 f4 60.Ra4 $2 { Deep HIARCS:-2.78/30 } ( 60.b4 { Deep HIARCS:-0.07/25 } 60…h3 61.gxh3 Kf3 62.h4 Rg2+ 63.Kh3 Rg1 64.Kh2 Rb1 65.Rc6 h5 66.Rh6 Rc1 67.Rxh5 Rc2+ 68.Kh3 Rxc3 69.Re5 Re3 70.Rc5 Ke4+ 71.Kg2 Re2+ 72.Kg1 f3 73.h5 Rb2 74.h6 Rg2+ 75.Kf1 ) 60…h3 61.gxh3 Rg6 62.c4 $2 { Deep HIARCS:-7.46/31 } ( 62.Ra7 { Deep HIARCS:-2.27/25 } 62…f3 63.Re7+ Kf2 64.Ra7 Rg2+ 65.Kh1 Rg1+ 66.Kh2 Re1 67.Ra6 Ke2 68.Re6+ Kf1 69.Rxh6 f2 70.Rf6 Ke2 71.Kg3 Rg1+ 72.Kh4 Ke3 73.c4 f1=Q 74.Rxf1 Rxf1 75.Kg5 Rg1+ 76.Kf5 Kd4 77.h4 Rh1 78.Kg5 Rg1+ 79.Kf6 Rh1 80.Kg5 ) 62…f3 63.Ra3+ $6 { Deep HIARCS:-10.78/27 } ( 63.Ra7 { Deep HIARCS:-7.46/30 } 63…Rg2+ 64.Kh1 Re2 65.Re7+ Kd2 66.Rd7+ Ke1 67.Ra7 Re8 68.Kh2 f2 69.Kg3 f1=Q 70.Ra1+ ) 63…Ke2 64.b4 f2 65.Ra2+ Kf3 66.Ra3+ Kf4 67.Ra8 Rg1 0-1

    [/pgn]

    In move 29. Magnus could have gone straight ahead with exd4 to pressure the pawn on e4!

    Vishy’s decision with 38. Qg3 to trade a pawn for piece activity in a difficult rook ending for withe seems inaccurate in retrospect. Deep HIARCS also suggest to stay put with 38. Kg1!

    Vishy’s plan with 43. h4 and 44. h5 to create a double pawn to slow down the movement of blacks pawns was good idea! And Magnus apparently did’t see this he said on the press conference in Chenai after the game.

    The decisive mistake is properly 60. Ra4? 60. b4! apparently creates the necessary counter play for the withe pawns and should at least be equal! A tough decision to make in the heat of the moment. “The best way to defend, is to attack”!

    62. But Anand’s plan with 62. c4 and 63. Ra3+ is to slow an antidote against the ambitious black pawns. White cannot prevent the queening of the black pawn without losing his precious rook.

    And the withe King from India most rest his case in this battle of minds.

    A game like this shows the unbelievably high standard of chess from both sides. Even computers will testify to this fact. But against the Mozart of Chess even the slightest inaccuracy is punished mercilessly!

    Analysis by GM Daniel King:

    Excellent in depth analysis by IM Christof Sielecki:

     

     

  • The right to Privacy for All

    Open letter to the Police State and its supporters,

    The right to privacy is a basic human need – as is the right to mingle with others freely. This is at the very foundation of human life – and maybe life it self. I believe we call it it freedom in the human world.

    Imagine a world where privacy is no longer possible. Whatever you do, whatever you say, where ever you go, with whom you are together is recorded and stored centrally by a National Security Agency in a Police State.

    It is no longer possible to have a private conversation with a friend without the Police State listens in, record and store your conversation. And you even have to worry about friends backgrounds because your very association with them is on public record. Its no longer possible to help a friend, talk to your neighbor, do business in privacy because all is on public record.

    Your hobbies, interests, readings, private life and political views is recorded, analyzed and stored. Your eating habits, your consumption of unhealthy foods, alcohol and drugs are recorded. Your childhood, adolescence, adult life and family history now also belongs to the Police State. Even your sexual preference is on public record for safety reasons. Your medical record, health history and genetic make up belongs to the archives in the Police State. And all your private property and significant belongings is under constant surveillance by the National Security Agency.

    For public safety reasons in the Police State the National Security Agency pieces every imaginable sort of information it can collect about you together and fits it into a complete and auto updated profile on you. The Police State will hold such records for themselves on all citizens of the world.

    Just imagine this!

    Now realize that this scenario is very close to the reality we currently live in or at least realize that is a near likely future of the world.

    To be able to spy on all citizens in the world in all aspects without limitation of any kind is the aspiration, hopes and dreams of almost every National Security Agency all over the world!

    How can this kind of surveillance power only exist for the safety of the public when it belongs to the few in power?

    This is ‘not something I’m willing to live under’!

    I will rather live with uncertainty, insecurity and fear in a fragile democracy, than live in a certain, secure and peaceful surveillance Police State. I object to the idea of a Police State. And I will work against the realization of a world wide Police State.

    Reference:Edward Snowden: US surveillance ‘not something I’m willing to live under’ Interview by Glenn Greenwald in theguardian, 8th. of July 2013

    The Universal Declaration of Human Rights United Nations ( UN )

    Articles:
    Snowden made the right call when he fled the U.S. washingtonpost.com 8th. of July 2013 by Daniel Ellsberg
    2011: A Brave New Dystopia by Chris Hedges truthdig.com 27. December 2010

    Online Privacy:
    Internet Privacy wikipedia.org
    The Tor Project – Web Online Anonymity
    DuckDuckGo – Anonymous Searching of the Internet
    Pretty Good Privacy – Protect your files and email with open source encryption

    Support Online Privacy Organizations:
    Electronic Frontier Foundation eff.org
    epic.org – Electronic Privacy Information Center
    Internet Defense League internetdefenseleague.org

    Litterature:
    Nineteen Eighty-Four by George Orwell
    Brave New World by Aldous Huxley

  • I support a free Internet

    I support freedom of speech.

    I support the right of privacy.

    I support a free Internet.

    Supoort Electronic Frontier Foundation in its effort to make the US Government and the like aware of the digital rights of the people in this world!

    And do join the Internet Defense League with the rest of us and defend the free internet!

    Share this 4th. of July message with others!

    Reference: The NSA Files guardian.co.uk

  • Looking for Wuji everywhere

    20130701-112316.jpg
    Looking for Wuji everywhere,
    In movement,
    In stillness
    Getting it, not getting it
    I let go,
    Finding Wuji.
    I forgot all about it!

  • Chineasy fun with visual Chinese

    You can find more info about Shaolan Hsueh’s “Chineasy” free and creative visual learning of the Chinese written language on chineasy.org and on FB: www.facebook.com/ShaoLanChineasy

  • Effective altruism

    Peter Singer talks on TED about effective altruism

  • Always Already Free

    I sit here looking out, filled with an emptiness that spills over and keeps on spilling. There is no end to this boundlessness, this delicious thrill of Presence.

    Nothing can contain it, for everything is contained within it. The good and the bad, the black and the white, the harsh and the gentle——all simply flavors of Its passage.

    Here, here, always here. So simple, so immediate. This is always here. Call it whatever you will. In truth, This has no name.

    Too exquisite to speak of, too delicate to touch, delicious, tender, yet so very solid, vast, fathomless.

    All that exists comes out of This. All that exists returns to This.
    No-one owns This, yet everyone belongs to This.

    Enza Vita