Skip to content

Instantly share code, notes, and snippets.

@gstf
gstf / imgurupload
Last active January 2, 2022 11:48
CLI script to upload image to imgur.com. (Please don't abuse the API key, create your own at http://api.imgur.com/)
#!/bin/sh
curl -X POST -H "Authorization: Client-ID 0db8b3c3e10d89b" -F "image=@$1" https://api.imgur.com/3/upload \
| jq '.data.link' \
| tr -d '"' \
| pbcopy
@gstf
gstf / svgless.js
Last active August 29, 2015 13:57
Convert dir of files .svg files to optimized base64 uris compatible as LESS variables
#!/usr/bin/env node
/*
* Convert dir of files .svg files to optimized base64 uris
* compatible as LESS variables
*/
var
fs = require('fs'),
path = require('path'),