Skip to content

Instantly share code, notes, and snippets.

View johnelliott's full-sized avatar
🕳️
tunneling

John Elliott johnelliott

🕳️
tunneling
View GitHub Profile
#! /bin/bash
# This is how to sign a Cloudinary API request from bash
URL="https://api.cloudinary.com/v1_1/thedailybeast/image/upload"
API_KEY=574791189343157
API_SECRET=abcd
DATE=$(date +%s)
SHA=$(echo -n "overwrite=false&timestamp=${DATE}&unique_filename=false&upload_preset=zcjiokbi&use_filename=true${API_SECRET}" | shasum -a 1 | awk '{print $1}')
FILE="http://cdn.thedailybeast.com/content/dam/dailybeast/2017/02/23/170223-Vox-homeopathic-drug-tease.jpg"