Skip to content

Instantly share code, notes, and snippets.

@tomslominski
Last active December 14, 2015 12:20
Show Gist options
  • Select an option

  • Save tomslominski/7af635eeef71cf60bba8 to your computer and use it in GitHub Desktop.

Select an option

Save tomslominski/7af635eeef71cf60bba8 to your computer and use it in GitHub Desktop.

Revisions

  1. Tom Slominski revised this gist Dec 14, 2015. No changes.
  2. Tom Slominski revised this gist Dec 14, 2015. No changes.
  3. Tom Slominski created this gist Dec 14, 2015.
    21 changes: 21 additions & 0 deletions PHP error log.app
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    on run {input, parameters}

    tell application "Terminal"
    activate

    if (count windows) is 0 then
    do script with command "tail -f /Applications/MAMP/logs/php_error.log"
    else
    repeat with win in windows
    try
    if get frontmost of win is true then
    tell application "System Events" to keystroke "t" using {command down}
    delay 0.5
    do script with command "tail -f /Applications/MAMP/logs/php_error.log" in (selected tab of win)
    end if
    end try
    end repeat
    end if
    end tell

    end run