Friday, April 30, 2010

Run multiple instances of Internet Explorer

Dear Lord,

Thank you for my life, my wife and FOR Hilbrand Edskes who built THIS APPLICATION allowing me to run multiple instances of Internet Explorer.

One more thing...

LAST YEAR YOU TOOK MY FAVORITE ACTOR, PATRICK SWAYZIE. YOU TOOK MY FAVORITE ACTRESS, FARAH FAWCETT. YOU TOOK MY FAVORITE SINGER, MICHAEL JACKSON. I JUST WANTED TO LET YOU KNOW, MY FAVORITE BROWSER IS INTERNET EXPLORER.

AMEN.

 

Sunday, April 18, 2010

Classic ASP VBScript OAuth

FINALLY. VBScript OAuth with example project!

OAuth is hard. I don't care if you're the greatest engineer on Earth, at first glance OAuth is a WTF moment. Having a slew of Classic ASP sites to maintain, and no luck finding any help in the VBSCript OAuth department, I dove in to the HELL that is OAuth. When I'd finally emerged, although scarred for life, I had a full fledged OAuth implementation... done entirely in VBScript... OK, not entirely... but mostly no doubt.


Check it out here: Classic ASP VBScript OAuth

Get twitter user profile pic by name, unauthenticated

No javascript required. No server side component to deal with. Just drop the image tag in using this generic handler as the src:

http://api.twitter.com/1/users/profile_image/[SCREEN_NAME]

Replace "[SCREEN_NAME]" with the actual screen name and, voilĂ .

EX: <img src="http://api.twitter.com/1/users/profile_image/sdesapio">


 

Saturday, April 10, 2010

oAuth 1.0a: oauth_callback in development

The "oauth_callback" parameter goes in the "request token" request NOT the "access token" request! You'll get back an oauth_verifier value which then becomes part of your "access token" request.

AAARRRRRRGGGGGGGGHHHHHHHHHH! K. I feel better.

More info: Signed Callback URLs

Tuesday, April 06, 2010

Adjust contrast in Windows Movie Maker.

How is it possible that contrast adjustment is not built into Windows Movie Maker by default!?

All I can say is... thank heaven for Daniel. Daniel, whoever you are, wherever you are, THANK YOU.

--------------------

<!-- Daniels contrast (2005) http://www.danielfx.moo.no *This XML only works in XP*-->
<TransitionsAndEffects Version="1.0">
<Effects>
<EffectDLL guid="{B4DC8DD9-2CC1-4081-9B2B-20D7030234EF}">
<Effect name="Contrast up" iconid="29" comment="by daniel">
<Param name="InternalName" value="Standard" />
<Param name="Red" value="0.2"/>
<Param name="Blue" value="0.2"/>
<Param name="Green" value="0.2"/>
<Param name="yellow" value="0.2"/>
<Param name="Brightness" value="0.9"/>
</Effect>
<Effect name="Contrast Down" iconid="29" comment="by daniel">
<Param name="InternalName" value="Standard" />
<Param name="Contrast" value="0.5"/>
</Effect>
</EffectDLL>
</Effects>
</TransitionsAndEffects>

--------------------

1. Copy and paste the above XML into Notepad.
2. Save in C:\Program Files\Movie Maker\Shared\AddOnTFX\ as as Contrast.xml (create the AddOnTFX folder if this is your first time adding an XML effect).
3. Restart Movie Maker.

Voila. Contrast adjustment on Windows Movie Maker.

YUI 3: Looping through an array of elements

OH MAN... I was about ready to kill somebody over this one. Being a die-hard YUI2'er, the concepts introduced in YUI 3, while possibly familiar to the jQuery crowd, are COMPLETELY foreign to us YUI 2 jedis.

In any event, the how to...

------------------

YUI 2


var _d = YAHOO.util.DOM;
var aElements = _d.getElementsByClassName('className');
var i = aElements.length;

