Skip to content

Instantly share code, notes, and snippets.

View maelcum's full-sized avatar
💭
Happy.

maelcum

💭
Happy.
View GitHub Profile
@maelcum
maelcum / gist:41fd5650a0de35c8df0ae5e0273274a7
Created November 8, 2020 22:51
example of serial requests to a gandi.net API with varying answers
$ curl -s -X GET https://api.gandi.net/v5/email/mailboxes/71364.it -H "authorization: Apikey $APIkey"
[{"mailbox_type":"standard","quota_used":2,"login":"forwarder","domain":"71364.it","href":"https://api.gandi.net/v5/email/mailboxes/71364.it/e1356d00-b8a5-498e-af7e-86dde2b6685d","address":"forwarder@71364.it","id":"e1356d00-b8a5-498e-af7e-86dde2b6685d"},{"mailbox_type":"standard","quota_used":2,"login":"infrastructure","domain":"71364.it","href":"https://api.gandi.net/v5/email/mailboxes/71364.it/32e9145e-0967-4697-992a-dab177171891","address":"infrastructure@71364.it","id":"32e9145e-0967-4697-992a-dab177171891"}]
$ curl -s -X GET https://api.gandi.net/v5/email/mailboxes/71364.it -H "authorization: Apikey $APIkey"
[{"domain":"71364.it","mailbox_type":"standard","quota_used":2,"login":"forwarder","href":"https://api.gandi.net/v5/email/mailboxes/71364.it/e1356d00-b8a5-498e-af7e-86dde2b6685d","address":"forwarder@71364.it","id":"e1356d00-b8a5-498e-af7e-86dde2b6685d"},{"domain":"71364.it","mailbox_type":"
@maelcum
maelcum / gist:44567262acab0a4417078780aae04135
Created October 18, 2020 12:59
request a password if not already saved, save password for later, and fetch it when necessary
...
# Prerequisites:
#
# Accessing Password
# To scan system directories the script needs elevated privileges. This means the user needs to input his password.
# To automate the running of this script, it accesses the Keychain.app for the password.
# For this to work, an entry has to be made in the Keychain.app manually:
# security add-generic-password -s '<identifier>' -a '<userid>' -w '<passwd>'