-
-
Save inem/9378c4fe1d988f530ca42820495846e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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