while(i--){
    doSomething(aElements(i));
}

------------------

YUI 3


YUI().use('node', function(Y){
    var aElements = Y.all('div.selector');

    var i = aElements.size();
    while(i--){
        doSomething(aElements.item(i));
    }
}
------------------

Note the "size" call as opposed to "length" and the "item(i)" in the "doSomething" call. Ouch.

I love YUI and have been a huge fan of Crockford, Glass, Eric, Nate and the rest of the crew over there but DUDES! C'MON! jk ;)

I finally came to grips after finding the "Rosetta Stone." Have a look and good luck!

Monday, April 05, 2010

Error -2146697210

The path to the file is wrong. Your XML parser can not find the file. Check the base path as well as the file extension.

Monday, August 25, 2008

Sure don't see this every day...

(CREDIT: pennybuckets forwarded email)

Talk about having your camera ready at an opportune time...












Friday, August 22, 2008

How to cope with work


Pennybuckets at it again...

Phase 1
You are listening to Stevie Wonder.
(Your first day at work and all is fine and great.)

Phase 2
You're listening to HOUSE music.
(After a while you are so busy that you are not sure if you're coming or going anymore)

Phase 3
You are listening to Metal.
(This is what you feel like at month's end)

Phase 4
You are listening to Hip Hop.
(You become bloated due to stress, feel sluggish and suffer from constipation)

Phase 5
You are listening to GANGSTA RAP
(After more time passes, your eyes start to twitch, you forget what a 'good hair day' feels like as you just fall out of bed and load up on caffeine!!!)

And Finally...
You are listening to Techno (on Ecstasy)
(The truth - how all employees end up eventually...)

Wednesday, August 20, 2008

Art on the cutting edge

Sometimes, eating food just isn't enough to satisfy the inner artist's appetite.

(from pennybuckets email)














Friday, August 15, 2008

NEW OFFICE POLICY

Another from my sister...

-------------------------------------------------

EFFECTIVE AUGUST 1, 2008

NEW OFFICE POLICY

Dress Code:

1) You are advised to come to work dressed according to
your salary.

2) If we see you wearing Prada shoes and carrying a
Gucci bag, we will assume you are doing well financially
and therefore do not need a raise.

3) If you dress poorly, you need to learn to manage your
money better, so that you may buy nicer clothes, and
therefore you do not need a raise.

4) If you dress just right, you are right where you need
to be and therefore you do not need a raise.<>


Sick Days:
We will no longer accept a doctor's statement as proof
of sickness. If you are able to go to the doctor, you are able to come to work.

Personal Days:
Each employee will receive 104 personal days a year.
They are called Saturdays & Sundays.

Bereavement Leave:
This is no excuse for missing work. There is nothing
you can do for dead friends, relatives or co-workers. Every
effort should be made to have non-employees attend the
funeral arrangements in your place. In rare cases where
employee involvement is necessary, the funeral should be
sc heduled in the late afternoon. We will be glad to
allow you to work through your lunch hour and
;subsequently leave one hour early.

Bathroom Breaks:
Entirely too much time is being spent in the toilet.
There is now a strict three-minute time limit in the
stalls. At the end of three minutes, an alarm will
sound, the toilet paper roll will retract, the stall
door will open, and a picture will be taken. After your
second offense, your picture will be posted on the
company bulletin board under the 'Chronic Offenders'
category. Anyone caught smiling in the picture will be
sectioned under the company's mental health policy.

Lunch Break: (Love this one)

* Skinny people get 30 minutes for lunch, as they need
to eat more, so that they can look healthy.

* Normal size people get 15 minutes for lunch to get a
balanced meal to maintain their average figure.

* Chubby people get 5 minutes for lunch, because that's
all the time needed to drin k a Slim-Fast.


Thank you for your loyalty to our company. We are here
to provide a positive employment experience. Therefore,
all questions, comments, concerns, complaints,
frustrations, irritations, aggravations, insinuations,
allegations, accusations, contemplations, consternation
and input should be directed elsewhere.


