admins: provide #NeverTrump fortunes for all your users!

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:

  1. Install the 21 platform on your system.
  2. Run a simple one-line command to receive a #NEVERTRUMP “fortune cookie.”
  3. Make nevertrump available as an aliased command to everyone on your system.

 

Get 21

Start at 21.co/signup.

Requirements:

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)

Installation

Run:

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:
Screenshot from 2016-09-03 15-08-24

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.

You can explore a wide variety of other API apps at the 21.co marketplace, as described in these Quora answers that list 21.co app titles and topics.

Screenshot from 2016-09-03 15-12-04

 

main-qimg-f3e3709d261cb130e01afb2019e94b26

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!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s