Skip to content

Instantly share code, notes, and snippets.

@docteurklein
Created September 25, 2014 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save docteurklein/1b412e95fdbb9fe7f94a to your computer and use it in GitHub Desktop.
Save docteurklein/1b412e95fdbb9fe7f94a to your computer and use it in GitHub Desktop.
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