Skip to content

Instantly share code, notes, and snippets.

@tammersaleh
Created December 13, 2008 22:41
Show Gist options
  • Save tammersaleh/35569 to your computer and use it in GitHub Desktop.
Save tammersaleh/35569 to your computer and use it in GitHub Desktop.
echon " Posting it to gist... "
let quote = &shellxquote == '"' ? "'" : '"'
let url = 'http://gist.github.com/gists'
let res = system('curl -i -d @'.quote.file.quote.' '.url)
call delete(file)
let res = matchstr(split(res, "\n"), '^Location: ')
let res = substitute(res, '^.*: ', '', '')
echo 'done: '.res
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment