This past weekend I wasted a few hours trying to figure out why my AWS Lambda was failing to talk to the IoT Core service. This was despite temporarily adding an IAM policy to allow all “iot:*” actions, as well as creating a fully permissive IoT Policy. My lambda is operating in the us-east-2 region, …
Category: JavaScript
Emulating nested optgroups in Django Forms
Some motivation Django has a field called ChoiceField which lets you very easily create a <select> dropdown in your forms. A great feature is the ability to transform nested choices into appropriate <optgroup> groups. For instance, the following code: …creates a field that when rendered looks something like this: The HTML that Django produced looks …
jQuery Deconstructed
I really enjoy exploring jQuery’s source code. Recently, I’ve been using James Padolsey’s jQuery Source Viewer. It’s a really neat tool that lets you type in the name of a function (even if it’s an internal function!) and view its source. Just today, I’ve discovered a different tool/series called JS Libs Deconstructed. Not only will …