Posts

A good way to list all file names (probably with whitespace) in bash

Typical find . bash command interprets a file with whitespace in name into multiple files. To avoid this problem, use the following construct,   find . - iname "foo*" | while read f do echo ${f} done   Reference     To eliminate leading ./ in the listed file names, change the code above to the following. find . - iname "foo*" | while read f do echo ${f#./} done Reference

apt-get under proxy server

1) Open the Terminal and type the following command       sudo gedit /etc/apt/apt.conf.d/02proxy Note : 01proxy file is not present earlier. 2) Type the following line(in red) in the file:      Acquire::http::Proxy “http://yourusername:yourpassword@yourproxy:yourport″;      Acquire::http::Proxy "http://foss:3189";     3) Save the file and your problem is solved. Reference

rpi dvd to iso in linux

Check where the CD is located in the Linux system > cdrdao scanbus Suppose you get the following which says it is at /dev/sr0 Cdrdao version 1.2.3 - (C) Andreas Mueller /dev/sr0 : Slimtype, DVDRW SOSW-833S , VRS3 Make sure that location is unmounted. > umount /dev/sr0 Do the following command to rip the dvd to iso. > cat /dev/sr0 > /home/tylau0/disc.iso   

Activate copies of Office 2010 which utilizes cscript on PlayOnLinux

Click on "Config" in the PlayOnLinux main screen. Then select the Wine tab on the right window, and select "Registry Editor". Under [HKEY_LOCAL_MACHINE\Software\Microsoft\OfficeSoftwareProtectionPlatform] Insert: "KeyManagementServiceName REG_SZ " [[Licence server]] "KeyManagementServicePort REG_SZ " [[ Port of the licence server]] Start MS Office (i.e. Word). Then the following entry will be automatically created: [HKEY_USERS\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform] Insert: "VLRenewalSchedule REG_BINARY " [[Any value]] Close MS Office completely and restart it. Reference

Program to allow old computer to boot with USB driver

Plop

Useful Linux applications

WinFF - play .trp media files   AcetoneISO - dump CD/DVD Hugin - stitch photos

Problem running OpenGL program in a virtual machine

In case you encounter the following issue when running OpenGL program in a virtual machine OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x180fb10 OpenGL Warning: Retry with 0x8002 returned 0 visuals Segmentation fault (core dumped) You may set the LIBGL_ALWAYS_INDIRECT environment variable to 1 before running my GLUT programs, as follows. export LIBGL_ALWAYS_INDIRECT=1 Reference