How To

How to Make JSON REST POST with Curl

This is just a reference to remind myself and others how to make a JSON POST call with curl. The JSON is in the body of the post. I hope this is helpful to someone. curl -i -H “Accept: application/json” -H “Content-Type: application/json” -X POST -d ‘{“json”:{“data key”:”value here”}}’ http://api.some-site.com/resource

How To Compress a Directory with the tar Command and Exclude Certain Files, tarball exclude files

When creating a tar-ball (compressing a directory of files), you may exclude certain files by using the –exclude flag. The –exclude flag will also work with a wild card “*”. Here is an example of how to tar-ball a directory from the parent directory and exclude certain files: tar –exclude=”node_modules” –exclude=”.*” -zcvf my-tar-ball.tar.gz ./<directory to… Read more How To Compress a Directory with the tar Command and Exclude Certain Files, tarball exclude files