System tricks


Now I’m working on a Ubuntu 12.04 LTS Dell workstation (it has been 13.04 for a while) and a Ubuntu 13.04 Dell Laptop.
See here for a list of installed packages and settings.

  • in case of kwin problems kquitapp plasma-desktop + in case, plasma-desktop

  • System monitoring: htop, iotop, saidar


  • grep -H '<string>' *.<ext>
  • grep -r "<strings>" ./
  • sudo updatedb && locate <nomefile>


  • download music from youtube

    youtube-dl --extract-audio --audio-format=mp3 <youtubeLink>

    for example:
    ````python #!/usr/bin/env python

    -- coding: utf8 --

import os, time tt = time.time() inFileName = “videos.dat” inFile = open(inFileName, ‘r’)

print “Start video download loop” print “Serial version, parallel is work in progress!:P” for line in inFile: name, video = line.split(‘,’) print “========================================” #print “Downloading “, name print “========================================” downloadCmd = ‘youtube-dl –extract-audio –audio-format=mp3 ‘+ videos

#downloadCmd = ‘youtube-dl -o ./videos/’+name+‘.flv “’+video+‘”’ #os.system(downloadCmd) #print “Converting to mp3…” #convertCommand = ‘avconv -i ./videos/’+name+‘.flv ./mp3/’+name+‘.mp3’ #os.system(convertCommand) print “Done in “, time.time()-tt

## Goodies

* visualize git history `gource ./ -o /dev/null`
* grab an image from the webcam with CLI VLC
cvlc -I dummy v4l2:///dev/video1 --video-filter scene --no-audio --scene-path 
/home/ziosi/Pictures/webcam --scene-prefix img$(date '+%y%m%d%h%m%s') 
--scene-format png vlc://quit --run-time=1
  • To see live output from the webcam: bash mplayer -tv driver=v4l2 -vo xv tv://
  • To record from the webcam: bash mencoder -oac mp3lame -ovc lavc -o foo.avi -tv driver=v4l2 tv://
Tags// , ,
More Reading
Newer// Master
Older// C++ references
comments powered by Disqus