This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
echo '{' | |
for endpoint in sizes regions images ssh_keys; do | |
echo -n '"'$endpoint'": ' | |
curl -s "https://api.digitalocean.com/${endpoint}/?client_id=${DO_CLIENT_ID}&api_key=${DO_API_KEY}" | |
echo ',' | |
done | sed '$s/,$//' | |
echo '}' | |
} | python -mjson.tool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
# usage: mbox2csv INBOX > result.csv | |
# tested with gawk and mawk | |
# attempt to generate a Microsoft Excel compatible CSV | |
function escape_cell(cell) { | |
gsub(/"/, "\"\"", cell) | |
return "\"" cell "\"" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# |