Paul's Programming Notes     Archive     Feed     Github

Green Mountain Energy's B2B Site

Green Mountain Energy has the worst B2B portal I’ve seen in my life. The worst parts:

  • It only works in IE (barely, and switching between browser versions in the F12 menu doesn’t help)
  • The page only takes up ~30% of the browser window (see the picture)
  • Nothing is functional, I can’t change my automated billing agreement because there’s no submit button.
  • If you have more than one address on your account, just give up.

Picture: http://i.imgur.com/cP4CLTl.png

Update: They sent a letter saying they made a new business portal site. www.businessportal.greenmountain.com My first visit gives me an “Our site is currently down as we upgrade our systems.” error message.

Don't Use == null - Python

http://stackoverflow.com/questions/3289601/null-object-in-python

It says not to use == to check for "none-ness". It's better to use:

if variable is none:
    <your code>

Why? "And the reason for choosing egg is None over egg == None: The latter can be overloaded, and is likely to break when comparing valid object with None (depends on how it's implemented, but you don't expect everyone to take comparisions with None into account, do you?), while is always works the same."

Prezi Video With No Audio

I converted a wmv video to a few different formats (mp4 and flv) and still couldn’t get the audio to play in Prezi. However, videos with the following codec settings will work:

codec info

Solution: Open your video with Handbrake and convert it to H264 with AAC as the selected audio codec and it will play just fine.

Useful Bootstrap Links

http://bootstraphero.com/the-big-badass-list-of-twitter-bootstrap-resources

Also, an user named Billy Cravens on Meetup.com left a ton of good bootstrap links (bootsnip looks especially awesome) in this post: http://www.meetup.com/HoustonCFUG/events/79862792/

Twitter Bootstrap:
http://twitter.github.com/bootstrap/

Bootswatch: (free Bootstrap themes)
http://www.bootswatch.com

Wrap Bootstrap (premium Bootstrap themes)
http://www.wrapbootstrap.com

Common Bootstrap Snippets
http://www.bootsnipp.com

Some nice date plugins for Bootstrap
http://www.eyecon.ro/bootstrap-datepicker/ https://github.com/dangrossman/bootstrap-daterangepicker

Bootstrap WYSIWYG editor plugin
http://jhollingworth.github.com/bootstrap-wysihtml5/

Integrating Bootstrap with jQueryValidate
http://alittlecode.com/jquery-form-validation-with-styles-from-twitter-bootstrap/

Nice data grids:
http://www.datatables.net

Integrate Bootstrap with Data Tables:
http://datatables.net/blog/Twitter_Bootstrap_2

PHP - Verify File Is Uploaded And Zip


if($_FILES["zip_file"]["name"]) {
     $filename = $_FILES["zip_file"]["name"];


     $name = explode(".", $filename);


     $continue = strtolower(end($name)) == 'zip' ? true : false;
     if(!$continue) {
           $message = "The file you are trying to upload is not a .zip file. Please try again.";
     } else {
          $message = "File Is .zip";
     }
}