Saturday, December 22, 2012

Merry Christmas!

It's that time of the year again and, since it appears that the Maya spared us, I want to share with you a couple of gists that I came up with recently that could be generally useful. Btw, there are lots of other gists on my profile, check them out.

If you find these script useful star them on github, drop me a comment or just share them. Once again, Merry Christmas everyone!

The first one is for Java people and is a HttpServletRequestWrapper that supports:
  1. injection of the principal: for those cases when you use trust authentication and you are rolling your own SSO solution and/or you need to integrate with an existing SSO solution (I used it with for CAS)
  2. supports reading of the InputStream multiple times. We all know that in a POST the request input stream can only be read once, so this will definitely help you if you need to access the post body or a request parameter in a Filter and make sure the upstream servlets/filters still work

The second gift gist is for Windows admins and is written in vbs (I even do VBS when it is necessary, now you get my twitter handle, don't you?). It is a login script that can be used in a Windows Domain to recreate Desktop links on each user logon. The configuration for each link is stored in the script as a dictionary of dictionaries and link-to-user assignment is done by adding the user to an AD group. The source is heavily commented and should be easy enough to understand for anyone who's ever programmed, even if not in vbs.

No comments: