Monday, October 29, 2012

How to disable the Windows built-in zip functionality?

http://superuser.com/questions/37578/how-to-disable-the-windows-built-in-zip-functionality
Windows 7
The process is similar to Vista in terms of deleting the same registry keys. However, due to additional protections built-in, you must first change ownership of the keys to your username, which must be an administrator account.

Open Registry Editor (go to Start Menu -> Run and type “regedit“).
Navigate to HKEY_CLASSES_ROOT\CLSID and perform steps 3-7 for each of the two keys:
{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31} and
{0CD7A5C0-9F37-11CE-AE65-08002B2E1262}.
Right-click on the key and select “Permissions…”. Click “Advanced” and then the “Owner” tab.
Select your username from the list.
Check the box next to “Replace owner on subcontainers and objects”. Click “OK”.
In the “Security” tab, select your username and grant Full Control. (If your username is not there, click “Add…”, type your username, then click “Check Names” and “OK”.) Click “OK” to apply the permissions settings.
Delete the registry key.
Repeat the process for the second key.
Restart Windows and enjoy a life free from zip folders!

Sunday, October 21, 2012

How to disable The Splash of Office 2010?

HKEY_CLASSES_ROOT\Word.Document.8\shell\Open\command
"C:\Program Files\Microsoft Office\Office14\WINWORD.EXE" /q

HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command
"C:\Program Files\Microsoft Office\Office14\EXCEL.EXE" /e

HKEY_CLASSES_ROOT\PowerPoint.Slide.8\shell\Open\command
"C:\Program Files\Microsoft Office\Office14\POWERPOINT.EXE" /s

Saturday, August 18, 2012

Thursday, August 16, 2012

Connecting Linux and Windows Together With a Network Cable

http://www.ehow.com/how_7208875_connect-ubuntu-windows-crossover-cable.html


Windows:

1 Connect the crossover cable to the network port of both the Ubuntu and the Windows computers.

2 Go to the "Start" menu and type "netcpl.cpl" in the "Run" or "search programs and files" field and press "Enter."

3 Right-click on "Local Network connection" and select "Properties."

4 Select "TCP/IP V4" and click "Properties."

5 Select "Use the following IP address" and enter 192.168.1.1 in the "IP address" field.

6 Click on the "Subnet mask" field to fill it automatically. Click "OK."

Linux:

7 Press "CTRL + ALT + F1" to open a terminal.

8 Type "sudo ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up" and press "Enter."

9 Type your password and press "Enter."

10 Press "CTRL + ALT + F7" to go back to the graphical interface.

Tuesday, June 12, 2012

Fixing "ECDSA unknown key type" error in OpenSSH

http://blog.slogra.com/post-169.html


If error message "ssh-keygen: generating new host keys: ECDSA unknown key type" appeared after starting sshd, then running the below commands should fix it.


touch /etc/ssh/ssh_host_ecdsa_key
touch /etc/ssh/ssh_host_ecdsa_key.pub

Wednesday, May 30, 2012

Useful Mac OS Command Line Script

Reset Software Update Server
defaults delete /Library/Preferences/com.apple.SoftwareUpdate CatalogURL

lsusb equivalent
system_profiler SPUSBDataType

Useful Unix Command Line Script

Find Dead Symbolic Links in The Whole System
find / -type l ! -exec test -r {} \; -print

Find And Replace Text Recursively
find . -type f -print0 | xargs -0 -n32 -P6 sed -i 's/AAA/BBB/g'

Search Text Recursively
find . -type f -print0 | xargs -0 -n32 -P6 grep -iH "ttt"

List The Size of Current Directory
du -sk *

Tuesday, March 27, 2012

Thursday, March 22, 2012

Enabling Java in Chrome for CentOS 6.2

http://www.wikihow.com/Enable-Oracle-Java-in-Your-Web-Browsers-on-Ubuntu-Linux
sudo mkdir /opt/google/chrome/plugins
sudo ln -s /usr/java/jre1.7.0_03/lib/amd64/libnpjp2.so /opt/google/chrome/plugins/libnpjp2.so

[FAILED] Building ODIN Under CentOS 6.2


Linux 2.6.32-220.7.1.el6.centos.plus.x86_64 #1 SMP Wed Mar 7 11:06:23 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux


Download the source code (1.8.4) from http://od1n.sourceforge.net/download.html
Extract the files.
CFLAG=-O2 -pipe -march=core2 (default for odin is -O3 -fno-tree-vectorize (O3 enabled it and this disabled it) )
./configure --enable-oilsupport --enable-pngsupport
Install gsl-devel 1.13-1
Install blitz-devel 1.9-13
BUG FIX: sudo ln -s /usr/lib64/blitz/include/blitz/gnu /usr/include/blitz/gnu
Install lapack-devel 3.2.1-4 (+ blas + gcc-gfortran)
Install qt-devel 3.3.8b-30 ( +many dependencies, especially i686 packages)
BUG FIX: sudo ln -s /usr/include/Qt /usr/lib64/qt4/include
BUG FIX: sudo ln -s /usr/lib64/pkgconfig/Qt.pc /usr/lib64/pkgconfig/qt.pc
Install qwt-devel 5.1.1-4 ( + libxi-devel, + qt-devel)
Install liboil-devel 0.3.16-4 (+dcbook-utils, +gtk-doc)
Install libpng-devel 1.2.46-2

QwtPlotPicker function can be found here /usr/include/qwt/qwt_plot_picker.h

ERROR during make:

/bin/sh ../libtool --tag=CXX   --mode=link g++  -DQT_THREAD_SUPPORT  -O3 -fno-tree-vectorize -O2 -pipe -march=core2  -L/usr/lib64/qt-3.3/lib   -o odin odincomp.o odinconf.o odindebugger.o odindialog_progress.o odindialog_process.o odindialog_system.o odindialog_system_moc.o odindialog_debug.o odindialog_debug_moc.o odindialog_idea.o odindialog_idea_moc.o odindialog_pulsar.o odindialog_pulsar_moc.o odindialog_tree.o odindialog_kspace.o odindialog_kspace_moc.o odindialog_new.o odindialog_new_moc.o odinmethod.o odinplot_range.o odinplot_range_moc.o odinplot_vtk.o odinplot.o odinplot_moc.o odinview.o odinview_moc.o odin.o odin_moc.o main.o ../odinseq/libodinseq.la ../odinqt/libodinqt.la ../odinpara/libodinpara.la ../tjutils/libtjutils.la
libtool: link: g++ -DQT_THREAD_SUPPORT -O3 -fno-tree-vectorize -O2 -pipe -march=core2 -o .libs/odin odincomp.o odinconf.o odindebugger.o odindialog_progress.o odindialog_process.o odindialog_system.o odindialog_system_moc.o odindialog_debug.o odindialog_debug_moc.o odindialog_idea.o odindialog_idea_moc.o odindialog_pulsar.o odindialog_pulsar_moc.o odindialog_tree.o odindialog_kspace.o odindialog_kspace_moc.o odindialog_new.o odindialog_new_moc.o odinmethod.o odinplot_range.o odinplot_range_moc.o odinplot_vtk.o odinplot.o odinplot_moc.o odinview.o odinview_moc.o odin.o odin_moc.o main.o  -L/usr/lib64/qt-3.3/lib ../odinseq/.libs/libodinseq.so ../odinqt/.libs/libodinqt.so ../odinpara/.libs/libodinpara.so ../tjutils/.libs/libtjutils.so -Wl,-rpath -Wl,/usr/local/lib
../odinqt/.libs/libodinqt.so: undefined reference to `QwtPlotPicker::qt_property(int, int, QVariant*)'
../odinqt/.libs/libodinqt.so: undefined reference to `QwtPlotPicker::staticMetaObject()'
../odinqt/.libs/libodinqt.so: undefined reference to `QwtPlotPicker::qt_invoke(int, QUObject*)'
../odinqt/.libs/libodinqt.so: undefined reference to `QwtAbstractScaleDraw::draw(QPainter*, QColorGroup const&) const'
../odinqt/.libs/libodinqt.so: undefined reference to `QwtPlotPicker::qt_cast(char const*)'
../odinqt/.libs/libodinqt.so: undefined reference to `QwtPicker::accept(QPointArray&) const'
../odinqt/.libs/libodinqt.so: undefined reference to `QwtPlotPicker::trackerText(QwtDoublePoint const&) const'
../odinqt/.libs/libodinqt.so: undefined reference to `QwtPlotPicker::className() const'
../odinqt/.libs/libodinqt.so: undefined reference to `QwtPlotPicker::qt_emit(int, QUObject*)'
collect2: ld returned 1 exit status

Friday, March 02, 2012

Change the Default Java in CentOS 6


http://chrisschuld.com/2008/10/installing-sun-java-on-centos-5-2/

Step (1) : Visit Oracle's web site to find the laest version of JRE http://www.oracle.com/technetwork/java/javase/downloads/index.html

Step (2) : Download the rpm file for JRE 1.7u3 x64
http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jre-7u3-linux-x64.rpm

Step (3) : Setup the alternatives correctly
[user@www]# alternatives --install /usr/bin/java java /usr/java/jre1.7.0_03/bin/java 2
[user@www]# alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
   2           /opt/jdk1.6.0_07/bin/java

Enter to keep the current selection[+], or type selection number: 2

Step (4) : Check to make sure the install was a success
[user@www]# java -version