The New My.T set-top box (Orange Mauritius)

liveboxwrapping

Got the new My.T tv set top box. The wrapping looks cool. But the real box is like this.

liveboxtrue

The image quality is same as before. Yep. No HD. The maximum setting supported is 1080I, not 1080p.

The channels are unwatchable on high definition. The sound becomes choppy.

Navigation from the remote control has considerable lag.

liveboxremote

It is not now that Orange will be providing good service. The device is a really low end one. Don’t get excited about it. Switch to bees if you want to try something else.

Automatic Server Deployment with Git/SSH

Uploading your files to servers is a pain. I was using git-ftp previously. But i wanted to use a pure git protocol coupled with ssh.

Copy your existing working directory to your server in lets say /var/www to be served as web; make sure it contains a .git folder.

on your local machine:
git remote add myserver nayar@example.com:/var/www/.git

on your server:
cd /var/www
git config receive.denyCurrentBranch ignore
mv ./.git/hooks/post-update.sample ./.git/hooks/post-update
chmod a+x post-update

modify the contents of ./git/hooks/post-update as follows

#!/bin/sh
GIT_WORK_TREE=/var/www/ git reset –hard

The setting up is over. Lets test if it’s working:-

on your local machine:
Make some changes to your local files
git commit -a -m 'changing file x'
git push origin master

The files on your server should have been updated accordingly 😉

Emotion for Dummies (Machines)

Imagine one morning your car just refuses to start because it is feeling depressed. Or it performs badly on the road not exceeding 60 km/h. You would most probably be like “B*tch please. What The F*ck is wrong with you. Get the f*ck moving!!!”

Emotions are sometimes considered as a negative thing especially for heart broke people. Brilliant students fail their exams. Neways, let’s make a hypothesis if machines would be more performant with “emotions”.

Source: hccanet.org
Source: hccanet.org

The “Sad” Car
Same thing applies for a car. If you just press the accelerator down most of the time, you’re definitely wearing down the parts if you don’t do proper maintenance with it. If the car knew that it’s owner doesn’t “love” him, it would have not ran fast. It would go on an average speed like 60-80km/h max.

Advantages:-
1. Car wear is reduced. Hence heavy maintenance cost is reduced. $$$
2. A driver who goes fast on a probably worn on car is a serious security risk both for the car and driver.

When the car “cares” about itself, the driver also travels safer.

The “Happy” Car
If car is a happy, it knows it can push it’s limit to the maximum. It has a “trust” relationship with its owner. IF you let your wife drive, the it would be great if the car would go into “scared” state behave accordingly. I think you got the point 😛

Modelling Emotions using Fuzzy Logic
I’m supposed to learn Fuzzy Logic for my Final Year Project. I’ll try to make a tiny demo. For non-techical people, you might just skip to The Evil Playboys section.

Let’s make a tiny simulation of such a car. We will have 2 input variables namely “care” which will be between 0 – 10. Accelerator will be between 0 – 1. Speed will be between 0 – 150. Did that in Fuzzy Logic Toolbox in 30 mins. Not that good but quite usable.

The rules:-

snapshot30

Case 1: No love 🙁
No Care, No Acceleration

Case 2: Trying to push the car
snapshot24

Case 3: Moderate care, moderate accelaration.
snapshot26

Case 4: Increasing care, same acceleration
snapshot27

Case 5: Pushing own accelerator fully
snapshot28

Case 6: Perfect car with full accelerator pressed
snapshot29

The Evil Playboys

Ofcourse. Some people might use it for their own benefits and “play with emotions” of others. Giving the machines false “pats” and turning off their sensors or hacking into the system to make the “happy” value higher would surely increase the productivity on the short term. But at the end, it always results in broken hardwares and <3. What do you think?

Setting Git server on VPS

Previously, I had set up a git server on my laptop. My friends would access it using my always changing IP. Furthermore, my laptop has to remain online.

Setting up a vps as git server
First create a git user
$sudo adduser git

A user and a group git would be created

Create accounts for your collaborators too using the same commands
$ sudo adduser rambo
$ sudo adduser rofler

Creating a group for the peeps working on a specific project.
$ sudo addgroup kuyon

Adding the collaborators to the group kuyon
$ sudo adduser rambo kuyon
$ sudo adduser rofler kuyon

Create a directory for each project you are working. By convention, it should end with .git

$ sudo mkdir /git/meraproject.git
$ sudo git init --bare
$ sudo chown -r git:kuyon /git/meraproject.git
$ sudo chmod -r 070 /git/meraproject.git

The above permission means that no one except those found in the group kuyon would have read, write and execute permission.

Now your collaborators can push an existing git project using this command

$ git remote add origin rambo@example.com:/git/meraproject.git
$ git push -u origin master

Roffler can clone the repository using rofler@example.com:/git/meraproject.git

Then the normal git workflow continues and life continues…

Note: the commands were written on Ubuntu Server 13.04

Printers for Dummies

Some History

Source: Wikipedia.com
Source: Wikipedia.com

Before the printer existed, people used to write with pens. Then came the era of type-writers. It kinda revolutionized office work. I’ve read somewhere that Russian top secret officials usually use type-writers because it would be possible to know the authenticity of the document due to the different character had striking the paper at different angles and force. Each type writer has like its own identity. Well, let’s move on now.

The Printer

The printer came along computers. It allowed people to preview their documents on their screens before “materializing” it. Mistakes can be removed at an early stage 😛

Categories of Printers
The most popular ones are ink-jet and laser printers. These can be either color or monochrome.

Ink-jets project ink particle on the paper as it prints. The print head passes over the paper printing line by line.

Laser Printer
Source: zinetic.co.uk

Laser printers are much faster than ink-jets. Electrons are fired on a drum hence ionizing it. The ink liquid are charged positively. The ink particles would be attracted to the drum. The drum is then rolled on paper resulting in a print off. lol 🙂

Connectivity

Back in the days printers were connected using parallel ports. Nowadays, the USB meaning Universal Serial Port is used in almost all models.

On top of that, wireless printing is also possible. Bluetooth enabled printers would allow one with a Bluetooth phone or camera to print directly. This forms part of PAN.

Source: printerhacks.com
Source: printerhacks.com

LAN printing involves connecting your printer to your router. An IP address is assigned to your printer. This could be either wired using RJ45 or using Wifi.

Controversies involving Printers
Printers require paper. Paper is made from trees. Cutting down trees just worsens the global warming effect.

I hope this little expose de-mystified printers a bit.

Do print only if you really need to and plant more trees than you’re killing 😉