Wednesday, December 31, 2008
Download HQ MP4 or FLV movies from youtube
"&fmt=18" for HQ MP4 format
or
"&fmt=6" for HQ FLV format.
The "Flash Video Resources Downloader" Firefox addon seems to get this right and is able to download FLV, HQ FLV and HQ MP4 format movies from Youtube and can also handle similar sites. The downside is reliance on a web hosted php script (it means visiting this site every time you want to download something to grab the URL).
Thursday, December 11, 2008
Export VIM syntax highlighting to HTML
You can export the colorscheme based syntax highlighting in used in your VIM instance to a HTML file.
Just set a colorscheme and enable syntax highligting in VIM"
colorscheme torte
syntax on
Then you can export the same color scheme to a HTML file:
:runtime! syntax/2html.vim
This works for any file type supported by VIM. Just make sure you save the file before using the right extention.
Script for automating hardlink creation
:: Linking script
:: Usage: ln "source\REGEXP" destination
@echo off
set sourcedir=%1
set destdir=%2
if "%1" == "" goto usage
echo "Linking" %sourcedir% "\*" to %destdir% "\*"
if not exist %destdir% mkdir %destdir%
:: Create the destination directory if it does not exist
shift
if "%1" == "" goto end
for %%i in (%sourcedir%) do fsutil hardlink create %destdir%\%%~nxi %%~fi
goto iterate
:usage
color 4f
echo "Usage: ln.bat source-directory\REGEXP destination-directory
echo "If the destination directory does not exist it will be created."
echo "If a fully qualified path is not used, current directory will be used"
pause
color
:end
set sourcedir=
Tuesday, December 09, 2008
Scripting VMware Infrastructure with PowerShell

You need to install the .NET Framework (2.0 at least), PowerShell 1.0 and the VMware VI Toolkit. All are freely available.
Get-VICommand to list available cmdlets and read the VI Toolkit Cmdlets Reference for documentation.
Monday, December 08, 2008
Creating hardlinks on Windows
You can use fsutil on Windows XP and Windows 2003 or mklink on Windows Vista and 2008 to create hardlinks in a Windows environment. This requires a NTFS filesystem.