Skip to content

Instantly share code, notes, and snippets.

@docteurklein

docteurklein/404

Created Sep 25, 2014
Embed
What would you like to do?
HTTP/1.1 404 Not Found
Content-Length: 5
Nope
#!/bin/env sh
read header
VERB=$(echo $header | awk {'print $1'})
FILE=$(echo $header | awk {'print $2'})
FULLPATH=$VERB$FILE
[ -f "$FULLPATH" ] && cat $FULLPATH || cat 404
#!/bin/env sh
while true; do netcat -vvl -p 8080 -e "sh ./mock"; done
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 726
Connection: close
{"id":"54219004fe108bfa6f55d459","name":"MCC","desc":"","descData":null,"closed":false,"idOrganization":"4e96a0890441f700002f9322","pinned":true,"url":"https://trello.com/b/jduxLldD/mcc","shortUrl":"https://trello.com/b/jduxLldD","prefs":{"permissionLevel":"private","voting":"disabled","comments":"members","invitations":"members","selfJoin":true,"cardCovers":true,"cardAging":"regular","calendarFeedEnabled":false,"background":"blue","backgroundColor":"#23719F","backgroundImage":null,"backgroundImageScaled":null,"backgroundTile":false,"backgroundBrightness":"unknown","canBePublic":true,"canBeOrg":true,"canBePrivate":true,"canInvite":true},"labelNames":{"red":"","orange":"","yellow":"","green":"","blue":"","purple":""}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment