Moved to jekyll on GitHub

In 2005, right around the time moveabletype was imploading, I started a wordpress blog. I used it a bunch. Social media had not taken over and RSS reader were just getting started.

But these days RSS readers are dead as everyone moved to twitter or other media sites.

And wordpress is hard to keep secure if you don’t give it the love and care it needs.

So now I’ve exported all the posts to this jekyll which builds on github. It will have less hacking but lets see if I use it at all.

How to turn on Windows 10 Emoji Keyboard

 

I’m not sure why this was so hard to find. Simply right click on the taskbar and get the menu to appear. There is an option to “Show touch keyboard button”. That will add the touch keyboard to the far right of the taskbar. Clicking that will bring up the keyboard where you can then click the emoji icon.

windows-10-emoji-keyboard

 

emoji-keyboard

User Profile Edit with Autoform and SimpleSchema in Meteor JS

The steps to creating a form with autoform for editing user profile information are simple but not obvious when trying to tie everything together for the first time.

The first step is the set up the Schema. You need to set it correctly for the user data but the profile object is free form where you can add anything you want. Remember that all the things in the profile object are editable by the user. After you craete the schema be sure to attach it to the users collection.

Next you just need to create the form. The autoform quickform helper will spit out a form for all the user data, most of which you probably don’t want the user to be editing. Instead we can easily just show the fields we want to let users edit:

And that’s it. In the autoForm helper the collection accepts either a template helper (no quotes) or a global variable (quotes). For users you need to pass in the “Meteor.users” collection. To set what data to load the doc attribute needs an object with a _id property which the currentUser helper has.

How to use Gem CLI commands in Supervisor on Ubuntu

Supervisor is a great unix program that lets you run persistant long-running programs. In general it’s easy to use and DigitalOcean ($5 a month hosting) has a great tutorial on how to set it up here.

I was interested in Supervisor because I wanted to run the mispy/twitter_ebooks repo for building some twitter bots. It gives you a great command line interface for both creating new bots (ebooks new <reponame>) and starting the bots (ebooks start).

For whatever reason you can’t just point Supervisor at a directory and call that command. You’ll need to find where the gem wrapper is located and run the command from there.

First find the path of the executable gem:

which ebooks

For me it was located here: /home/shayden/.rvm/gems/ruby-2.2.2/bin/ebooks

Then we can switch the /bin/ dir to the /wrappers/ dir which is the packaged file you will tell Supervisor to run.

/home/shayden/.rvm/gems/ruby-2.2.2/wrappers/ebooks

In Supervisor the .conf file should now look like this:

[program:ebooks] command=/home/shayden/.rvm/gems/ruby-2.2.2/wrappers/ebooks start directory=/home/shayden/ebooks_bot/ autostart=true autorestart=true stderr_logfile=/var/log/ebooks.err.log stdout_logfile=/var/log/ebooks.out.log

Now Supervisor should have no problems keeping your twitter bots alive and tweeting.