Gaming

Minecraft

I’ve heard of Minecraft before and it didn’t appeal to me very much. I heard about it again so I played the demo and it has caught my attention. A very unusual game. There are so many things you can build. I like the idea of being able to explore the world.

I’m almost considering buying it.

Programming

Color your Bash

Missing a little color in your Bash shell under Cygwin? Fear not! Just edit the .bashrc file in your home directory. Just uncomment the following lines:

alias ls='ls -hF --color=tty' # classify files in colour
alias dir='ls --color=auto --format=vertical'
alias vdir='ls --color=auto --format=long'

Also, if you don’t like that each Bash command uses two lines then edit /etc/bash.bashrc. There’s a line that starts with PS1 and it looks like this:

PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n$ '

Change it to:

PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\040\$ '

Change the last “\n” to “\040”, instead of starting on a new line it adds a space.

And voila! 🙂

Programming

Cygwin

If you’re like me and:
1) want to keep using Linux commands on Windows
2) want to learn/remember more Linux commands
3) hate using DOS commands

then install Cygwin! So what is Cygwin?? Quoting from their website “a collection of tools which provide a Linux look and feel environment for Windows“.

Yep it feels good to use “ls” on Windows 🙂

Programming

RPi Streaming

I got the webcam streaming from the RPi! Woo hoo! Here’s what I did, I set up the following in /etc/avserver.conf:

Port 80
BindAddress 0.0.0.0
MaxClients 5
MaxBandwidth 50000
NoDaemon
<Feed webcam.ffm>
file /tmp/webcam.ffm
FileMaxSize 5M
</Feed>
<Stream mystream>
Feed webcam.ffm
Format mjpeg
PreRoll 0
#NoAudio
</Stream>
<Stream status.html>
Format status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</Stream>

Then, I ran the command:

avserver & avconv -v verbose -s 320x240 -input_format mjpeg -f video4linux2 -i /dev/video0 http://localhost/webcam.ffm

And voila! Yes, the stream does lag quite a bit (about 3 seconds) but it’s a step in the right direction 🙂

Programming

Logitech C200 on RPi

I received my Logitech C200 yesterday and it was as small as I thought. I just plugged it in and installed the uvccapture software:

sudo apt-get install uvccapture

Then, I was able to take a snapshot with the following command:

uvccapture -S80 -B80 -C80 -G80 -x640 -y480

To take a video:

ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg


NOTE: the names of the “ff” programs have changed

ffmpeg is now avconv.
ffserver is now avserver.
ffprobe is now avprobe.
ffplay is now avplay.

Car

I found it!

I finally found the fuse for the cigarette lighters on my 370Z. Despite my arduous attempts to interpret the service manual I couldn’t find it. I spoke with my local Nissan service center and they finally found it. It is hiding inside the car near the accelerator pedal.