The Management

DUE TO BUDGET CUTS, THIS IS YOUR NEW CUBICLE

My sister sends me the funniest shtuff...









Thursday, March 13, 2008

Setting up PHP on IIS 5 (XP 5.1)

1. Download both PHP and PECL (NOT the non-thread safe file) Windows zip packages from: http://www.php.net/downloads.php

2. Extract PHP zip into C:\PHP

3. Extract PECL zip into C:\PHP\ext (make sure you're not adding the PECL folder but rather the contants)

4. Create 3 subfloders in C:\PHP - sessions, upload, log

5. Create new file php.log in C:\PHP\log

6. Add ";C:\PHP" (without the quotes) to your Environment Variables.
  • Right-click "My Computer", select properties
  • Select the Advanced tab and click Environment Variables
  • In System Variables, select "Path" and click the Edit button
  • Paste ";C:\PHP" (without the quotes) to the end of the existing string

7. Add New "PHPRC" System Variable
  • From the Environment Variables window, click New under System Variables
    • Variable Name = PHPRC
    • Variable Path = C:\PHP

8. Add PHP mapping to IIS
  • From IIS mmc, right-click "Web Sites"
  • Click the "Home Directory" tab
  • Click the "Configuration" button
  • From the "Mappings" tab, click the "Add" button
    • Executable: c:\PHP\php5isapi.dll
    • Extension: .php


9. Configure PHP.ini
  • Copy php.ini-recommended and rename to php.ini
  • In php.ini replace the following:
    • extension_dir = "./" with extension_dir = "c:\PHP\ext"
    • session.save_path = "/tmp" with session.save_path = "c:\PHP\sessions"
    • upload_tmp_dir = with upload_tmp_dir = "c:\PHP\upload"
    • error_log = filename with error_log = "c:\PHP\log\php.log"
    • extension=php_mysql.dll with extension=php_mysql.dll

10. Restart IIS

11. Test
  • Create new web site in IIS
  • Create file in new web site: phpinfo.php with the following as content:
    <?php
    phpinfo();
    ?>
  • Open new file in browser. If config page loads, you're done.

Sunday, January 27, 2008

Enabling Security Tab for Files in Windows Explorer (XP)

1. Windows Explorer -> Tools -> Folder Options
2. Click on the "View" tab.
3. Scroll to bottom - UNCHECK "Use simple file sharing (Recommended)"

Tuesday, December 25, 2007

Response.Expires = -1 not working

Forget -1. Really. Just forget it.

Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"


Copy, paste, done.

Monday, December 24, 2007

Fiddler running slow?

Put your IP address in your hosts file! If you've a dynamically assigned IP, you'll have to change it every once in a while - no big deal.

Ex:
127.0.0.1 localhost

Friday, December 07, 2007

SSL in development environment (IIS)

By far the simplest way to setup an SSL certificate for your testing and/or development environment. Works for IIS5.0, 5.1(XP) and 6.0.

Step 1. Download Internet Information Services (IIS) 6.0 Resource Kit Tools

Step 2. When running the installation package, do a custom setup and select only the "selfSSL" component.

Step 3. Start -> All Programs -> IIS Resources -> SelfSSL -> SelfSSL

Step 4. At the command prompt, copy and paste the following:

IMPORTANT: Make sure the replace [SERVER_NAME] with your real server(machine) name.

Done. Let me just say that I've actually seen people ask how to accomplish this task, only to be told, "It's a waste of time. Why would you ever need to do such a thing?!?! Just blah blah blah..."


Well first off, I don't know about you, but I like my dev environment to resemble, as closely as possible, my production environment. Second, this step is ABSOLUTELY CRITICAL when writing, testing and deploying ANY process that requires SSL. If you think it isn't, come back here when you finally figure it out and apologize.