all repos — dotfiles @ b8e843e2b9abbe7db4377fc2fdd4a2c6cfe14661

my *nix dotfiles

feat(bin): add 0x0 upload script
in Nim!
Anirudh icyph0x@pm.me
Fri, 01 Jun 2018 14:41:37 +0530
commit

b8e843e2b9abbe7db4377fc2fdd4a2c6cfe14661

parent

dbb155c1442f7dc79c99e66e267198004e636333

1 files changed, 17 insertions(+), 0 deletions(-)

jump to
A bin/oxo.nim

@@ -0,0 +1,17 @@

+#!/usr/bin/env nimcr + +import httpclient +import os +import strformat + +var client = newHttpClient() +var data = newMultipartData() + +try: + var file = paramStr(1) + data.addFiles({"file": fmt"{file}"}) + let url = "http://0x0.st" + echo client.postContent(url, multipart=data) +except IndexError: + echo "no file specified :v" + quit(1)