Remind yourself, and all your users, of all the reasons why Donald Trump should never be President of the United States! This toy app uses the 21 machine-payable web API to provide Unix fortunes-as-a-service.
There are three basic steps:
- Install the 21 platform on your system.
- Run a simple one-line command to receive a #NEVERTRUMP “fortune cookie.”
- Make nevertrump available as an aliased command to everyone on your system.
Start at 21.co/signup.
21 is currently supported on Ubuntu Linux 14.04 run on Amazon AWS and Mac OS X 10.7+. Most functions are also supported on other Debian-based platforms, such as 21 Bitcoin Computers or DIY Bitcoin Computers.
Neither you nor your users will need a 21 Bitcoin Computer, a bitcoin mining chip, or even a bitcoin account. The beta version of the 21 command line application comes with a small replenishable supply of bitcoin (400,000 satoshis, or about $2.35)
curl https://21.co | sh
The system will take you through a set-up dialog that should require only a minute or two.
If you have trouble, go to slack.21.co, the official support location.
You can verify that 21 is properly installed by running ’21 doctor’.
Buy your #NeverTrump fortune
To test the app type this at the command line prompt (often $):
$ 21 buy http://10.244.44.99:5004/buy
You’ll receive a properly attributed factoid from a long list of Trump lies, racist comments, and antirationales. It will look like this:
At 2000 satoshis, this will last you a while, but you can always replenish your wallet by running 21 faucet.
If you like this app, give it a star rating by issuing the command 21 rate with its id number (which is KmE) i.e. 21 rate KmE 5.
Make nevertrump available to everyone
The simplest method is to modify the /etc/bashrc file (which will require sudo access) so that there is an alias to the system version of 21, which is probably in /usr/local/bin (check by typing which 21). [N.B.: this may not work for everyone, depending on your system environment. Let me know if you encounter problems!]
alias nevertrump = ‘/usr/local/bin/21 buy http://10.244.44.99:5004/buy’
You can announce the availability of nevertrump by modifying the system message of the day file, which is /etc/motd.
In theory, you could modify the default behavior of the system fortune command with a similar alias, but it’s probably better that standard system utilities function exactly as expected.
Depending on usage levels, you may want to set up a cron job to replenish your bitcoin wallet via 21 faucet.
Now you are providing #NeverTrump fortunes-as-a-service!