DEV Community

Cover image for Automatically change your Twitter background every 5 minutes
Matt Kenefick
Matt Kenefick

Posted on

4 1

Automatically change your Twitter background every 5 minutes

Why? I couldn't decide on what Twitter banner to use after cleaning up all my angry political tweets.

I eventually started to look at my generic wallpapers and thought, "Which one of these many landscapes represents me as a person?" All of them, obviously.

It seemed like the only logical solution would be to create a script to cycle backgrounds like you can on your desktop.

Github: https://github.com/mattkenefick/twitter-backgrounds

Here are the basic instructions, assuming you're on a server of some type with PHP.

git clone https://github.com/mattkenefick/twitter-backgrounds
cd twitter-backgrounds
composer install

# Follow the instructions for ENV variables and crontab
Enter fullscreen mode Exit fullscreen mode

After you're all setup, you should find your Twitter background changing every X often.

Here are some cron examples for you:

# Every five minutes
*/5 * * * * php /path/to/twitter-backgrounds/index.php

# Every thirty minutes
*/30 * * * * php /path/to/twitter-backgrounds/index.php

# Every day at 8am 
0 8 * * * php /path/to/twitter-backgrounds/index.php
Enter fullscreen mode Exit fullscreen mode

Have fun.

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs