Skip to content

Instantly share code, notes, and snippets.

View dweingart's full-sized avatar

David Weingart dweingart

  • UNH-IOL
  • New Hampshire
View GitHub Profile
@dweingart
dweingart / # mitmproxy - 2016-04-05_11-57-21.txt
Created April 5, 2016 16:02
mitmproxy on Mac OS X 10.11.3 - Homebrew build logs
Homebrew build logs for mitmproxy on Mac OS X 10.11.3
Build date: 2016-04-05 11:57:21
@dweingart
dweingart / slim_queryarg_route.php
Last active December 23, 2015 00:39
Slim Framework - Routes that call different methods based on query args only
<?php
// http://www.example.com/foo
$app->get('/foo',
// route middleware throws Pass exception based on query arg variables.
function() use ($app)
{
$getVars = $app->request->params();
if (isset($getVars['hello']) && ('world' == $getVars['hello']))
{
throw new \Slim\Exception\Pass;