Ramblings from Josh Sullivan

Home About Archive Micro Photos Tags Wiki

Sun, 24 Mar 2019

Posting on macOS with Keyboard Maestro and Drafts

So far on the Drafts for Mac version, I’ve been using Keyboard Maestro in the absence of actions. It has worked pretty well, although I’ve found if the macro edits the draft, then it needs to save the version for it to export correctly. One of my favorite macros is posting to my blog. It’s a straightforward action, based on keystrokes and pauses, but it creates an almost frictionless posting solution.

TextExpander and Drafts

Currently, I enter the tags and metadata via two TextExpander snippets, due to my preference to have time to think about the tags. The first TextExpander snippet is run every time before I start the post; it adds the Permalink, Title, and Tags metadata to the beginning of the draft. Then I start writing the post, once done I add the tags and the ending of the permalink. Finally, I run the second TextExpander snippet which adds the date and the timestamp at the top of the draft.

Keyboard Maestro Macro

The Keyboard Maestro macro allows me to post the draft to the Dropbox folder quickly. It cuts the first line of the draft, which is the timestamp in the format YYYYMMDD-HHMMSS (ex. 20190324-095114), then saves the current version with the first line cut, Exports the draft, deletes the full filename, pastes the timestamp and adds .txt then saves the file. It’s almost as simple as my action on iOS, which after I add the tags I tap the Feather Pen icon in the actions keyboard and it immediately parses out the first line as the file name and saves the body, everything but the first line, as the file contents.

Simplifying my Writing Workflow

Recently I’ve been trying to simplify my posting strategy, and once actions are added to the macOS version of Drafts, specifically the ability save to Dropbox, I will be retiring this macro, but for now, it gets the job done efficiently and quickly. Previously I had multiple versions of the TextExpander snippets for it was as Micro.blog post or long-form post, now I’ve combined them into two TextExpander snippets that cover all post types.

I prefer to do most of my writing in Drafts because it quickly syncs to iOS and I can pick up where I left off on any Apple device without hassle. I do prefer Sublime Text for writing long-form posts due to the ability to pick it up on my Windows machine at work when I have time to write a little bit. For now, most of my long posts start in Drafts then get saved to the drafts folder in my Dropbox Blot folder at which point I can open them in Sublime Text and write. If I know I am going to be starting and finishing a post on macOS or iOS then I will continue to write in Drafts, such as this post which was written entirely on macOS.

You can find the Keyboard Maestro macro here. Please be aware the macro will download immediately on clicking the link

Also be aware this is an incredibly simple workflow that you may have no use for, if you don’t include a file name at the top of your draft it will not work correctly, but you can edit it to work within your workflow.

writing blogging software

Mon, 11 Mar 2019

Dropshare

I have a constant back and forth with sharing tools. I previously used Droplr, but they abandoned their iOS app (recently re-released but no better than the previous version), the website is abysmal, and support took almost a week to get a response, on to CloudApp I went.

Last January I received a promotion from Smile Software for $20 off CloudApp’s yearly subscription plus 6GB of bandwidth per file, so I signed up. Since then they removed their iOS app, then reintroduced it as a new app, but it was the same with more bugs because they did not update anything in my experience. Then they force you to go to the beta website, but the beta website for months now continuously reloads before the page finishes loading. To get to the old UI, you are required to click repeated on the link and hope you get it before the page refreshes. So off I went to Dropshare.

Dropshare is not like the others (or it wasn’t in the beginning). It gave you the same functionality as Droplr and CloudApp but on your hosting solution or cloud storage. I had already used Backblaze B2 Bucket with Arq for backing up my Synology and Macs, so I felt more comfortable with them than anyone else. Once you create the bucket, you need to make it public, then set it up in Dropshare as a connection. The great thing about Dropshare is it gives you the option to have multiple connections. So you could host all images on one connection, then all videos on another, and finally files on a separate one. Recently, thanks to Jason Burk I’ve switched to Wasabi for my cloud storage needs, mainly due to the lower prices and faster loading. Due to Wasabi being an S3 compliant service, any application or service that can use S3 can attach to Wasabi.

One of the best features of Dropshare is the URL shortener service, either theirs or a custom one. At first, I just used theirs, then moved to Bitly. Recently I implemented YOURLS, a solution which is self-hosted and uses a domain name you own, so I’m not reliant on a companies URL in case they go out of business. The shortener works for URLs dragged to the icon in the menu bar, so you have an easy way of shortening URLs on the Mac as well as sharing images, Gifs, videos, and files. I’m still working on a code snippet system, but for now, I am sticking with Github Gists or adding it to my wiki. Dropshare recently added URL shortening on iOS, so now I can shorten URLs on every platform from one application.

If you’ve been looking for a sharing tool but want the flexibility of a solution you own, then Dropshare is definitely for you, and I would recommend giving it a shot.

review software

Thu, 7 Mar 2019

Return to Sublime Text

In January I asked the Micro.blog community a question about writing apps for Windows. I received many great suggestions and tried almost everything that was suggested finally ending up with Sublime Text.

My Journey

I’ve fallen in love with Sublime Text multiple times over the years, but then I would find a new note-taking app which draws me away ending with forgetting about Sublime Text for months, or in this last instance a year and a half. When I started my Blot.im blog I started with creating posts in BBEdit on macOS, Notepad++ on Windows, and Drafts on iOS. I’ve since gone through the following applications to get back to Sublime Text: 1Writer, Ulysses, Typora, Brackets, Visual Studio Code. It may seem like an odd mixture of apps, but they have one thing in common: sidebar libraries. Sidebar libraries allow me to add my Dropbox folder for my blog and have everything from posts to the CSS file in one text editor in one window available. It allows me to write and save drafts in the Drafts folder of the directory then once done, drag and drop in the sidebar and the post is published.

Friction Points

1Writer was only viable for iOS, Ulysses while great on both macOS and iOS wasn’t on Windows, and Markdown handling in Ulysses isn’t my favorite and leaves much to be desired. Typora is good with Markdown but falls short on other file formats. While testing Typora had some bugs that would freeze the app which caused me to move on. iA Writer came very close, but some decisions by the developers to put all the blame on cloud services scared me, then when I suggested a feature the response was to use the third party keyboard, so they were out.

Code Editors

Then came Brackets, I’d never used Brackets, and when a coworker suggested it for another task I needed to accomplish it seemed like a great fit, and for a week it was. Unfortunately, Brackets doesn’t have the packages/extension library that Sublime Text has built up over the years. So I went to try Visual Studio Code, and it was a great app with more extensions than Brackets. Unfortunately, it had some weird quirks that created an amount of friction I found acceptable but would keep my eye out for something else. One of the suggestions I received was Sublime Text, which I had a license for version 2 and 3, so I downloaded it. I immediately remembered why I loved Sublime Text, the extensibility of packages, and the ability to write syntax changes into the preferences was incredibly useful for a code editor.

Sublime Text Setup

I’m currently using three packages, starting with WordCount to show live characters and word counts. It’s been handy for making sure my Status posts make it under the 280 character Micro.blog limit before truncating and linking back to the blog. One of my criteria for testing these applications was a character count and Sublime Text didn’t have a great default one, but with WordCount that doesn’t matter. Monokai Extended then Markdown Extended to change the Markdown syntax highlighting. Due to Windows having an issue indexing Markdown files, I switched to text files and changed the default Syntax for all text files to Markdown Extended.

I use one project for the blog, which has the Blot.im folder in the sidebar, allowing access to everything. Projects enable me to quickly open the folders I need for the blog all at once, and with workspaces, I can set two windows and have both windows open with the correct folders in each.

Conclusion

I’m back to using Sublime Text on Windows and macOS, Drafts is still my go-to on iOS. I love Sublime Text focus around getting the words on the screen, then figuring out where the file should go after it’s written. The applications I tested acted similarly, but each one had a flaw in some way that pushed me away due to no recourse. Default Sublime Text did have some flaws but through Packages and editing the Settings, one can make Sublime Text precisely what they need from a text editor.

writing

Mon, 4 Mar 2019

Brad Enslen - DuckDuckGo site search box for Micro.blog

Just a re-reminder for Micro.blog users: you can get the customizable code for the DuckDuckGo site search here.

Thanks to @bradenslen for pointing this out, I’ll be implementing this as soon as Bing finishes indexing my site.

link micro.blog

Wed, 20 Feb 2019

Creating an Online TiddlyWiki on DigitalOcean

TiddlyWiki is a Wiki software that you can run a few different ways including locally only, online, or syncing a local wiki to an online wiki. You can see examples of online TiddlyWiki’s here:

The following tutorial will be an explanation on how to create a TiddlyWiki on a DigitalOcean droplet.

Initial Setup

  1. Sign into DigitalOcean or create an account then create a Ubuntu 18.04 Droplet, the $5 tier is more than enough to start.

  2. Follow these instructions for initial server setup: Initial Server Setup with Ubuntu 18.04
  3. On your domain provider, create the following Host Records:

Type Host Value
A Record @ IP Address of Droplet
A Record www IP Address of Droplet

Install NodeJS and NPM

All of the following are commands you can copy and paste once connected via SSH:

  1. sudo apt update - Update the package index

  2. sudo apt install nodejs npm - Install NodeJS and NPM

  3. nodejs --version - Check NodeJS version

  4. npm --version - Check NPM version

Install TiddlyWiki, Forever, and Nginx

  1. sudo npm install -g tiddlywiki - Install TiddlyWiki

  2. sudo npm install -g forever - Install Forever which allows you to continuously run TiddlyWiki without being connected via terminal

  3. sudo apt install nginx - Install Nginx

  4. sudo ufw app list - Get Firewall Available Applications

  5. sudo ufw allow 'Nginx HTTP' - Allow Nginx HTTP traffic through the firewall

  6. sudo ufw allow 'Nginx HTTPS' - Allow Nginx HTTPS traffic through the firewall

  7. systemctl status nginx - Confirm Nginx is running the output should look like this:

    ? nginx.service - A high performance web server and a reverse proxy server
       Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
       Active: active (running) since Wed 2019-02-20 18:53:51 UTC; 1min 2s ago
     Docs: man:nginx(8)
      Process: 8300 ExecStart=/usr/sbin/nginx -g daemon on; master\_process on; (code=exited, status=0/SUCCESS)
      Process: 8291 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master\_process on; (code=exited, status=0/SUCCESS)
     Main PID: 8304 (nginx)
    Tasks: 2 (limit: 1152)
       CGroup: /system.slice/nginx.service
           +-8304 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
           +-8306 nginx: worker process

Initialize TiddlyWiki

  1. mkdir -p ~/apps/wiki - Make a folder in your home folder called apps with a sub folder wiki (you can name this whatever you would like)

  2. cd apps/wiki - Open the new folder

  3. tiddlywiki mywiki --init server - Create a new wiki in mywiki folder, you can change that name to what you would like.

Initialize Nginx and Add SSL via Certbot from Let’s Encrypt

  1. cd /etc/nginx/sites-available/ - CD into Nginx directory

  2. sudo nano /etc/nginx/sites-available/DOMAIN.com This will create your domain config file

  3. Paste the following into the file and change DOMAIN.com and www.DOMAIN.com to your domain:

server {
    server_name DOMAIN.com www.DOMAIN.com;
    
    location / {
    proxy_pass   http://127.0.0.1:8080;
    proxy_set_header        Host             $host;
    proxy_set_header        X-Real-IP        $remote_addr;
    proxy_set_header        X-Forwarded-For  $proxy_add_x_forwarded_for;
    }
}

Press Ctrl+O then Enter then Ctrl+X to save the file then exit the file

  1. sudo ln -s /etc/nginx/sites-available/DOMAIN.com /etc/nginx/sites-enabled/ - Symbolic links site to enabled

  2. sudo apt install certbot - Install Certbot

  3. sudo apt-get install python-certbot-nginx Install Nginx Certbot plugin

  4. sudo certbot --nginx - Create HTTPS cert with Let’s Encrypt
    • Select whichever domains you want your cert to cover
    • Press 2 to redirect HTTP traffic to HTTPS, this is recommended
    • The conf files for your selected domains will be updated with the cert information automatically

Running TiddlyWiki

  1. cd ~/PATH/TO/WIKIFOLDER Do not go into the directory of the wiki just to the folder that contains your wiki folder, for example if you created the directory as listed in step 14: cd ~/apps/wiki/

  2. tiddlywiki mywiki --listen replacing mywiki to what your wiki folder is called
    • Now navigate to your domain in a web browser and it should be served correctly.
  3. To run the process without being connected to the server: forever start --spinSleepTime 10000 /usr/local/bin/tiddlywiki /home/username/apps/wiki/mywiki --listen "readers=(anon)" writers=USERNAME username=USERNAME password=PASSWORD

  4. Alternatively you can create a CSV file add it to the root of mywiki and run the following command which will allow anyone to read your wiki but only authenticated via the CSV to write: forever start --spinSleepTime 10000 /usr/local/bin/tiddlywiki /home/username/apps/wiki/mywiki --listen credentials=users.csv "readers=(anon)" "writers=(authenticated)"

  5. For Restricted reading and writing: forever start --spinSleepTime 10000 /usr/local/bin/tiddlywiki /home/username/apps/wiki/mywiki --listen credentials=users.csv "readers=(authenticated)" "writers=(authenticated)"

Conclusion

I’ve been using TiddlyWiki since Friday, February 15, 2019, and have fallen in love with it. It gives me the flexibility I need for keeping track of all kinds of data and doesn’t make you stick to a rigid structure. Tiddlers (entries) are not required to connect to another, and therefore you can have Orphan Tiddlers that are only called upon by linking to one.

I highly recommend at least downloading TiddlyWiki to your local computer and trying it out if you are looking for a wiki software or something similar. Also, check out the Wikis I’ve listed above to see if there are new use cases you might not have thought of yet.

Finally, if TiddlyWiki isn’t for you, there is always DokuWiki as an alternative. An excellent example of DokuWiki is Andrew Canion’s Wiki, have a look there to see if that fits better with your style.

Please feel free to reach out to me with any questions or comments via Micro.blog or via email: contact {AT} sullivantss.com

wiki digitalocean nginx

Sat, 9 Feb 2019

Keychron K1 Review

Recently a few different people who bought the Keychron K1 have not been impressed with the keyboard. For example, Shawn Blanc had an issue with the light changing key placement due to:

The first few days I had this keyboard I accidentally toggled the light mode about every 100 words. Which is not great.

I also triggered the change and had to toggle through the different light modes until I returned, but I liked it because I found another mode better suited to my needs. I’ve since hit it on accident two more times, but muscle memory has set in for this keyboard, and I know where to go to avoid clicking the mode changing button.

Shawn goes on to state:

I’m sad to say that after using the keyboard for a couple weeks my current feeling is that it is less than the sum of its parts. It’s a beautiful and well-made keyboard, and the more I use it the more it’s been growing on me. But for whatever the reason, it’s not delightful to use. And if you’re going to have a big, noisy keyboard, it ought to be nothing if not delightful.

I, on the other hand, love this keyboard. Coming from a Das Keyboard Model S Professional for Mac it is much less travel and feels a little better on my wrists. I’m not sure what isn’t so delightful about this keyboard but so far it’s been a great keyboard for me.

Features

Some features to point out are:

  • Dedicated Siri Button
    • I haven’t really used this feature because I haven’t used the keyboard with my iPad much and I never use Siri on my Mac
  • Screenshot Button
    • I’ve started to use this a little more, it’s nice to only have to press one button to get screen grab going
  • Dictation Button
    • I’ve used this a couple times and so far it’s worked well
  • Both cabled and bluetooth enabled
  • Feature changes for macOS/iOS or Windows/Android

Bother Points

Two issues I have with the keyboard include, like Shawn, the placement of the backlit light mode button, I think another spot would be better, such as in the top row. The final issue is the second value of the keys are next to the normal value, which gets a little confusing if you are looking for a specific symbol and don’t remember exactly where it is, instead of looking at the top of the keys you need to check across the keys.

Both of these are small issues that only took a few days to acclimate without hindering productivity.

Conclusion

I think this is a great keyboard that majority of people who are coming from far travel Cherry blue switches will not like, but for those of us coming from anything else looking for a smaller key travel keyboard with some mechanical features will be pleased.

review

An IndieWeb Webring 🕸💍