Thursday, April 25, 2013

DRM in HTML5! Defective by Design

It's funny, sad and not-so-surprising to witness corruption creeping into W3C (w3c.org) that proposes password protection to media content like audio and video clips.

Dear W3C, if you want to facilitate encryption of contents of HTMLMediaElement, isn't it a good idea to extend it further to <script> element?

Take action NOW!
http://www.defectivebydesign.org/sign-on-against-drm-in-html

_____________
 Dear W3C,

Please extend content protection to propitiatory JavaScript code also.


I've written excellent JavaScript based rendering and interaction libraries which I'm hesitant to share because my JavaScript content will not be protected under current standards. If I could meter the usage of my JavaScript code the world would benefit from my libraries and I, as the creator, would benefit by charging the users of my libraries. Millions of people like me are not sharing useful JavaScript code because of the fear that someone will copy it and share it for free. Are we not artists? Are we not original creators? Do we not deserve source of livelihood? 

Saturday, April 20, 2013

Committing Your Project on GitHub

I had a custom png image I/O program that I've used multiple times to process images and even to visualize data in a highly customized manner and I wanted to share it on GitHub.

Here's a summary of steps that I followed:

1. On GitHub website, create a new GitHub account with your user name. You may use your firstname-lastname (note the hyphen) as your user name; for sake of privacy, let your email id be firstname-lastname@server.fake and choose a password as instructed.

2. Click on "New repository" button and create a new repository with name repositoryName. Make sure that you select "Initialize this repository with a README" option.

3. Install and configure git
$ sudo yum install git-core
$ git config --global user.name "firstname-lastname"
$ git config --global user.email firstname-lastname@server.fake
$ git config --global credential.helper cache

$ git config --global credential.helper 'cache --timeout=3600'

4. Checkout the newly created repository from GitHub
$ git clone https://github.com/firstname-lastname/repositoryName.git

As you would expect, a folder with the name of repository (repositoryName) will be created having just the README file in it.

5. Create more files in this folder and add the new files to the repository.
$ git add file1
$ git add file2

6. Commit the changes.
$ git commit -m 'initial version'

7. Commit the changes to GitHub website also.
$ git push origin master

That's it!

Note: You can download my committed program from this link: https://github.com/ajay-anand/png

Wednesday, April 10, 2013

Using APT

Just today I installed Ubuntu Server Edition 12.04 on a machine. It's worth knowing a few apt tricks:

apt-get install pkg_name

apt-get download pkg_name

apt-get update #update repository

apt-get autoremove #remove unnecessary packages

dpkg -s firefox | grep Status #check installation status

apt-cache pkgnames | sort

apt-cache depends firefox #get dependency list

apt-get install -o Acquire::http::Proxy=none #manual proxy setting

echo -e "pkg1 hold\npkg2 hold\npkg3 hold" | dpkg --set-
selections #prevent packages

Monday, April 1, 2013

Get rid of shaky touchpad pointer (cursor that jumps)

Recipe for Ubuntu 13.04
1. Open the file /usr/share/X11/xorg.conf.d/50-synaptics.conf and locate the block with Identifier "touchpad catchall".

2. Add the options next to MatchIsTouchpad "on" and the contents will look as follows:

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"


        Option "VertResolution" "100"
        Option "HorizResolution" "65"
        # disable synaptics driver pointer acceleration
        Option "MinSpeed" "1"
        Option "MaxSpeed" "1"
        # tweak the X-server pointer acceleration
        Option "AccelerationProfile" "2"
        Option "AdaptiveDeceleration" "16"
        Option "ConstantDeceleration" "16"
        Option "VelocityScale" "32"

# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
      MatchDevicePath "/dev/input/event*"
EndSection

3. Reboot

4. Open "Mouse and Touchpad" preferences window and adjust touchpad pointer speed.


Recipe for Fedora 18

1. Create file /etc/X11/xorg.conf.d/50-touchpad.conf

2. Add following settings to the file:

Section "InputClass"
        Identifier "touchpad"
        MatchProduct "SynPS/2 Synaptics TouchPad"
        Driver "synaptics"
        # fix touchpad resolution
        Option "VertResolution" "100"
        Option "HorizResolution" "65"
        # disable synaptics driver pointer acceleration
        Option "MinSpeed" "1"
        Option "MaxSpeed" "1"
        # tweak the X-server pointer acceleration
        Option "AccelerationProfile" "2"
        Option "AdaptiveDeceleration" "16"
        Option "ConstantDeceleration" "16"
        Option "VelocityScale" "32"
EndSection 

3. Restart gdm as superuser (you'll be logged out)
$ service gdm restart  

Reference:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/1042069