all repos — dotfiles @ 4ec057c6ac9b8689d1326fa27fca907ecfe1533b

my *nix dotfiles

add icyup.py
icyphox icyph0x@protonmail.com
Sun, 21 Jan 2018 16:08:52 +0530
commit

4ec057c6ac9b8689d1326fa27fca907ecfe1533b

parent

7f6d03cac3fb0e860073f3bc8c32f455f23b5c07

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

jump to
A scripts/scripts/icyup.py

@@ -0,0 +1,18 @@

+import string +import sys +import os +from random import * +from subprocess import call + +# generate random string +st = string.ascii_letters + string.digits +rand_st = ''.join(choice(st) for x in range(6)) + +local_file = sys.argv[1] +ext = os.path.splitext(local_file)[1] +remote_file = 'upload/' + rand_st + ext + +scp_cmd = 'scp ' + local_file + ' boop:' + remote_file +os.popen(scp_cmd) + +print('https://xix.ph0x.me/' + rand_st + ext)