Terminal Commands

LYX:

sudo apt-get install texlive-publishers sudo apt-get install texlive-science

Miscellaneous

  • chown
  • chmod
  • chgrp
  • lsmod
  • lsmod
  • lspci
  • lsusb
  • grep
  • dmesg
  • dmesg | grep tty

 

Programming AVR

avrdude -c stk500v2 -P robokitsusbprog -p atmega32 -U flash:w:robokits.hex -U hfuse:w:0xD9:m -U lfuse:w:0xE1:m

sudo avrdude -p atmega168 -P /dev/ttyS0 -c ponyser   -U hfuse:w:0xdd:m -U lfuse:w:0xff:m -U efuse:w:0×00:m

sudo avrdude -p atmega328p -P /dev/ttyS0 -c ponyser    -U flash:w:main.hex

### Package Related

install .rpm directly

sudo alien -i package_file.rpm

convert .rpm to .deb

sudo alien package_file.rpm

install converted .deb package

sudo dpkg -i package_file.deb

Get window borders back

gtk-window-decorator –replace

enter the command in RUN
aoss gtick
minicom -s

### Record desktop

avconv -f x11grab -show_region 1 -video_size hd720 -framerate 24 -i :0.0 -threads 2 -q 1 -bt 8000000 -b 8500000 ./test.mkv

**Record desktop without audio and save to AVI**

ffmpeg -r 30 -s 1680x1050 -f x11grab -i :0.0 -vcodec msmpeg4v2 hemal.avi

**Record Fullscreen**

ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -r 30 -s $(xwininfo -root | grep ‘geometry’ | awk ‘{print $2;}’) -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 -y output.mkv

 **Record Single Window**
#Note use this script, an X cursor will appear and then select the window you want to record.

#!/bin/sh INFO=$(xwininfo -frame)

WIN_GEO=$(echo $INFO | grep -oEe ‘geometry [0-9]+x[0-9]+’ | grep -oEe ‘[0-9]+x[0-9]+’) WIN_XY=$(echo $INFO | grep -oEe ‘Corners:\s+\+[0-9]+\+[0-9]+’ | grep -oEe ‘[0-9]+\+[0-9]+’ | sed -e ’s/\+/,/’ )

ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -r 30 -s $WIN_GEO -i :0.0+$WIN_XY -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 -y output-single.mkv Convert to Youtube Standard Note: $1 is your input file

ffmpeg -i "$1" -s 1280x720 -aspect 16:9 -r 30000/1001 -b 10000k -vcodec libx264 -pass 1 -vpre fast\_firstpass -an "$1"-out.mp4 && ffmpeg -y -i "$1" -s 1280x720 -aspect 16:9 -r 30000/1001 -b 10000k -vcodec libx264 -pass 2 -vpre fast -acodec libfaac -ac 2 -ar 48000 -ab 320k "$1"-out.mp4

Convert video to images

http://superuser.com/questions/135117/how-to-convert-video-to-images

mplayer -vo jpeg -sstep 5 file.avi
mplayer -vo jpeg -sstep 5 -endpos 145 file.avi

EMC

halrun -I -f ptest.hal
parallel port at 0xe050

Get Font list

fc-list : file >fonts.txt

Choose java version to use

sudo update-alternatives --config java

Batch compress jpeg files

Download jpegoptim

jpegoptim --max=50 \*.jpg

devils pie

You can restart networking as a whole or just the NIC (assuming eth0 - change to match your adaptor name) - as follows:

General networking restart

`/etc/init.d/networking restart` 

**NIC restart (on the console - ie: not remotely):**

ifdown eth0 ifup eth0