Download audio from soundcloud through command line

Like youtube-dl there is a command line tool called scdl, which is written in python based on GPLV2 license and works on Linux, windows and OSX.

To install in linux, execute below command:

$ pip install scdl

To download a single song:

$scdl -l <Sound cloud link to the song>

Example: scdl -l scdl -l https://soundcloud.com/trdp/raghu-dixit-jagchanga-lokada

It will download and store in $PWD

Do “scdl -h” to know other options like download complete album, user liked videos etc.

 

 

Arch Linux: Remove downloaded packages cache and clear memory

My rootfs is very small in size (30 GB), and I am running Arch Linux from past two years and constantly upgrade the new releases and packages. At some point of time my rootfs become full and I couldn’t able to install anything new (not even upgrade the system). When I looked at my rootfs, like which directory is consuming maximum space, found /var/cache/pacman/pkg holds 12 GB of my memory. And it all contains compressed packages which is downloaded when I upgrade my system. All those packages you might not need often, so you can remove all those packages safely using below command.

pacman -Sc

Now I have got my 12 GB free space back. 🙂

For more info Link

Who’s talking about the Arduino Zero ?

Nice Board 🙂

Atmel | Bits & Pieces

The Atmel-powered Arduino Zero dev board was officially announced on May 15th, 2014. The board’s debut has already been covered by a number of prominent tech publications, including Ars Technica , HackADay , EE Times , Electronics Weekly , CNX Software ,  UberGizmo ,  Geeky Gadgets, SlashGear, PC World, SemiWiki  and Makezine .

Sean Gallagher, Ars Technica



“The Zero is a 32-bit extension of Arduino’s flagship Uno board, developed jointly by the Arduino team and Atmel, targeted at helping developers prototype smart devices. Based on the Atmel SAM D21 ARM Cortex-based microcontroller, the Zero includes Amtel’s Embedded Debugger—allowing developers to debug their projects without having to wire up another interface.

”

“It gives developers a huge boost in storage and memory over the Uno, providing 256KB of onboard Flash storage (compared to the Uno’s 32KB) and 32KB of static RAM (compared to the Uno’s 2KB). It can also emulate an Electronically Erasable…

View original post 362 more words

Getting started with Gstreamer

This blog covers getting started working with Gstreamer. Run your 1st Gstreamer examples on Linux system ( I am Using Ubuntu 12.04 LTS ) Download and install Gstreamer in your Linux machine, follow below page: http://docs.gstreamer.com/display/GstSDK/Installing+on+Linux Note: Download tutorials source code also. Once installed the Gstreamer, got to Gstreamer shell by executing /opt/gstreamer-sdk/bin/gst. BTW why we need Gstreamer shell?????? It is nothing but just sets some environment variables needed to compile Gstreamer application Example: LD_LIBRARY_PATH, PATH, CFLAGS, PKG_CONFIG_PATH etc. Want to know more??? Open /opt/gstreamer-sdk/bin/gst and see. Now change directory to Gstreamer SDK tutorial examples. Compile the program basic-tutorial-1.c, how to compile ????? gcc basic-tutorial-1.c -o basic-tutorial-1 `pkg-config –cflags –libs gstreamer-0.10`  Why pkg-config??? Read http://people.freedesktop.org/~dbn/pkg-config-guide.html, Just a short answer: pkg-config –cflags –libs gstreamer-01.0 refers package configuration file /opt/gstreamer-sdk/lib/pkgconfig/gstreamer-0.10.pc and sets the options to compile the application example: cflags, includes, dynamic libraries etc. Just execute pkg-config –cflags –libs gstreamer-01.0 and analyse the result :). Yes your first Gstreamer Application is ready, execute is and see the code to analyse. This http://docs.gstreamer.com/display/GstSDK/Basic+tutorial+2%3A+GStreamer+concepts explanation is more than enough for this application.

Installing latest kernel in ubuntu

After a long time I installed latest kernel to my ubuntu 12.04 :). Long time back I use to install and test the latest kernels, so completely forgot the steps. Managed to do it by Googling, so thought of writing a wiki.

Clone latest kernel from Linus Torvalds repository:

$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

$ cd linux

If you want to use the previous config, execute below command

$ make localmodconfig

Then execute make ( I am compiling with -j3 to distribute task to 3 cores )

$ make -j3

After successful compilation, needs to install the kernel and modules to the system.

Execute below command to install modules which is compiled.

$ sudo make modules_install

This will copy all the compiled modules to /lib/linux-<version>/ directory.

The next steps are copy kernel, System_map and config to /boot directory.

I am using inter x86 32 bit PC, so my bzImage is located in 

<Kernel_Base_Dir>/arch/x86/boot/bzImage. This will install the kernel.

$ sudo cp arch/x86/boot/bzImage /boot/vmlinuz-<version> 

$ sudo cp <Kernel_Base_Dir>/System.map /boot/System.map-<version>

$ sudo cp <Kernel_Base_Dir>/.config /boot/config-<version>

Above two commands installs the System.map and config to the /boot directory.

Create initramfs:

$ sudo update-initramfs -c -k <version>

Above command will create initramfs file, in my case it creates initrd.img-3.14.0-rc4-00008-g7472e00 file

Update the grub 🙂

$ sudo update-grub2

Above command will update the grub with new kernel :).

 

Thats it!!!! You installed a brand new kernel 🙂