Posts

Showing posts from April, 2011

Java applet on Ubuntu

Test java install at the following link:  http://www.java.com/fr/download/help/testvm.xml Sun java plugin Remove any existing instance of open jdk plugin sudo apt-get remove icedtea6-plugin Then install: Sun java plugin Make the plugin work It this link still does not work: http://www.java.com/fr/download/help/testvm.xml sudo update-alternatives --config firefox-javaplugin.so sudo update-alternatives --config mozilla-javaplugin.so Choosing /usr/lib/jvm/java-6-sun/jre/lib/i386/libnpjp2.so has worked for me Open jdk plugin Remove 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 Database export current database as sql and edit sql file replace `wp_ with `wp_ nnn _ where nnn is the blog id in wp_options change field name wp_user_roles to wp_nnn_user_roles Note that wp_user will be ignored  Rename links wp-content/uploads/xxx to files/xxx wp-content/gallery to wp-content/blogs.dir/nnn/gallery import the file in the new database Files Transfer content of uploads to blogs.dir/nnn/files (Nextgen) Transfer content of gallery to blogs.dir/gallery Settings 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_options Post update After importing the new database, you might to change some links after changing the domain name: UPDATE wp_nnn_posts SET POST_CONTENT = r

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)