Skip to content

Instantly share code, notes, and snippets.

@satyr
Created November 2, 2008 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satyr/21641 to your computer and use it in GitHub Desktop.
Save satyr/21641 to your computer and use it in GitHub Desktop.
(defvar *twitter-auth* "user:pass")
(defun twitter-update-with-curl (stat) (interactive "sTwitter: ")
(let ((twit "-d source=curl http://twitter.com/statuses/update.json")
(stat (si::www-url-encode (map-internal-to-utf-8 stat)
nil "-0-9A-Za-z._~")))
(message "~D" (execute-shell-command
(format nil "curl -s -u ~A -d status=~A ~A"
*twitter-auth* stat twit)))))
(global-set-key #\C-\\ 'twitter-update-with-curl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment