Navigation

Search

Categories

On this page

Company Phone Book
View a RFC quickly
Code humor
Code Humor

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 120
This Year: 1
This Month: 0
This Week: 0
Comments: 40

Sign In
Pick a theme:

# Monday, October 29, 2007
Monday, October 29, 2007 10:42:12 AM (Mountain Standard Time, UTC-07:00) ( )

Most of the largish companies I've worked at have a online phone-book for employees.

There's always some kind of a web-interface, with a search form on or near the front page of the intranet. It's wasteful of my time to open a browser, wait for it to load the home page, click into the form, type my query, and hit enter or click the search button.

It's much faster to START+R, type "p jones" and hit enter, and let the magic happen.

Open your user profile (START+R, %USERPROFILE% or just "." (quotes aren't necessary, they're for just for emphasis in this blog)), and enter.

Create a new batch script named p.cmd. I find the easiest way to do this is to Select New Text Document from the file menu, and rename it. This obviously only works if you have the 'Hide extensions for known file types' option turned off in your Windows Explorer preferences. (Tools, Options, View tab)

my batch file currently looks like this

start "phonebook" "c:\program files\internet explorer\iexplore.exe" http://<intranet>/<application>?sortField=FullName^&sortOrder=ASC^&searchAnywhere=OFF^&searchName=%1

You'll obviously need to be URI savvy enough to get your own URI from the application (assuming that it uses the GET verb)

Important things to note are that the ampersand character (&) must be escaped with the caret (^) because this command will be processed at the Windows NT Command line, and ampersand is the way that two commands are chained together. (i.e. DO THIS & DO THAT.) and finally the %1 which is the first command line parameter in the script I execute.

Watch for a follow up entry where I describe how to do this when you have a web-form that uses the POST method in the form (this makes me cry, your corporate web-developers should not be using POST to retrieve information)

 

Comments [1] | | # 
# Monday, October 22, 2007
Monday, October 22, 2007 7:21:38 PM (Mountain Daylight Time, UTC-06:00) ( )

Sometimes you just need to look at an RFC.

I should have a whole series on Shell Scripts for Windows.

@ECHO OFF
ECHO RFC Retrieval Tool
ECHO Copyright Jeremy Simmons 2007

IF []==[%1] (
ECHO Specify a RFC number as the first parameter
GOTO :EOF
)

SET RFCROOT=C:\kb\RFC
SET WGETBIN=C:\utils\wget
SET RFCFILE=rfc%1.txt

pushd "%RFCROOT%
IF NOT EXIST %RFCFILE% (%WGETBIN%\wget.exe -nc http://www.ietf.org/rfc/rfc%1.txt || (ECHO. & ECHO That file doesn't exist on the ietf.org server & ECHO.)) 
start %RFCFILE%
popd
Comments [0] | | # 
Monday, October 22, 2007 7:16:26 PM (Mountain Daylight Time, UTC-06:00) ( )

Reposted from http://codebetter.com/blogs/scott.bellware/archive/2007/10/02/169121.aspx

I say :tomato
You say typeof(Fruit).GetField('tomato', BindingFlags.Instance | BindingFlags.Public)

I say :potato
You say typeof(Tuber).GetField('potato', BindingFlags.Instance | BindingFlags.Public)

:tomato
typeof(Fruit).GetField('tomato', BindingFlags.Instance | BindingFlags.Public)

:potato
typeof(Tuber).GetField('potato', BindingFlags.Instance | BindingFlags.Public)

Let's call the whole thing off

(*because your mother doesn't say :potato, she says "potato", and I end up running out of memory, whereas my mother says typeof(Fruit).GetField('tomato', BindingFlags.Instance | BindingFlags.Public) and I always have a clear heap )

Of course, this wouldn't make sense to you if you know nothing about Ruby (www.ruby-lang.com) and it's managment of Strings

Great article here http://glu.ttono.us/articles/2005/08/19/understanding-ruby-symbols

 

Comments [0] | | # 
# Thursday, October 11, 2007
Thursday, October 11, 2007 4:55:01 PM (Mountain Daylight Time, UTC-06:00) ( )

public string ConjunctionJunction(string words, string phrases, string clauses)
{
return (String)(words + phrases + clauses);
}

original props go to rlemon at http://www.codingforums.com

Comments [0] | | #