Monday, July 14, 2014

Update Java Version

sudo update-java-alternatives -s java-1.7.0-openjdk-amd64

Wednesday, July 9, 2014

Linux: mkdir cd combo

mkdir -p "1/2/3/4/5/6 6/7"
cd "$_"
$_ is previous last command argument which is "1/2/3/4/5/6 6/7"

Saturday, May 17, 2014

webcam streaming with VLC

vlc v4l2:///$(ls /dev/video*)
Or if you know exactly which device the video is on do this for example:
vlc v4l2:///dev/video0

Friday, May 16, 2014

Waldorf: vsftpd setup

Install vsftpd
sudo apt-get install vsftpd
Peek the configuration.
cat /etc/vsftpd.conf | grep -v "#"
Edit configuration to allow local user to upload/download files
sudo vi /etc/vsftpd.conf
Restart service to load the config change
sudo service vsftpd restart
Now create a local NINJA user
sudo useradd --home /home/ninja --create-home --shell /bin/bash ninja
Set password for ninja
sudo passwd ninja
In another machine, open web browser and enter URL as follows:
Enter ninja as login name; password for the password. Useful ftp commands
put {local_file_name}  {remote_file_name}
get {remote_file_name}

Monday, February 17, 2014

Waldorf: Sound issue with Pulseaudio

While after watching YouTube video or video on VLC player, sound/audio starts jittering or stuttering. And the symptom goes away after rebooting the OS. Here is a solution that does not require you to restart your computer.
killall alsamixer && pulseaudio --kill && pulseaudio --start

Sunday, February 9, 2014

Waldorf: USB FAT32 "Daemon is Inhibited" error

1. Check the device
sudo fdisk -l
Disk /dev/sde: 31.7 GB, 31657558016 bytes
255 heads, 63 sectors/track, 3848 cylinders, total 61831168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            8192    61831167    30911488    c  W95 FAT32 (LBA)
2. Create target mount point
sudo mkdir /mnt/fatty
3. Mount the USB drive onto /mnt/fatty
sudo mount /dev/sde1 /mnt/fatty

Tuesday, January 28, 2014

Linux ls with date & time format

ls -l --time-style="+%y%m%d %H:%M"
ls -l --time-style="+%y-%m-%d %H:%M"