Skip to content

Instantly share code, notes, and snippets.

View dhbaird's full-sized avatar

David Baird dhbaird

View GitHub Profile
@dhbaird
dhbaird / safercurl
Last active August 29, 2015 14:27 — forked from anonymous/safercurl
Safercurl - A python reimplementation of the `curl` command with a twist: command line arguments can be passed in via stdin.
#!/usr/bin/env python
# A python reimplementation of the `curl` command, with a twist: command line
# arguments can be passed in via stdin. This is useful for passing in secret
# tokens that many web APIs require. Rationale: passing secrets via a pipe is
# considered better than passing via command line. It's possible for other
# applications to see the entire command line, secrets and all! Oops! So, don't
# do it!
#
# "Whoami" example with digitalocean:
namespace djson {
// =======
// Classes
// =======
class Number {
double data;
};