Saturday, April 27, 2013

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.

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.


Friday, April 26, 2013

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."

Tuesday, April 23, 2013

Something I Need To Drill Into My Brain - Python

The operation of the slicing operator:
>>> word[:2]    # The first two characters
'He'
>>> word[2:]    # Everything except the first two characters
'lpA'

Monday, April 22, 2013

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:

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



Tuesday, April 16, 2013

Start Ser2Sock.c On Boot


Make a shell script saying the following:
./ser2sock -b 115200 -c -w 5000 -p 10000 -s /dev/ttyUSB0 -d -g 3

Tuesday, April 9, 2013

Easiest To Set Up FTP Server

http://askubuntu.com/questions/1722/basic-ubuntu-ftp-server

"I'm going to recommend PureFTPD because it's been the simplest and easiest to use in my opinion. You'll need to install it first: sudo apt-get install pure-ftpd once it's installed it'll start itself up."

Monday, April 8, 2013

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:
href="http://twitter.github.com/boots...
Bootswatch: (free Bootstrap themes)
http://www.bootswatch.com
Wrap Bootstrap (premium Bootstrap themes)
http://www.wrapbootstrap.com
Common Bootstrap Snippets
http://www.bootsnipp.com
Bootstrap WYSIWYG editor plugin
http://jhollingworth.github.com...
Integrating Bootstrap with jQueryValidate
http://alittlecode.com/jquery-f...
Nice data grids:
http://www.datatables.net
Integrate Bootstrap with Data Tables:
http://datatables.net/blog/Twit...

HTML5 In < IE9

https://code.google.com/p/html5shiv/

I saw this javascript library in the code for the Mozilla Support page (really well done). It looks like it adds HTML5 functionality to older versions of IE. Looks like it should be really useful in the future.

Tuesday, April 2, 2013

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";
     }
}