Showing posts with label twitter. Show all posts
Showing posts with label twitter. Show all posts
Monday, 20 June 2016

How you can make someone unfollow you on Twitter

This trick is known as a "soft block", and it comes handy when someone’s annoying you on Twitter and you really do not want to block him. You have a few options for dealing with annoying accounts.
Block, which prevents them seeing your tweets.
Mute, which stops you seeing their tweets and replies to you.
And Soft block which forces them to unfollow you.
If you are active Twitter user you are most likely familiar to Block and Mute. But you might or might not have heard about Soft block. Because It’s not an official feature, soft block is not commonly known.
The procedure is quite simple, all you have to do is promptly block and unblock the user in question.

If the person doesn’t notice you’re not coming up in their feed anymore, you’re good. Else repeat.

--Cheers


Monday, 13 April 2015

Taking and tweeting a photo with raspberry pi


At first I was going to create a timelapse of my cherry tree while blooming, then I decided to make a tweet once a day with a image.

Timelapse

Based on older post on how to make a Timelapse with Rapberry Pi camera module, I made small change. Rather than do a loop of x images I choose to use cronjob to run the script every 15 minutes. The script is simple and short.
#!/bin/bash

DIR=/home/pi/cherrytree
/usr/bin/raspistill -w 1920 -h 1080 -rot 180 -n -t 1000 -o $DIR/$(date -u +"%Y%m%d-%H%M-%S").jpg

Next add to your cronjob your interval, I use every 15 min.
*/15 * * * * /bin/bash /home/pi/cherry.sh >/dev/null 2>&1

Twitter bot

There's more than one way to cook an egg... There are also many ways to make a twitter bot.
I installed Twitter CLI
sudo apt-get install ruby-dev
gem install t
You will also have to create or have access to an twitter app to authorize the CLI interface.


Here is a simple script I use to take picture and tweet it. Every time I run this script, I just overwrite the image, but you can collect them by naming the file like in the script above.
#!/bin/bash
DIR=/home/pi/autotwitter
DATE=$(date -u +"%A %d %B %Y")
/usr/bin/raspistill -w 800 -h 460 -rot 180 -n -t 1000 -o $DIR/twitter.jpg
/usr/local/bin/t update 'Image of the day, '"${DATE}"'. #CherryBlossoms #raspberrypi #cli ' --file=$DIR/twitter.jpg
Once a day this script runs by cronjob at 12:01
1 12 * * * /bin/bash /home/pi/twitter.sh >/dev/null 2>&1
In addition to that, you can auto follow your followers in the same script by adding following line to the twitter script.
/usr/local/bin/t groupies | xargs /usr/local/bin/t follow