Skip to content

Instantly share code, notes, and snippets.

@inem

inem/note.txt Secret

Last active Apr 13, 2020
Embed
What would you like to do?
# How to use DO⚡️POST?
### Setup
Create custom workflow in [Alfred app](https://www.alfredapp.com/) triggered by a shortcut. Like this:
![](https://i.imgur.com/9h7Wjm1.png)
Put the following code into your bash script:
```
pbpaste | cat - > /tmp/tmp-buffer && curl --location --request POST 'http://dopo.st/posts' --header 'Content-Type: text/markdown' --data-binary @/tmp/tmp-buffer --silent | pbcopy
pbpaste | tr '\n' '\0' | xargs -0 -I{} open {}
```
It does two things:
1. Sends contents of your clipboard to DO⚡️POST
2. Opens received URL in your default browser
### Usage
Use your editor of choice and get some text in Markdown.
Copy it and trigger your shortcut → Get your post published!
### Source code of this post
<script src="https://gist.github.com/inem/9378c4fe1d988f530ca42820495846e5.js"></script>
### Examples:
- [Blogging for busy programmers!](http://do-post-it.s3-website.eu-west-3.amazonaws.com/Q9M/)
- [Как с помощью curl отправить POST-запрос c кучей текста](http://do-post-it.s3-website.eu-west-3.amazonaws.com/Q9o/)
- [Как открыть ссылку в браузере полученную из буфера обмена](http://do-post-it.s3-website.eu-west-3.amazonaws.com/Q9W/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.