Month: September 2013

| 0 Comments

I thought it'd be fun to strip down and reconfigure my Raspberry Pi in order to turn it into a mighty mini-webserver.

My starting point is the default Raspian Wheezy download and the setup as explained on the website page Installing Operating System Images on Linux. Run the raspi-config command and do the following:

[Note: you can skip this section with the newer operating system images made available where by default ssh is enabled for pi/raspberrypi and boot to desktop disabled]

  • Enable SSH
  • Disable boot to desktop
  • Use all of the SD Card (in my case 32GB)
  • Rename the hostname
  • Reduce the GPU memory to 16MB

Once you have followed the setup instructions, ssh pi@raspberrypi to get there. Here raspberrypi should be replaced by the IP address, for example 192.168.2.101 in my case. You can then run the command dpkg -l in order to see what is installed, followed by apt-get purge in order to strip out the extra stuff you no longer need.

Since this is a streamlined webserver, there is no need for any of the GUI desktop stuff. I also want to remove Python, sound-related (alsa) stuff, samba and other junk. Therefore, run sudo su - and fire off the following commands:

$ apt-get update
$ apt-get purge xserver* ^x11 samba* ^libx ^lx samba* libsmbclient python* desktop-file-utils nano tsconf xkb-data console-setup penguinpuzzle omxplayer gtk* libgtk* alsa* -y
$ apt-get autoremove -y
$ apt-get upgrade -y
$ apt-get clean

I chose the lightweight nginx as my preferred webserver:

$ apt-get install nginx

Since I will no longer be needing the extra memory for the GUI, I can free up the memory by editing the file /boot/config.txt and ensuring that the following line is present:

gpu_mem = 16

No need to keep the pi user around anymore since I have created a new user to do all of the heavy stuff. You'll probably want to use a different name suiting your needs, but I'll use this as an example. From now on replace the word kiffin with your own.

$ sudo adduser kiffin

Now the tricky part. As the user pi edit the sudoers file by running the command sudo visudo. At the bottom of the file you'll see something like this:

#includedir /etc/sudoers.d
pi ALL=(ALL) NOPASSWD: ALL

Replace the user pi with kiffin and save the file. Enter exit twice to return to your terminal, and then access the server again using the command ssh kiffin@raspberrypi.

Now you can run sudo su - and get rid of the pi user like this:

$ deluser pi
$ rm -rf /home/pi

Since I'm also an avid user of GNU Screen, I installed it as well:

$ sudo apt-get install screen

Now it's time to create a simple webpage by going to the document index directory and creating an index.html file to suit your needs.

$ cd /usr/share/nginx/www
$ cat index.html
<head>
<title>KiffinWeb</title>
</head>
<body bgcolor="white" text="black">
<center>
<h1>Welcome to KiffinWeb!</h1>
<img src="raspberrypi.png"/>
<p>
This is an <a href="http://nginx.org/en/">nginx</a> web server running on a <a href="http://www.raspberrypi.org/">Raspberry Pi</a> mini-computer.
</p>
<p>
<a href="http://www.kiffingish.com/2013/09/raspberry-pi-webserver.html">Make one yourself</a>
</p>
<p>
Brought to you by <a href="http://www.kiffingish.com/">Kiffin Gish</a>.
</p>
</center>
</body>
</html>

Once you've got everything setup to your heart's delight, it's probably a good idea to make a backup of this image just in case. For example, when the electricity fails causing the SD Card to become corrupted.

Shutdown the raspberry pi (sudo shutdown now), wait one minute, take out the SD Card and put it in your laptop. I then run the following command to copy the image to a local backup file:

$ sudo dd bs=4M count=800 if=/dev/mmcblk0 of=/home/kiffin/raspberrypi-kiffinweb-20140925.img

Take the SD Card out and insert it back in the device and connect it to the power supply. Make some last changes in the configuration:

  • Use all of the SD Card (in my case 32GB)
  • Rename the hostname
  • Reduce the GPU memory to 16MB (already done above)
$ sudo rasp-config

Once everything has been finalized, I reboot with shutdown -r now and ssh kiffin@raspberrypi to my webserver again. Here's how much additional space I've created:

kiffin@raspberrypi:~# df -H
Filesystem      Size  Used Avail Use% Mounted on
rootfs           32G  751M   30G   3% /
/dev/root        32G  751M   30G   3% /
devtmpfs        247M     0  247M   0% /dev
tmpfs            51M  234k   51M   1% /run
tmpfs           5.3M     0  5.3M   0% /run/lock
tmpfs           102M     0  102M   0% /run/shm
/dev/mmcblk0p1   59M   19M   40M  33% /boot

