It’s bound to happen, you’re going to be in a hurry and put the snazzy, slick Mail Chimp sign-up form on your website.  The pop-up, after all, looks great, but I highly recommend testing it because there are some serious assumptions the API author makes, one being that your JQuery library, which this pop-up behavior requires is, for some reason, in the same folder as the path from which the pop-up is being called from.

That’s a problem since most URL paths in WordPress sites don’t actually exist.  See the problem?!

This article helps explain the best ways to fix this issue, if you’re not sure, use the “embedded form” option in Mail Chimp instead OR be sure to install the JQuery library before the Mail Chimp pop-up script gets called.  I hope this saves another PHP developer/Wordpress developer some time finding the solution.  I just wish Mail Chimp would CDN the version of JQuery if it can confirm JQuery isn’t already loaded, this would ensure no version conflicts and make the process much easier.

To view the solutions to this Mail Chimp pop-up problem, click here!


I created this page as a running repository of useful, miscellaneous web notes for later reference.


Javascript & JQuery

How to get the latest version of JQuery:

alert('JQuery: '+$.fn.jquery);   // Outputs JQuery: x.x.x

Useful info about Javascript and JQuery source maps — an explanation about what they are and how they are used:

http://elijahmanor.com/the-magic-of-the-jquery-1-9-source-map/

Parsley — A reliable and easy Javascript form validation library:

http://parsleyjs.org/

Get hostname in Javascript:

// For the host name only, use:

window.location.hostname

Server Notes, LAMP/WAMP

Latest WAMP install instructions — in less than 5 minutes you can deploy WAMP with MySQL server on localhost.  Not bad for quick local dev server.

http://forum.wampserver.com/read.php?2,123606


Symfony

A utility for Symfony to convert those awful annotations to YML files:

https://packagist.org/packages/sed/route-exporter-bundle


Helpful Symfony 3.0 base commit, to start new PHP Symfony projects:

https://github.com/itrascastro/Symfony-3-Base-Project
https://github.com/keefekwan/symfony2_forms

Best example of a form collection at work I think is here (many thanks to the programmers making these publicly accessible!)

https://github.com/sevnekish/user_manager


Symfony 2 performance tips:

http://labs.octivi.com/mastering-symfony2-performance-internals/

Form Type setDefaultOptions weird error:

http://stackoverflow.com/questions/31659102/symfony2-error-on-submitting-form-with-a-collection-of-forms-warning-spl-obj?rq=1


General Web Notes & Utilities

Free OST file viewer worked well, allows you to save a person’s Microsoft Exchange mailbox email file and open and view the contents without messing with the .ost file in Outlook!

http://www.ostviewer.com/

Waka Time — Free web development time tracking utility:

https://wakatime.com

Websites that show the latest hiring trends in the tech industry:
https://news.ycombinator.com/item?id=11202954

https://whoishiring.io/#!/stats/

A good simplified explanation and list about HTTP 2:

https://www.keycdn.com/support/http2/

Good article about the anatomy of a URL:

http://www.skorks.com/2010/05/what-every-developer-should-know-about-urls/

Steps for setting up DNS on a Ubuntu server:

http://mixeduperic.com/ubuntu/seven-easy-steps-to-setting-up-an-interal-dns-server-on-ubuntu.html


PHP/MySQL

PHP SQL injection – good article:

http://phpdelusions.net/sql_injection



Aaron Belchamber
22 years experience in marketing and building businesses

Senior PHP & Symfony Web Developer, Business Analyst, Marketing Director
Belchamber.us / TopDocsTalk.com
(904) 294-0803 • Jacksonville, Florida


Many awesome software packages like Odoo come with free downloadable editions, it’s much easier to install software and packages via the command line, but sometimes you might need to download the package so you have an image ready to deploy quickly.  Whatever your reason, if you have a .deb file, that’s the package for Debian and Ubuntu Linux servers, this is usually how you install the .deb files:

dpkg -i packageNameHere.deb
dpkg --install packageNameHere.deb
dpkg -i -R /path/to/dir/name/dotDebFiles/
dpkg -i --recursive /path/to/dir/name/dotDebFiles/
  1. -i or --install : Install the package.
  2. -R or --recursive : Recursively install all *.deb files found in specified folders and all of its sub-folders. /path/to/dir/name/dotDebFiles/ must refer to a folder instead of packageNameHere.deb file name.

I usually don’t leave notes about normal boring Windows PC issues, but if you are a company that backs up your users’ Outlook mailbox data, if you ever want to access these “.ost” files, you might be in for a surprise.  “.pst” files are easy, because in Outlook all you have to do is go into your account settings and select the new “.pst” file.  Not so for those using Outlook with Exchange.  No, thanks to Microsoft, that can’t be easy, so before I thought I had to set up a new email account on Exchange then copy the file to the appropriate /User/  folder on the Windows machine just to view these archived emails, I thought I’d look around online.

Sure enough, I found a few “Ost Viewers”, tried one, and it worked just fine.  One was free that allowed me to go in and browse the .ost as if I had already set up the mailbox in Outlook.  This took only a couple of minutes.  I don’t want to endorse any particular website but searching “ost viewers” did the trick.  I hope this helps someone save some time, it’s never pleasant when something that seems so simple turns into potentially a two hour fiasco!


This is a very useful Twig that I use in a lot of different forms.  I attach a listener and when they click “Update” it will redirect the user by appending the URL with the /year/month to hook nice and cleanly in built-in routes to pass the year and month into different controllers.

<form id="yearMonthWidget" name="newDate1" method="get" action="">

   <select name="month">
      {% for mo in 1..12 %}
         <option value="{{ mo }}">{{ ('2012-' ~mo~'-01')|date("M") }}</option>
      {% endfor %}

   </select>

   <select name="year">
      {% for yr in "now"|date("Y")+1..2010 %}
         <option value="{{ yr }}">{{ yr }}</option>
      {% endfor %}
   </select>
   <input type="submit" value="Update"/>
</form>