twix
Twix is a command line utility for pulling down a tweet and executing the code contained within.
The first implementation will allow you to run something like this:
$ twix 12345
Where 12345 is the id of the tweet. It will execute the body of the tweet as Ruby code. So, if Tweet #12345 has body "puts 'Hello World'" it'll print "Hello World" to the screen.
You can also run:
$ twix @cmaxw
If you know that someone has recently tweeted some Ruby code you want to run, this will show the last 20 tweets that person has shared and you can choose the tweet you want to run. Something like this.
Tweets for @cmaxw:
0 - Hey, don
If you choose '1', it'll execute the tweet and print "Hi, welcome to twix, the Twitter Executor for Ruby"
#Safety
We want you to be able to execute a tweet without concerns about whether
it's going to do something crazy like rm -Rf / (delete your entire
hard drive. We're using RubyCop
to make sure that the tweet is restricted from taking control of your
system through the Ruby interpreter or doing anything harmful.
To turn off the safety feature, run twix with the --naked command.
#ToDo
- Set up a service that archives twixable tweets
- Add ability to require other tweets