Of course, in order to make the web server accessible from the outside world, you will have to use NAT by configuring the router to forward HTTP (port 80) and SSH (port 22) to transfer these requests to the IP-address of the Raspberry Pi server.

Here's proof that it really works:


www.kiffinweb.com

For convenience, everything is setup downstairs in the electricity cupboard.

raspberrypi-meterkast.png raspberrypi-meterkast-closeup.png

The Raspberry Pi is connected to the KPN Experia Modem with the blue Ethernet cable and the power supply is the black cord going up over the fuse box to the socket.

| 0 Comments

Last week I ran my jogging route seven times in a row from Monday through Sunday. That's a total distance of 7.7 x 7 = 53.6 kilometers (32.2 miles) in one week. I am feeling pretty healthy and only slightly sore which is good for the mind.

| 0 Comments

Last year at the Davilex Open, I had a stellar round shooting a 76 and coming in 4th place. However I am sad to have to admit that this year I had a boring so-so round with two double bogies shooting an 83 and coming in 36th place. I really should have played much better, I had been practicing the whole week before. On the fourth hole I hooked my drive way left out of bounds and actually hit the side of a barn. On another easy par four, I fluffed my fifty meter chip way short of the green, skulled the next shot to the back of the green and then three putted. Oh well, better luck next year.

Results

| 0 Comments

For the time being it looks like I've been cured of my awful shanks. Yesterday I went to the club and hit four buckets of balls on the driving range and only had one semi-shank. What a relief. Now that my confidence has shot up again, I can go out and shoot a couple more super rounds before winter comes.

| 0 Comments

Raspberry-pi-1.png Raspberry-pi-2.png

I was so very pleased to receive my new techie toy in the mail today. Brings out that little boy feeling in me, yet another fun present. The Raspberry Pi is a credit-card sized computer which costs less than thirty euros, and it's a lot of fun to play around with.

These are the only components required to make a good start:

  • RASPBERRY PI, MODEL B, 512MB
  • SDCARD 8GB
  • POWER SUPPLY, RASPBERRY 5V, 1A
  • HDMI TO DVI CABLE 2M
  • WIRELESS KEYBOARD & MOUSE

Here are some references:

| 0 Comments

Now that I have some extra free time on my hands, I've been playing more golf trying to improve my game and hone my mental skills.

I'm almost there, hitting the ball pretty well most of the time. However, I tend to pull the ball to the left, sometimes even hooking it. Some shots I hit pure as can be, and while the ball starts heading directly at the target, it veers off with an aggravating draw pulling the ball off of the green. Every once in awhile, I even unexpectedly shank or on occasion even top the ball. Killing for any good round, such stupid and undeserving shots.

So it was time for a lesson. I needed to get in good shape for this weekend: the Monthly Medal A on Saturday and the Davilex Open at Liemeer on Sunday. Normally I never take lessons, figuring I can work hard and figure things out on my own. But this had been going on for way too long, and over the last six months it was slowly getting worse and worse. I was desperate feeling desperate.

I went straight to the club pro and told him it was an emergency: I needed his help right away. He would finish his lunch and could help me fifteen minutes later.

The pro already knew what was wrong after I hit two balls. In no time and with only a few small adjustments I was cured. Bang, bang, bang. Seven iron, five iron, three iron, five wood and driver. Pitching wedge also good, right down the smokestack. Shall I hit the flag for show? It was a miracle, I felt ecstatic and relieved at the same time. There's still hope, thank the golfing gods.

