a brief about me
Fabio Zendhi Nagao
is an applied mathematician from IME - USP - Brazil currently working as CTO at Lojcomm Internet, a company specialized in e-commerce. + info
fields of interest: E-commerce, Collective Intelligence, Interoperability, Web 2.0, Web Design, Mathematical Programming, Pattern Recognition.
contacts: Twitter and nagaozen @hotmail.com, @gmail.com and @yahoo.com
recent entries
- HOWTO: Mount Windows Share in Linux
- HOWTO: Restore GRUB after installing windows
- HOWTO: Remove a parsers from ctags
- HOWTO: Recover IUSR and IWAN
- Installing gedit with autocomplete 0.11.0 in windows 7
- JSON to XML
- Fixing Classic ASP Request.QueryString Unicode (UTF-16) bypass
- Classic ASP Orderly compiler
- Enable IIS6 gzip compression to maximum AXE performance
- Classic ASP JSON Revisited
categories list
- Adobe AIR (0)
- Application (8)
- ASP (22)
- AXE (11)
- Design (3)
- Framework (10)
- GEdit (4)
- IIS (5)
- Javascript (8)
- Miscellaneous (4)
- Mootools (2)
- Notepad++ (1)
- Optimization (12)
- Perl (1)
- PHP (2)
- Plugins (5)
- Python (4)
- Standards (5)
- Server (15)
- Services (3)
- Symphony CMS (1)
- Ubuntu (4)
- VBScript (14)
- Windows (2)
reading blogroll
- Ajaxian.com
- A List Apart
- Chaotic Pattern
- CNet Clientside
- Developer YUI
- Digitarald
- iMasters
- Mezzoblue
- Mootools blog
- Varien eCommerce Blog
out of date goodies
In order to help the large amount of people looking for my old widgets everyday, I'm putting below a list of the most wanted. Note that the others are still accessible at http://zendold.lojcomm.com.br/.
Blog
Latest Entries
Nov 11th
HOWTO: Mount Windows Share in Linux
Filed Under: Ubuntu
- Install
sambaandsmbfs - Make folder
/mnt/share - Make file
/etc/cifspwand fill it withusername=andpassword= $ sudo chmod 600 /etc/cifspw- Edit
/etc/fstab://ip/share /mnt/share cifs exec,credentials=/etc/cifspw 0 0 $ sudo mount -a
May 10th
HOWTO: Restore GRUB after installing windows
Filed Under: Ubuntu, Windows
Yesterday my notebook (which came with Windows 7) simply went to a boot loop unless I change to OS to Linux o_O. Since reinstalling Windows 7 messes the whole MBR, a GRUB restore is required to get the multiboot back to work. These are the steps to get it working again:
- Boot with a LiveCD and in places, click the original grub partition get it mounted.
- Open the terminal.
- Verify if it's the right partition
$ mount | tail -1. Something like/dev/sda5 on /media/0d104aff-ec8c-44c8-b811-92b993823444 type ext4 (rw,nosuid,nodev,uhelper=devkit)will be returned. - To make sure this is indeed the Ubuntu boot partition, run
$ ls /media/0d104aff-ec8c-44c8-b811-92b993823444/boot - To restore the grub type
$ sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda --recheck - Reboot and enjoy!
Mar 31st
HOWTO: Remove a parsers from ctags
Filed Under: GEdit, Optimization
Sometimes it's useful to remove a language parser from the ctags binary. Specially if you are extending it via ctags.conf file. You will need to remove the language bindings at parsers.h (one line here) and source.mak (two lines here), then just recompile the code to get the parsers away.
Mar 25nd
HOWTO: Recover IUSR and IWAN
Filed Under: Server, Windows
Today I faced a very interesting problem: How to set back a site, in Windows 2003, to anonymous access once its password has been accidentally changed in the Directory Security?
Besides the very intriguing fact of "How could someone do that?!", it's equally fascinating that just clicking "Enable anonymous access" and leaving the password field empty won't bring your site back. Neither using "guest" nor "anonymous".
What's going on here is that some Windows account passwords are set automatically and are never known. Once you have them out of sync you have a "Oh, man!" kind of big problem since your customer is calling all the time asking: "Why my password is asking for user and password?! WHY WHY WHY?!".
Fixing this is easy but a little tricky. Here are the steps:
1 -- Open C:InetpubAdminScriptsadsutil.vbs and search for the function IsSecureProperty. It should be something like:
On Error Resume Next
Dim PropObj,Attribute
Set PropObj = GetObject("IIS://" & MachineName & "/schema/" & ObjectParameter)
If (Err.Number <> 0) Then
ReportError ()
WScript.Echo "Error trying to get the property: " & err.number
WScript.Quit (Err.Number)
End If
Attribute = PropObj.Secure
If (Attribute = True) Then
IsSecureProperty = True
Else
IsSecureProperty = False
End If
End Function
2 -- Edit it TEMPORARILY to always return false:
' On Error Resume Next
' Dim PropObj,Attribute
' Set PropObj = GetObject("IIS://" & MachineName & "/schema/" & ObjectParameter)
' If (Err.Number <> 0) Then
' ReportError ()
' WScript.Echo "Error trying to get the property: " & err.number
' WScript.Quit (Err.Number)
' End If
' Attribute = PropObj.Secure
' If (Attribute = True) Then
' IsSecureProperty = True
' Else
' IsSecureProperty = False
' End If
IsSecureProperty = False
End Function
3 -- Now your are ready to retrieve the built-in anonymous password by using the following command:
cscript adsutil.vbs get w3svc/anonymoususerpass4 -- or the IWAN password by using:
cscript adsutil.vbs get w3svc/wamuserpass5 -- Remove the adsutil.vbs modifications and set the password in the Directory Security.
Note: If instead of using get to retrieve the built-in password, you think it's better to set a new password, you may use the
setcommand and after that you should runcscript synciwam.vbs -vto sync up the new password in all the services.
That's it! And... yeah, the blog is not dead xD
Jan 31st
Installing gedit with autocomplete 0.11.0 in windows 7
Filed Under: Application, GEdit, Python, Windows
Many developers that use the GNOME desktop environment already know how powerful, yet lightweight, it's official text editor gedit is. Unlike Windows notepad, GNOME gedit comes with a lot of little customizable options and a very flexible plugins system which really makes the programmers day by day a lot better.
But what most of the users don't know is that both Mac and Windows can run gedit using the packages made by it's own core developers. This means that no matter what OS you are running, you have in gedit a good choice of text editor to work with.
What is gedit
According to the project page:
gedit is the official text editor of the GNOME desktop environment.
While aiming at simplicity and ease of use, gedit is a powerful general purpose text editor. Currently it features:
- Full support for internationalized text (UTF-8)
- Configurable syntax highlighting for various languages (C, C++, Java, HTML, XML, Python, Perl and many others)
- Undo/Redo
- Editing files from remote locations
- File reverting
- Print and print preview support
- Clipboard support (cut/copy/paste)
- Search and replace
- Go to specific line
- Auto indentation
- Text wrapping
- Line numbers
- Right margin
- Current line highlighting
- Bracket matching
- Backup files
- Configurable fonts and colors
- A complete online user manual
gedit features also a flexible plugin system which can be used to dynamically add new advanced features to gedit itself.
The following table lists the plugins distributed with the gedit package:
- Change case: Changes the case of the selected text.
- Document statistics: Counts the number of lines, words, characters with spaces, characters without spaces, and bytes in the current file. The plugin displays the results in a Document Statistics dialog.
- External tools: Run external programs and displays the resulting output.
- File browser pane: Browse and open files directly from the gedit side pane.
- Indent lines: Indents the selected lines, or removes the indentation from the selected lines.
- Insert date/time: Inserts the current date and time into a file.
- Snippets: Expands customizable macros to commonly used code blocks.
- Sort: Sorts the selected text.
- Spell checker: Checks the spelling in the selected text. You can configure gedit to check the spelling automatically, or you can check the spelling manually, in the specified language.
- Tag list: Displays in the sidepane a list of common tags to insert into a file.
- User name: Inserts the name of the current user into the file.
But the windows package also includes the official gedit-plugins:
- Session Saver: Save and restore your working sessions
- Smart Spaces: Forget you're not using tabulations.
- Embedded Terminal: Embed a terminal in the bottom pane.
- Code comment: Comment out or uncomment a selected block of code.
- Bracket Completion: Automatically adds closing brackets.
- Show/Hide Tabbar: Add a menu entry to show/hide the tabbar.
- Color Picker: Pick a color from a dialog and insert its hexadecimal representation.
- Draw Spaces: Draw Spaces and Tabs
- Join/Split Lines: Join several lines or split long ones
- Character Map: Insert special characters just by clicking on them.
Ok, that said, I'm going to write this small guide below:
How to install gedit with autocomplete for Windows 7
- Download: gedit for windows, ActiveState Python x86 and gedit-plugin-autocomplete
- Install both gedit and ActiveState Python.
- Because autocomplete plugin requires a json interpreter and the python which comes with gedit doesn't features the json package, we need to copy the json package from the activestate install to the gedit install. In a command prompt, type:
Copy C:\Python27\Lib\json "C:\Program Files (x86)\gedit\bin\Lib\". - Extract the
gedit-plugin-autocomplete - Move
autocompletefolder andautocomplete.gedit-pluginfile toC:\Program Files (x86)\gedit\lib\gedit-2\plugins\ - Open gedit, go
Edit > Preferencesand clickPluginstab. - Check everything XD
- Plugins should be alright, but you can also modify additional stuff in the other tabs (View, Editor and Font & Colors)
Testing
To check if the autocomplete is running, create a new document, set the language to ASP and type:
<%dim Parser : set Parser = new Markdown
Response.write( Parser. )
Now, set the prompt at the end of the word Parser., erase the dot and type it again. A pop-up with the following contents should appear:

That's it, enjoy!
Tumblelog (?)
- 6 Aug 09
-
Implemented "addThis" socialize icon to the bottom of page entries.
- 18 Jan 09
-
Finally updated my categories list and assigned the entries to it.
- 21 Oct 08
-
Standards section has been updated with a more complete coding standards specification.
- 25 Jan 08
-
Created a section named “Goodies” where I’m going to share my open source works.
- 20 Jan 08
-
Created a section named “Standards” where I’ll be putting useful things like color palettes and tips like: naming conventions, code snippets, etc.
- 10 Jan 08
-
Changed Symphony built-in RSS delivery to FeedBurner PRO.
-
I’ve added an “Out of date widgets” section at sidebar to help people find my old toys while I’ve not developed the new ones.
- 9 Jan 08
-
Zendlab is finally running. Yesterday evening I've acquired a very charming host plan at Daily Razor and here it is – a brand new version of nagaozen site! Thanks for the the Symphony team for this great CMS which I'm basing on.