Put flip
somewhere in your $PATH
and chmod a+x
it.
Copy fuck
into ~/.bashrc
.
""" | |
This code takes two screenshots from the camera roll combines them into one image and saves the new image to the camera roll. | |
This is adapted from Federico Viticci's blog post at: | |
http://www.macstories.net/stories/automating-ios-how-pythonista-changed-my-workflow/ | |
It removes the option to change which picture is where, automatically assigning the first one chosen as the leftmost image. | |
It also removes the necessity to copy the images to the clipboard outside of Pythonista using the new photos library in version 1.3. Finally, it removes the clipboard output. | |
""" | |
import photos |
import asyncio | |
loop = asyncio.get_event_loop() | |
async def hello(): | |
await asyncio.sleep(3) | |
print('Hello!') | |
if __name__ == '__main__': | |
loop.run_until_complete(hello()) | |
If you run your Telegram bot locally, it will stop working when you close the terminal. The alternative is to host the bot somewhere.
There are many ways to do this. I chose AWS EC2 as it's a cheap and easy option.
Create an AWS account and start an EC2 instance. Install pip, git and github cli. If you use an Amazon Linux image (which is what the free tier offers) you can run the commands in this gist.
Connect to your GitHub account with gh auth login
and clone this repo. Create the .env