Basically, I need to address the ball (with confidence) and remember thee following three things in this order:

  • Weaken my grip slightly by turning my right hand a couple millimeters clockwise.
  • Take a solid stance, place the club face behind the ball, and step back half an inch so that I am slightly reaching for the ball (or at least it feels like that).
  • During the backswing keep right wrist relaxed, cock it back about half way up, and follow the swing through (don't force it, just let the left arm and hand do most of the work).

Tomorrow afternoon I will practice some more, and put in some short game exercises as well: sand shots, chip and runs, putting long and short. Good luck, I'll be thinking of you.

| 0 Comments

If my father were still alive he would have turned ninety-six today. Hard to believe that he passed away thirteen years ago. I still miss him and think about him once in awhile. Looks like I've been able to carry on the torch pretty well so far.

| 0 Comments

I looked to the sky and I saw the sun turning to us
I looked for the road but all I could see was the dust
I remember your voice when you said it was better for us
Oh oh oh, how I've done myself in
Oh oh oh, how I've done myself in

-- Basia Bulat, Heart of My Own

| 0 Comments

There I am bicycling with my university friend, returning from a fun and relaxing weekend camping on the beach. We are coasting downhill on our way back to the university. We come to a bend in the road and have to get off of our bikes. There is a line of cars and a group of bystanders blocking the way. As I walk with my bike in hand, I notice streams of blood flowing down the road, long elongated reddish fingers gleaming on the black asphalt. I have to step carefully over the rivulets of blood, raising my feet and lifting my bike as well. Up ahead following the rivulets slightly uphill to the source of the bleeding, there is this big puddle of blood next to a fallen motorcyclist. He still has his helmet on, his body is contorted in a terrible shape. His neck is obviously broken and he is no longer breathing. I can see his face through the visor which is slightly fogged up. On the side of the road, a man is screaming hysterically, walking around in circles. Apparently he is the driver of the car that killed the motorcyclist. He says he's a veteran of the Vietnam War. He screams something about killing all those innocent people in Vietnam, how Oh God he promised that he'd never kill anyone again, Oh God so how can this be happening to me? Why would God punish me like this, what am I going to do?! I have an urge to pause and stare and soak it all in. There's a smell of blood in the air and I'm curious what is going to happen to this poor hysterical man. I ignore my instincts and inner urge to offer empathic feelings, some words of comfort. But what is there to say? Instead, I quickly cycle away pretending that nothing unusual is happening. My friend and I don't even talk about it nor mention it ever again. I try to forget about it, bury it deep inside my memory so that I will never remember it again. After all these years, I cannot forget it. The memory comes back to me every once in awhile, each time more real than the time before. Sights and feelings become more vivid as the memory fades more and more into the past. (This is a true story which happened around 1977 or thereabouts).

| 0 Comments

This whole thing about the so-called higher power is really fantastic, that is as long as everything is going well. What a great idea! Why didn't I think about it earlier?

And then life takes a nasty turn. When things go sour and life becomes more frustrating, that's when the concept of the higher power suddenly becomes much less appealing. Oops.

Hey wait a minute, this wasn't part of the deal. Trusting completely in the higher power is supposed to solve all my problems, not to block my path with all kinds of new and unexpected obstacles. Must be a dream, but it is not.

Come to think of it, it could be a new challenge, yes it must be some kind of test. With a snap of the finger, I could easily forsake my faith in the higher power. Try and take control all over again. Fight things and force my way, in order to win.

Life is not about winning any more. Just remain positive and let it happen the way it was always meant to happen.

Some other time we will hopefully figure it out, but not now. Even if in the end we do not figure it out, that should not matter.

| 0 Comments

Authenticity is the daily practice of letting go of who we think we're supposed to be and embracing who we really are.

Trying to figure out who we're supposed to be is a hard enough challenge in an ever-changing and dynamic world filled with people coming and going.

In fact, it's an impossible challenge. So it's better to stop trying to be what others expect. This can never be attained when surrounded by an inconstant collection of mental judgments.

Embracing who we really are is the easy part. By letting go of that illusion surrounding us, our soul is exposed for what it was always meant to be.

I believe that this makes perfect sense. Peeling away the layers of the onion.

Random entries

Here are some random entries that you might be interested in:

Recent Assets

  • Raspberry-pi-2.png
  • Raspberry-pi-1.png

Recent Comments

  • Bridge to the moon: Yes it was a drawing and my older brother told me ...
    - jpmcfarlane
  • Bridge to the moon: Wow, that's quite a coincidence that we both sent ...
    - Kiffin
  • Bridge to the moon: Hello I was in my teens when Gemini 4 went up that ...
    - jpmcfarlane
  • Back to work: Congratulations Kiffin, I hope it is something you ...
    - KathleenC
  • Buddha shrine: I keep Buddhas in my plants outside on the deck du ...
    - KathleenC

Golf Handicap

Information

This personal weblog was started way back on July 21, 2001 which means that it is 7-21-2001 old.

So far this blog contains no less than 2291 entries and as many as 1876 comments.

Important events

Graduated from Stanford 6-5-1979 ago.

Kiffin Rockwell was shot down and killed 9-23-1916 ago.

Believe it or not but I am 10-11-1957 young.

Began well-balanced and healthy life style 1-8-2013 ago.

My father passed away 10-20-2000 ago.

First met Thea in Balestrand, Norway 6-14-1980 ago.