Hacker News new | past | comments | ask | show | jobs | submit | more danstewart_'s comments login


This looks good.

I use a bash function to load the MDN page for the status:

  function man-http() {
    code="$1"
    if [[ -z $code ]]; then
      echo "Usage: man-http <status code>"
      exit 0
    fi

    firefox "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/$code"  
  }


From your description I thought for a second that you were somehow parsing the page :D


On that note, this is the shell alias I use to remember status codes (using htmlq https://github.com/mgdm/htmlq):

    alias status_codes="curl --silent https://developer.mozilla.org/en-US/docs/Web/HTTP/Status | htmlq --text 'dt a code'"
Prints something like this:

    100 Continue
    101 Switching Protocols
    102 Processing
    103 Early Hints
    200 OK
    201 Created
    202 Accepted
    203 Non-Authoritative Information
    204 No Content
    205 Reset Content
    206 Partial Content
    ...
To get specific groups, I do something like this:

    status_codes | grep ^2
Replacing 2 with whatever group you want, like 4 for 4xx codes for example


Wow, how have i never heard of htmlq!?! Thanks for sharing your alias as well as teaching me another cool tool (htmlq)!


i keep underestimating the power of bash. KISS!


We use AWS lambda for running slower background tasks triggered from a user action on a website (eg. generating a report, clearing and rebuilding a cache, etc...).

We deploy our full monolithic app to lambda (as a docker image) and then just have a wrapper entrypoint script that dispatches the request to the appropriate module and function.

There are benefits to keeping each lambda function small but we like the benefit of deploying one lambda and being able to call any function within the monolith.


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: