# toolset

Posts about the tools I use

## Blast from the ActiveX past by way of iDRAC6

Recently we acquired a Dell PowerEdge R610. It’s got the goodies and we plan on running a bunch of VMs on there for shits and giggles.

But beware if you’re trying to use iDRAC6. It’s a nifty technology for sure but it has left behind by the Internet moving forward. Now, there are plenty of guides out there on how to get it to work in “modern” settings i.e. Windows 10, Linux ≥ 2020:

But it was this comment that turned us on to the real solution for this:

First we need to obtain and configure a VM for our purposes:
1. Go to Virtual Machines – Microsoft Edge Developer and download the VM for your platform of choice. Since iDRAC6 is from 2008 we went with a Windows 7, IE8 32-bit VM; as we want the ability to manage this from a local workstation we went with a VirtualBox VM.
2. Import it into VirtualBox. You may want to adjust the hardware settings and give it a bit more RAM.
3. Turn it on. You may want to adjust the graphical settings.
4. Open IE and go to the iDRAC IP address or URL. We’ll use https://idrac6.lan. Click Continue to this Website (not recommended).
5. Once the site loads, on the top right go to Tools → Internet Options → Security tab → Trusted Sites. Click the Sites button.
6. In the “Add this website to the zone” enter the iDRAC URL, e.g. https://idrac6.lan. Click Add.
7. Make sure to remove the checkmark from Require server verification (https:) for all sites in this zone.
8. Click Close, then click OK to close the Internet Options window.

Next we need to configure iDRAC:
2. On the left menu make sure you’re in the System menu item.
3. On the top of the main pane go to Console/Media → Configuration.
4. Configure the Virtual Console:
– Enabled: Checked
– Max Sessions: 4
– Remote Presence Port: 5900
– Video Encryption Enabled: Remove this checkmark
– Local Server Video Enabled: Checked
– Plug-in Type: Native. This is the specific setting that makes iDRAC6 choose between ActiveX or Java.
5. Leave Virtual Media on teir defaults.
6. Click Apply
7. Log out of iDRAC, close IE.

At this point you should be able to connect to the virtual console:
1. Open IE and log back into iDRAC.
2. Go to the System left menu, then on the top tab menu go back to Console/Media.
3. Click Launch Virtual Console. IE will freeze for a few moments while it talks to iDRAC and then it will request permission to install the ActiveX control. It will freeze again while it’s installing. Once everything is done the Virtual Console should start it. If it doesn’t or it’s too slow (like moving at >5 FPS), close IE, log back into iDRAC, and restart the virtual console.

Now you have a functioning VM that can give you longer term access to iDRAC6 servers without having to deal with Java bullshit… at least until the iDRAC6 default certificate expires in June of 2024

When you reboot the VM Windows 7 will download a whole bunch of updates but you should be able to keep using the virtual console. Just make sure to take a snapshot of the VM and you should be good to go.

A fair warning is also necessary:

DO NOT USE THIS VM TO ACCESS THE INTERNET. YOU WILL GET HACKED

We also tried to use the virtual console with Video Encryption enabled but we couldn’t get it to work.

## wiki.vim update

Alright so after a while we just got tired of vimvwiki and vim-pandoc-syntax fighting over syntax formatting and coloring and we weren’t using all the features available in vimwki so ended up switching to wiki.vim and it’s working out pretty good after we switched the journal configuration from daily to monthly with these settings:

Plugin 'lervag/wiki.vim'
let g:wiki_root = '~/Nextcloud/wiki.vim/' " Have wiki live inside Nextcloud
let g:wiki_filetypes = ['md']             " markdown wiki
let g:wiki_link_extension = '.md'         " markdown wiki
let g:wiki_link_target_type = 'md'        " markdown wiki
let g:wiki_write_on_nav = 1               " Write to disk when navigating from file to file
let g:wiki_journal = { 'frequency': 'monthly', 'date_format': { 'monthly': '%Y-%m'}} " Set to journal monthly


The notes are also in the vimrc file cos we know we’ll forget what each specific setting does. Also, why do vim plugin authors think the vim help file is enough? At least have the fucken decency of making it into HTML so you can link to specific bits of it. We hate reading documentation in vim itself when there are much better solutions out there.

But anyways.

We’re using the barest of features cos we don’t really know enough vim commands but we’re already plenty quick with the ones we know. Now we’re trying to figure out what would happen if we stick this wiki into a git repository and manage it that way, which would be awesome for a todo list.

So what we’ve got right now is usually two windows side by side, one for the todo.md file and the other one for the journal for that month. It’s working out pretty well as long as we remember to do a :wa to write all files to disk so Nextcloud doesn’t complain about version differences between server and clients.

Nextcloud itself is still working pretty good. The VM host it lives in will get rebuilt and I’m thinking I’ll migrate from Ubuntu to Debian when I setup a new VM for it.

Aaaah what else was there…? Ah yeah, got three jerbs now

• Barista
• Host

The todo.md file mentioned above didn’t even exist until three days ago cos it wasn’t needed but now it absolutely is. Stuff is put on paper first (can’t have phone out at barista/host jobs without a manager complaining), then it goes into the file. It’s working out pretty well. Yes there are apps like Google Tasks, Todoist, Google Keep, Notion but they’re all just so slow and then you’re committed to their own specific way of doing things.

No thanks, I’ll just keep everything in text files cos plain text is forever.

Going back to the jobs… life is going to be absolute mayhem for a few months or until we break and get fired from one, which personally hope is the barista jerb— main clientele will be law enforcement and en’t nobody got time for abuse from those entities.

Ah yes! Another useful tool is barinsta. The regular Instagram app just kept giving me ads and that gets so annoying. The interface harkens back to the initial releases of touchscreen apps but the developer makes it very clear they want you to be conscious of your actions while using the app. The fact you don’t get any ads is just an extra benefit of that. Thanks to it it’s super quick to catch up on my feed instead of spending an hour and still be missing stuff. Install it from F-Droid and if you see anyone trying to put it up on Google Play, report it to the devs.

Other than that we’re also trying to post to Flickr more often. We’re paying for it, might as well use it.

Pretty sure that’s it for now.

## S P E E D

The core interaction of your product – Your product exists to save people time or help them solve a problem. Introducing friction or delay during the most important flow of your product will drive people crazy. Notion has developed a reputation for being a sluggish product:

I wanted to love Notion. I did! It’s everything you’d want in a note-taking app. But it’s fucken slow, which made me hate it.

This is why I stick with vim and wiki.vim— This just made me realize I haven’t updated that series of blog posts.

## Wish for quiet toys

About a month ago we picked up at work a SuperMicro X9SCM-F in a 4U rackable case; we didn’t know who the case maker was until @thegpfury noticed it was a Norco case.

This is all well and good but we had a major problem for usage: The noise! This being enterprise hardware no consideration was made for acoustics since the device would live in a datacenter but in my case we want to use it at home.

This is what it sounds with all the fans on (NBM-MAT case fans, the lot of them):

Super loud. Like a 70s VW Bug that has had zero maintenance.

So then I tried with only the fans in the back:

And finally with only the CPU fan

At this point it was clear all the fans were buggered to hell. With them all being 80x80x25 it turned out Noctua do have great replacements available; for the backplane I got NF-R8 redux-1200 and for the read I got the NF-R8 redux-1800 PWM so the motherboard can control the speed on them. The power supply is still fully functional and with it being a Corsair AX760 we know we don’t have to worry about the noise coming from it.

This is how it sounds with two backplane fans and both back fans installed:

Much, much better! So quiet very stealth!!!

For the time being it should be okay to run it with just these fans; the apartment is kind of cold and the additional cooling will not be needed until the summer, by which point the thing will probably get upgraded storage. If only more manufacturers had in consideration the acoustics of their devices; there’s an HP ProLiant DL160 G6 laying around that is also loud as fuck but there’s no clear path to making it quieter; I know 1U devices don’t have the most space but even 2U devices are still loud as hell when they can be much improved.

Perhaps a 2U system with quiet fans and good gaming hardware, mounted under a desk top. That’d be nice. Like a Lack rack but for actual desk use. That’d be nice.

## vim with rclone on MFA-enabled Nextcloud

I forgot that I enabled MFA on my Nextcloud instance and it broke rclone. This is something the Nextcloud documentation makes clear but neither the instance nor rclone itself will tell you what’s actually wrong or how to fix it.

First, on Nextcloud:

1. Go to Settings › Security.
2. Scroll down to the bottom. Enter something descriptive like “rclone” in the entry box, then click Generate App Password.
3. Nextcloud will display an application-specific password. Leave the screen here. Nextcloud will only display it the one time

You can always start over if you don’t copy it so depending on your password policies you might want to save it in your password manager.

Now, switch over to your shell:

1. First, kill the current rclone mount: $fusermount -u /home/nullrend/Nextcloud. Do not just kill the rclone job. Apparently the rclone devs think it’s too hard to implement a rclone umount /mount/dir command or sum’thin’. 2. Do $ rclone config and delete the current Nextcloud remote endpoint. Much easier to start from scratch.
3. When you get to the password entry, enter the password given to you by Nextcloud.
4. Finish the process.

At this point you can save the password on Nextcloud so it actually allows rclone to connect through WebDAV.

To mount the new remote endpoint do something like $rclone mount endpoint:/ ~/Nextcloud --daemon --dir-cache-time 120m --max-read-ahead 256 --no-modtime --vfs-cache-mode full --vfs-cache-poll-interval 120m. You will need to play with the caching flags depending on what you’re doing and what your needs are. For my own use case I’m mostly using vim to interact with my vimwiki files so I also often do :set noswapfile to stop vim from bitching about files that are likely open elsewhere. ## For want of a nail… ‘k, so in a previous post I wrote how I reworked my note-taking and went back to plain text. I had to make a few changes since then: • I couldn’t take the atrocious UI of Epsilon Notes any longer. Fucken’a. I just accessed my notes directly through the Nextcloud app and that worked well enough. • Vimwiki is working quite nicely, just wish it didn’t fuck with the filetype highlighting but the built-in works well enough. Better concealment of links would be nice too. Switched out Epsilon for Markor, which is prettier and less of a pain in the ass. But trying to set it up is when I started running into an issue with Nextcloud: It does not support bidirectional folder sync. At all. The way Nextcloud syncs everything means you have to access your files through the Nextcloud app instead of being able to use your usual app to open a file. It’s not that much of a change but it does prove annoying because that change is forced on you by the application instead of you (the user) adjusting your workflow organically. People have been requesting this ability since 2016 and the app still doesn’t have it. When I was using Dropbox as my syncing backend my workflow would be like this: 1. Mark KeePass file as a favorite in Dropbox. 2. Dropbox syncs the file to all devices so it’s available through the filesystem itself. 3. As the file is now stored in a local filesystem you can now navigate to it as you usually would: • On desktop you can use a file manager to view the file and open it. Alternatively you can use KeePass to navigate to the file and open it. • On Android you can open your keepass app, navigate to the database file, and open it. • On iOS the same flow as Android applies. 4. Should the file change Dropbox will sync it silently in the background to all devices. Password applications will notice the change and ask if you want to reload. With Nextcloud it goes something like this: 1. Mark KeePass file as a favorite in Nextcloud. 2. Nextcloud will sync the file to desktop clients but only mark it as a favorite in mobile devices. 3. You now have a split flow as the file will be available through the local filesystem on desktop but not on mobile: • On desktop you use a file manager, or use KeePass itself. Same UX as you would in Dropbox. • On Android you need to open the Nextcloud app, navigate to the database file and the OS will recognize the filetype and open it. You can’t use your password app directly as the file does not exist in any local filesystem. When Android terminates your password app and you then have to reload the file through the Nextcloud app. • On iOS it looks like you can select which folders to sync to local filesystem. I haven’t tried using the iOS app myself but if someone can confirm this is the behavior it’d be awesome. 4. Should the file change Nextcloud will sync it silently in the background but behavior will vary depending on platform: • Desktop: File is available through local filesystem. Password applications will notice the change and ask if you want to reload. • Android: You go through the Nextcloud app, same as before. Trying to use a password app will result in the app telling you the file doesn’t exist, so you then have to go through the Nextcloud app. • iOS: I’m not sure what the behavior is. I’d assume it’s the same as on desktop. To replicate the default desktop behavior (syncing to local filesystem) you end up having to use other apps like FolderSync. This way files and folders are available just like any other file on the Android device, letting you use automation or customization apps without issues, and saving you from having to configure syncronization settings for each app. Looking at you, Joplin. My suspicion is Nextcloud developers are doing it this way to increase your awareness of the brand and the application, following the footsteps of Dropbox. For the longest time Dropbox was a rock-solid syncing application that did one thing and it did it really well, but now they’re trying to force changes nobody likes in an effort to make more money. If this is indeed the case Nextcloud developers are learning all the wrong lessons from Dropbox’ failure to understand what it had. Instead of strenghtening its core they’re throwing a million other things at the wall to see what sticks: • Talk: Chat server, basically. There’s already plenty of those already available and I don’t see them supplanting IRC, Discord, or Slack. Ever. Nevermind Zoom or Jitsi. • Deck: Project management? There are better apps for that that are easier to configure, manage and secure. • Notes: There are a myriad note taking applications out there that work better. I don’t need yet another one. • Passwords: Again, there are better alternatives: KeePass, 1Password, LastPass. Nextcloud has a chance to do that one thing well and do it better than Dropbox ever did— that is, file syncing. I feel they’re consciously choosing to throw it away because they want to get a bit more clout and a bit more money. If they keep at it they’re going to end up like Mozilla. ## Organize album order in Flickr I like Flickr. I have been a paying user for years, since the heady days of Web 2.0. Very photo, so web. But their documentation fucking sucks. It went down in quality when Yahoo took over, and SmugMug isn’t doing much better. But anyway. Here’s how to reorganize the order in which albums in the Flickr mobile app show up: 1. Log in to Flickr on the web 2. Go to the Albums & Collections section of the Organizr. 3. At the top of the page make sure Viewing: All Albums is selected. 4. On the right panel order the albums whichever way you want. Making this change will have effect in two places: – The Albums page on the web • The Albums page in the mobile App. Neither the Flickr Help Center nor the Help Forum have any posts about this. Now, I’m using the Android app but I assume the iOS-based versions will also follow the ordering set in the Organizr panel. I wish Flickr enabled a few things: – Sorting by album metadata (alphabetically, album creation date) – Sorting by picture metadata (make bigger/smaller albums show up first/last). This would include sorting by last album upload, so albums used the most get shown first. – Make Collections a first-class citizen on the site. They’ve been relegated as a little used organization tool that no one uses and when it does get used it isn’t showcased. Flickr has so much to win now that Instagram is being integrated ever more into facebook’s grubby infrastructure. ## Another attempt at a note-taking workflow In a previous post I mentioned one of the tools I use is Wiki.js. It was a great thing to learn how to set it up but… I was never entirely happy with it: • It’s somewhat slow on loading. • Not that customizable yet. • The update process is a total pain in the ass. They want you to use Docker and this ‘ere server can run it but performance wouldn’t be that nice. • On mobile I have to depend on the vagaries of whatever browser I’m using (Firefox) so I don’t get that good of an editing interface. • This is a private repository of knowledge so if it turns out wiki.js has a security issue my wiki is now at risk until I go through the pain of updating again. So that’s that. I’d been playing with vimwiki since it’s text-based. After a bit of playing I was able to make it work nicely on the gVim instance I run on the Windows 10 desktop and the Ubuntu instance I run in WSL. The mobile side of things was immensely helped along by Epsilon Notes, which blows iA Writer completely out of the water. Along the way I tried using Joplin which at first glance seems awesome but then you run into this issue: Yes, I get the logic of completely unique filenames but it also means that I’m locked into the app. This is something people have complained about as it defeats all efforts at interoperability. I mean, these are fucken markdown files. And this is an open source app! Oh right, it also uses its own WebDAV connection to the Nexcloud instance, so slow your roll. So back to Epsilon. It’s got a few goodies: • Line numbers • CommonMark is the default markdown dialect. • It’s native to Android. • Let’s you use front matter for tags but doesn’t require it. I personally don’t care for it. • It sets up its own folder in the device filesystem which you can then sync with Nextcloud. ## The workflow All right, so this is what I have right now ### vim/gvim Assuming there’s already a working Windows gVim instance, a working WSL installation, and a working Nextcloud desktop client: 1. Setup vim with vimwiki. 2. Configure vimwiki to store its files in a directory being synced by the Nextcloud desktop client. For the sake of simplicity and avoid changing my .vimrc file unnecesarily in WSL/ubuntu I symlinked ~/vimwiki to the appropriate directory in Windows; this way the _vimrc file in gVim could remain the same. Using either vim instance gets me to the same location. 3. Create your vimwiki index file: <Leader>ww, and save it. It should get picked up by Nextcloud. ### Nextcloud Using the web interface or the Android client, mark the vimwiki folder as a favorite so Nextcloud keeps it synced at all times. I don’t think there’s a way to do this in the desktop client yet. ### Epsilon Notes Assuming there’s already a working Nextcloud app 1. Install Epsilon from the Play Store. 2. Tap the folder icon on the top right and navigate to /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/USER@HOST/vimwiki/. If you have multiple Nextcloud accounts on the same app you’ll see all of those listed with a USER@HOST folder each and you can just jump between folders. Another way of doing this is setting up custom folders but I think doing it this way makes for a simpler configuration. It’d probably be really useful you have multiple vimwikis or multiple Nextcloud accounts though. ### Bonus: Servers I have a couple of boxes that run headless and I also wanted to have my notes available on there. There isn’t a terminal Nextcloud client but I found Rclone. I could have used cadaver but Rclone is designed specifically for cloud file storage: These instructions worked under my Debian 10 install: 1. Install rclone and fuse3: sudo aptitude install rclone fuse3. 2. Configure Rclone with rclone config. Documentation. 3. Create an Rclone mount with something like rclone --vfs-cache-mode writes mount NEXTCLOUD:/vimwiki ~/vimwiki --daemon  Which assumes NEXTCLOUD is what you named the remote configuration, your vimwiki directory lives at$HOME, and you want the connection to remain alive until you decide to stop it manually. The --vfs-cache-mode writes flag will enable some amount of caching. Documentation.
4. At this point you can access your vimwiki as if they were on the local filesystem.

## Fucken awesome amirite

SO now we have wiki-like notes that can be edited on desktop, mobile, or server, using whichever editor you prefer. Another bonus: You’re not locked in to anything. I could edit notes on desktop with Notepad++, Sublime Text, or Atom. On mobile you can edit them with whatever text editor you end up with. On a server you can edit them natively with whatever you have at hand.

And in the sad event you don’t have anything you can still access them through the Nextcloud web interface. They even got a markdown editor but I’m not sure what dialect it uses.

The only thing I dont have anymore is a nice clean way to print these notes but this is where pandoc and a print.css file should be useful. If worst comes to worst I can always paste something into LibreOffice and just change the styling that way. Another thing I’ll have to change is how I search for things but since I do have access to the terminal I can always resort to grep if worst comes to worst.

## Extras

I did have a few things that led me to try and avoid using web interfaces for this

• The Website Obesity Crisis. Comments on reddit and Hacker News
• The reckless, infinite scope of web browsers
• I tried creating a web browser, and Google blocked me
• Browser bloat has been a problem for a long, long time now.
• The proliferation of browser-based text editors (StackEdit, Dillinger, Editor.md, WordPress) that try to do too much and they end up falling flat on their face cos nothing beats the responsiveness of editing locally.
• The flipside of the above is I can use editors native to each platform. This post was typed on vim, then pasted into WP, for example. This makes for a much, much nicer editing experience specially when doing long-form text or to-do lists.
• Avoiding lock-in. It was a drag to move from one platform to another and paste everything manually, cos all of these tools depend on locking you in.
• Security. My Nextcloud instance is exposed to the Internet but I can always implement more things cos I control the network, the hardware, and the operating system.
• Other people who were also on search of a good editing experience, like this, or this.
• Easy migration of mark-up. I’m trying to use editors that support CommonMark since that way I can always be more or less sure of how something is going to look if I export it elsewhere, and I have the freedom of switching to something else like ReStructured Text or AsciiDoc, which I have considered.

I’m super excited about this. My notes en’t locked in anywhere and they’re all in plain-text, which is the only thing guaranteed to not change in the next 20 years,

## Thinking Tools: July 2020

It’s been a long while since that last post I did and my setup has changed a lot:

## Web services

• This site, which I’m trying to update more often with links and blog posts I find interesting. It’s going much better after I installed the WP Editor.md plugin to enhance the plain editor. The gutenberg editor sucks ass.
• Nextcloud. I’m running my own instance to replace Dropbox, which I didn’t like the last time. Got the desktop client installed and it’s working quite nicely.
• Twitter is still my social media network of choice. I’m using tweetdeck on the desktop
• Feedly is still my RSS reader of choice but I’m looking around for a replacement that works across all my devices and it’s pretty to look at. Now that people are starting to move away from centralized social networks again there should be some movement in this space.
• I’m running my own wiki using Wiki.js, which I’ve blogged about. This will probably merit another couple blog posts of their own specially now that I found vimwiki which could potentially run inside my Nextcloud instance.

## Actual applications installed on my desktops and laptops

• For messaging I’m now using Ferdi, a fork of Franz, to run most of my instant messaging needs. The great exceptions are Slack, Discord, and Signal; I discovered I work better when they have their own app instances running but when Signal offers a web interface I’ll probably fold it into Franz.
• Spotify. Thinking of replacing it with a self-hosted option. I miss my graded playlists.
• KeePass is still my password manager of choice.
• Firefox. Mozilla keeps trying its best to kill all low-level functionality. This is easily the program I fuck around with the most, going from extensions to custom userChrome files.
• Windows Subsystem for Linux. Much less of a pain in the ass than running a VirtualBox VM depending on what you’re doing. Using wsltty as its terminal.

There are some single-purpose utilities I’ve discovered in the interim that are extremely useful for working in Windows 10.

## Mobile applications (Android)

• The usual instant messaging slash social networking suspects minus TikTok, which is spyware.
• Firefox mobile. Firefox needs to do better at syncing preferences into it.
• Fenix twitter client. Twitter Co keeps fucking around with their API and preventing third party clients from achieving the excellence they used to have years ago.
• Nextcloud mobile client for my Nextcloud instance. Needs a lot of work to compare with Dropbox, but it does its job well.
• Moon+ Reader for ebooks. This one took me a long while to find, most ebook readers have utterly crazy skeuomorphic defaults.
• Photoshop Express. This one was annoying but you’d be surprised how many image editors are missing features you’d consider basic (like cropping and image resizing), opting instead to overload with photo filters you’ll never use. This one has all the filters but at least lets you crop and resize. It replaced Snapseed. I’ve still to wade through open source editors but my hopes are dim on that front.

There are some things that underpin all of these applications but I think I’ll leave it as-is. It’s pretty fun to see how my workflow changes over time.

## Wiki.js 2 with Nginx Installation

For the past few months I’ve been using Tiddlywiki as a memory dump but been having some issues. First started with the dreaded XMLHttpRequest error:

Error retrieving skinny tiddler list: XMLHttpRequest error code: 404


Which the available documentation offers no help with and the developers just shrug at. Then it just ate a fucken shotgun shell deep down its throat:

We en’t here for that shit so on we went looking for an alternative that treats markdown as a first-class white citizen in apartheid america. Found wiki.js, which seems to have that, and here we are.

What follows is a guide written after a week of bashing our head against multiple desks because devlopers are morons who don’t know how to write documentation, if they even bother writing any. What is available for wiki.js is fucken laughable or only applies to the 1.x series. Real developers are extinct, by the way.

This is what worked for us on Debian 9. You will have to adapt this for your own OS and hosting configuration. We’re not at fault if the results eat your pet, fuck your significant other, and make your mom call them daddy.

# Ingredients

This assumes DNS is already routing properly, outgoing mail works, and you’ve already dealt with your firewall. This setup gets you a wiki.js installation with nginx as a reverse proxy running security.

All commands are executed as root.

# Installation

Install what you need

# aptitude install nginx-extras postgresql postgresql-contrib pgcli nodejs certbot python-3-certbot-nginx


Download and extract wiki.js (assuming we’re at /var/www) like the documentation says:

# wget https://github.com/Requarks/wiki/releases/download/2.3.81/wiki-js.tar.gz
# mkdir wiki
# tar xzf wiki-js.tar.gz -C ./wiki
# cd ./wiki
# mv config.sample.yml config.yml


# Configuration

## Nginx

Edit your configuration file for nginx so it passes everything to the wiki cleanly through nginx. The original configuration was generated by nginxconfig.io and incorporates stuff from the official documentation

As of right now (2020-05-16_14-28) they are valid and working server blocks

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;

server_name wiki.domain.invalid;

# SSL
ssl_certificate /etc/letsencrypt/live/wiki.domain.invalid/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/wiki.domain.invalid/privkey.pem; #managed by Certbot
ssl_trusted_certificate /etc/letsencrypt/live/wiki.domain.invalid/chain.pem;

# . files
location ~ /\.(?!well-known) {
deny all;
}

# logging
access_log /var/log/nginx/wiki.domain.invalid.access.log;
error_log /var/log/nginx/wiki.domain.invalid.error.log warn;

# reverse proxy
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version                  1.1;
proxy_next_upstream error timeout http_502 http_503 http_504;
}

# gzip
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
}

# HTTP redirect
server {
listen 80;
listen [::]:80;

server_name wiki.domain.invalid;

# ACME-challenge
location ^~ /.well-known/acme-challenge/ {
root /var/www/_letsencrypt;
}

location / {
return 301 https://wiki.domain.invalid$request_uri; } }  ## SSL Using Let’s Encrypt SSL certificates: # certbot  Go through the wizard and it will automatically fix the SSL entries on your server blocks. You could also do this if you know what you’re doing and don’t want certbot to mess around with your files: # certbot certonly --webroot -d wiki.domain.invalid --email mail@domain.invalid -w /var/www/_letsencrypt -n --agree-to-tos  ## Nginx Testing Test and reload your configuration: # nginx -t # service nginx reload  Watch out for any errors, as usual. At this point Nginx will be serving files but as wiki.js isn’t setup yet you’ll get HTTP 502 errors if you try to visit the site on a browser. This configuration plays well with other sites being hosted on the same server. ## Postgres Secure your Postgres installation: # sudo su postgres$ passwd


Then setup your database. pgcli has smart completions turned on by default and looks pretty.

$pgcli > create DATABASE wikijs; > create USER wikijs_user with ENCRYPTED PASSWORD 'Strong password'; > grant ALL PRIVILEGES on DATABASE wikijs to wikijs_user; > \c wikijs > CREATE EXTENSION pg_trgm; > exit$ exit


## Wiki.js

Edit config.yml and make the appropriate changes:

• Port should match what was configured in the nginx https server block (3000)
• In db section, enter your database credentials
• Do not enable SSL unless you are not to run this behind a proxy. This might work on a developer workstation but on the public internet you’re asking to get it up the ass, no lube.

Once this is done, start the application and watch for any errors

# node server


At this point you can visit your site and go through the installation wizard.

# Configuration

There are a bunch of things the official wiki.js documentation only mentions offhandedly, or that you’ll only find out if you go rooting around in the issues tracker.

You can name it anything you want but if you make the path anything other than /home wiki.js will freak out on you and send you on a loop.

## File Storage

By default wiki.js will keep all its shit on the DB, which is a fucken stupid bad decision. We like making good decisions so we need to tell wiki.js to keep its shit in the filesystem:

1. Go to Administration > Storage
2. Enter the desired absolute path for your stuff, like /var/www/wiki.domain.invalid/wiki-content
3. Enable the target
4. Apply the changes

We’re unsure if this means wiki.js will actually use file storage to begin with, but at least you’ll be able to create quick backups of all your stuff. You have backups and you test them, right?

## Search Engine

The default search is slow AF, so we’re going to use something better

1. Go to Administration > Search Engine
2. Select Database – PostgreSQL
3. Apply the changes

# Finishing thoughts

This thing has potential but it’s got a long way to go before it can look up to MediaWiki. If you find issues with this holler at me on the twitters.

## tl;dr I want Google Keep extended with WikiWords and file storage.

I’ve toured all the note-taking apps: Evernote, Simplenote, OneNote, Google Keep… and I’ve found them all wanting. These past few months I’ve gone back and forth between Keep and Tiddlywiki trying to figure out exactly what I want I think I finally realized what I want:

• The speed of Google Keep when it comes to creating and saving new notes.
• The speed of Pinboard when it comes to tagging.
• The formatting facilities of Simplenote, which uses markdown. The version control is also nice.
• The file attachment ease of OneNote when it comes to binary blobs. You can put anything in those notes.
• For images… well, pretty much everything sucks, but I guess WordPress is a good starting point.
• The interlinking ease of Tiddlywiki. WikiWords kick ass.
• The ubiquity of Keep. It’s on your phone, your desktop, your tablet. Which goes back to it being fast.

Reading through this and apparently no one makes a version of Keep that has better text formatting, lets you attach images and decide where they’ll appear, while letting you travel from note to note via tags or WikiWords so you can remember the flow of though that led to that thought sequence.

Paper does not work for having to remember related thought separated by time and space. Plus writing for more than five minutes annoys me.

They say most programming projects start from a developer scratching their own itch. I guess it’s true.

## Thinking Tools: September 2016

Gordondoes them every now and then, so I’m going to start doing them too:

• This site, which I am meaning to most more often to (and not just pictures like I did before). I guess proof is what looks to become a series of posts on my laptop being my router. I’ve posted about how I feel, so it’s progress.
• Twitter, via Hotot+ on Chrome for the desktop, and Fenix on Android. The problem is that with Twitter Co. being assholes to their devs, Hotot+ has had its API key suspended a few times and Fenix is not really in active development any more after running out of app tokens. Given the current news about Twitter Co. looking to sell itself I wonder what will replace it for me. It’s basically become my social life on the internet, since I’m not really active on IRC anymore. I am on facebook mostly for family.
• Notepad++: Jot down pretty much anything that pops into my mind. Sometimes I do use it to edit blog posts for usually the text mode WordPress editor suffices. I’ve tried to do a diary of sorts in it but it’s harder than I thought it’d be.
• Franz I was using the Common Hangouts Chrome extension but Google went and fucked around with Hangouts again, so it stopped working. Pidgin is basically AWOL. Trillian is crap. So after much consideration I gave in and installed it. It looks like crap on my 4k display and Hangouts still has the stupid new interface, but at least it lets me have a single window for what little messaging I do these days.
• KeePass Been using it for years now. Probably won’t stop ever. Everything wants/needs its own password now.

The most pressing need that I have for myself is a replacement for Tiddlywiki that I can run from this server; it’d probably require me to configure HTTPS but that’s another project worth learning. The main issue then becomes choosing an appropriate wiki that is about as flexible as tiddlywiki without requiring the use of any extensions on the browser. Running this from the server would also allow me to update it from any mobile devices. Tiddlywiki is decidedly desktop software; the clients available for on Android all suck. This is why it’s so pressing for me. I need something that lets me document my life so I can offload stuff from wetware onto software. I’ll keep trying using simple text for now… but I think my mind simply works better using a wiki paradigm. I really do wonder what Twitter will turn into once it doesn’t belong to itself, though.