Showing posts from April, 2011

Java applet on Ubuntu

Test java install at the following link:
Sun java pluginRemove any existing instance of open jdk plugin

sudo apt-get remove icedtea6-plugin

Then install: Sun java plugin
Make the plugin workIt this link still does not work:

sudo update-alternatives --config
sudo update-alternatives --config

Choosing /usr/lib/jvm/java-6-sun/jre/lib/i386/ has worked for me
Open jdk pluginRemove any existing instance of sun java plugin

sudo apt-get remove sun-java6-plugin

Then install: Icedtea plugin

Wordpress to Wordpress multisite

This assumes that you have a new wordpress installed with multisite enabled and that you want to move an existing site into it. It also assumes that you have WordPress MU Domain Mapping plugin installed
Databaseexport current database as sql and edit sql filereplace `wp_ with `wp_nnn_ where nnn is the blog idin wp_options change field name wp_user_roles to wp_nnn_user_rolesNote that wp_user will be ignored Rename linkswp-content/uploads/xxx to files/xxxwp-content/gallery to wp-content/blogs.dir/nnn/galleryimport the file in the new databaseFilesTransfer content of uploads to blogs.dir/nnn/files(Nextgen) Transfer content of gallery to blogs.dir/gallerySettings update(Nextgen) option: update default folder (wp-content/gallery) to wp-content/blogs.dir/nnn/gallery/ (to do this in wp_nnn_options, field ngg_optionsPost updateAfter importing the new database, you might to change some links after changing the domain name:
UPDATE wp_nnn_posts SET POST_CONTENT = replace(POST_CONTENT, 'myoldd…

Auto-formatting in Visual Studio C++ 2010

To autoformat the source code with the correct indentation the shortest shortcut I found is CTRL+A,K,F (keep CTRL pressed than press A - to select all - then K then F to reformat)

Visual Studio, settings Build current project shortcut

Go to Tools|Customize... then press the Keyboard... button at the bottom. Look for Build.BuildOnlyProject and assign whatever shortcut you want (F7, F11...)

Cygwin, setting svn editor

Under cygwin but sing regular Win32 svn, setting the SVN_EDITOR for example using notepad++ is the following:
export SVN_EDITOR='"C:\Program Files (x86)\Notepad++\notepad++.exe"'

Manipulating svn:ignore using command line

svn:ignore is a property that must be set or get.
To check current folder ignore list (assuming you're at the folder location - hence using . below but that could be any folder name)
svn propget svn:ignore .
Example to set to ignore Thumbs.db
svn propset svn:ignore "Thumbs.db" .
Or simply edit the property
svn propedit svn:ignore .

Deleting files (.svn, Thumbs.db)

Remove .svn files
rm -rf $(find . -name .svn)
Remove Thumbs.db files
rm -rf $(find . -name Thumbs.db)