// from the flitter/libflitter project - app/FlitterApp.js/** * @module libflitter/app/FlitterApp */const { Container, DependencyInjector } = require('flitter-di')const Service = require('../NamedService')const output = new (require('../utility/services/Output.service'))()const Unit = require('../Unit')const Analyzer = require('./Analyzer')const SoftError = require('../errors/SoftError')const FatalError = require('../errors/FatalError')const UnitRuntimeDependencyError = require('../errors/UnitRuntimeDependencyError')const RunLevelErrorHandler = require('../errors/RunLevelErrorHandler')const error_context = require('../errors/error_context.fn')/** * The Flitter application. * @extends module:flitter-di/src/Service~Service */class FlitterApp extends Service {  /**   * Get the name of this app's service: 'app'   * @returns {string} - 'app'   */  static get name() {    return 'app'  }  /**   * If true, the {@link module:libflitter/app/Analyzer~Analyzer} will check   * the application dependencies before run.   * @type {boolean}   */  enable_analyzer = true  /**   * Instantiate the application.   * @param {object} units - mapping of names to static Unit CLASS definitions   */  constructor(units) {    super()    /**     * The app's units.     * @type {Array<module:libflitter/Unit~Unit>}     */    this.__units = Array.isArray(units) ? units : Object.values(units)    /**     * Instance of the output service.     * @type {module:libflitter/utility/services/Output~Output}     */    this.output = output    /**     * Array of unit names.     * @type {Array<string>}     * @private     */// from the flitter/libflitter project - app/FlitterApp.js/** * @module libflitter/app/FlitterApp */const { Container, DependencyInjector } = require('flitter-di')const Service = require('../NamedService')const output = new (require('../utility/services/Output.service'))()const Unit = require('../Unit')const Analyzer = require('./Analyzer')const SoftError = require('../errors/SoftError')const FatalError = require('../errors/FatalError')const UnitRuntimeDependencyError = require('../errors/UnitRuntimeDependencyError')const RunLevelErrorHandler = require('../errors/RunLevelErrorHandler')const error_context = require('../errors/error_context.fn')/** * The Flitter application. * @extends module:flitter-di/src/Service~Service */class FlitterApp extends Service {  /**   * Get the name of this app's service: 'app'   * @returns {string} - 'app'   */  static get name() {    return 'app'  }  /**   * If true, the {@link module:libflitter/app/Analyzer~Analyzer} will check   * the application dependencies before run.   * @type {boolean}   */  enable_analyzer = true  /**   * Instantiate the application.   * @param {object} units - mapping of names to static Unit CLASS definitions   */  constructor(units) {    super()    /**     * The app's units.     * @type {Array<module:libflitter/Unit~Unit>}     */    this.__units = Array.isArray(units) ? units : Object.values(units)    /**     * Instance of the output service.     * @type {module:libflitter/utility/services/Output~Output}     */    this.output = output    /**     * Array of unit names.     * @type {Array<string>}     * @private     */// from the flitter/libflitter project - app/FlitterApp.js/** * @module libflitter/app/FlitterApp */const { Container, DependencyInjector } = require('flitter-di')const Service = require('../NamedService')const output = new (require('../utility/services/Output.service'))()const Unit = require('../Unit')const Analyzer = require('./Analyzer')const SoftError = require('../errors/SoftError')const FatalError = require('../errors/FatalError')const UnitRuntimeDependencyError = require('../errors/UnitRuntimeDependencyError')const RunLevelErrorHandler = require('../errors/RunLevelErrorHandler')const error_context = require('../errors/error_context.fn')/** * The Flitter application. * @extends module:flitter-di/src/Service~Service */class FlitterApp extends Service {  /**   * Get the name of this app's service: 'app'   * @returns {string} - 'app'   */  static get name() {    return 'app'  }  /**   * If true, the {@link module:libflitter/app/Analyzer~Analyzer} will check   * the application dependencies before run.   * @type {boolean}   */  enable_analyzer = true  /**   * Instantiate the application.   * @param {object} units - mapping of names to static Unit CLASS definitions   */  constructor(units) {    super()    /**     * The app's units.     * @type {Array<module:libflitter/Unit~Unit>}     */    this.__units = Array.isArray(units) ? units : Object.values(units)    /**     * Instance of the output service.     * @type {module:libflitter/utility/services/Output~Output}     */    this.output = output    /**     * Array of unit names.     * @type {Array<string>}     * @private     */

posts & updates

Open Letter

Open Letter

An Open Letter to Senator-elect Roger Marshall

Roger Marshall, Kansas Senator-elect, has expressed his intention to vote not to certify the result of the 2020 presidential election.

I feel very strongly that this is a dangerous and irresponsible move that goes against the core tenets of American democracy.

Read the letter here.

This letter is released in the public domain. Please, adapt it, share it with others, and most importantly, send it to your representatives. Call them, e-mail them, snail mail them to tell them to support free and fair elections.

permalink  |  1/2/2021, 11:30:31 PM

Code Snippet

Code Snippet

Full-text search PDFs from Linux CLI

For an open-note exam, I wanted a quick way to full-text search PDFs from the command-line.

I wrote a 2-line script to help with that, using just find, grep, and pdftotext (common to most distros).

Get it here.

permalink  |  12/9/2020, 1:35:36 AM

Side Project

Side Project

MiniQ: A bare-bones, CRON-driven job queue.

I wanted a simple way to queue jobs to be run in the background without having to run a separate daemon.

MiniQ is what I came up with. With just 3 files, MiniQ provides the ability to log jobs and the CRON script will run periodically and execute the queued jobs in the background.

More info here.

permalink  |  12/2/2020, 7:51:45 PM

Blog Post

Blog Post

Converting an Ionic/Angular Site into a Progressive Web App

For the last year or so, I've been working on converting an Ionic app to a progressive web app with offline support called Noded. I decided to write up my findings on how to do this with Angular service-worker.

Read more about it here.

permalink  |  12/1/2020, 6:28:31 PM

Side Project

Side Project

My Technical Notes Site

I'm trying to write down or save all the technical tricks, notes, and fixes I find. That way, it's easier for me to find them again in the future, and maybe they can be of use to others.

You can check them out here.

permalink  |  11/29/2020, 9:13:30 AM

Code Release

Code Release

VuES6 - ES6 Vue.js Components, in Plain JavaScript

I recently released a small utility library for defining Vue components as proper ES6 classes, but in vanilla JavaScript. I like to use this in small projects where I don't want to have to set up vue-cli and compile templates. More info here.

permalink  |  4/22/2020, 11:17:15 PM

Code Release

Code Release

flitter-di@0.1

Flitter-DI is the second-generation dependency-injector used by the Flitter framework. It was pulled from the libflitter project in the hope that it can remain independent from the rest of Flitter and can be used in other projects. More info here.

permalink  |  12/19/2019, 9:19:39 PM

Blog Post

Blog Post

How to Code From Home Like a Boss

With the current need to work from home, I've put together a list of tricks and tools I use to do my work as a software developer remotely, and discuss the challenges. Here's what I use.

permalink  |  2020-07-23T09:15:49.731Z

Code Release

Code Release

Feed Page, RSS, & Atom - Minor Website Updates I recently made some tweaks to my website. I added a dedicated page as a historical archive for these updates.

I also added the ability to subscribe to this feed using RSS, Atom, and JSON thanks to a handy NPM package.

permalink  |  2020-05-09T00:30:33.192Z

Side Project

Side Project

Connect-4 Webtoy

I've built a simple Connect-4 webtoy as a project for EECS 368 at the University of Kansas. You can play with it here.

permalink  |  2020-04-08T14:20:25.849Z

Blog Post

Blog Post

Code Freedom with Gitea & Drone - Part I

In my never-ending quest to self-host all the things, I've deployed a combination of Gitea and Drone CI for a feature-for-feature, self-hosted alternative to GitHub. Here's how.

permalink  |  2020-03-07T05:10:49.731Z

HackKU 2020

HackKU 2020

Noded - Free-Form Notes & Databases

I recently attended the annual University of Kansas hackathon, where me and a couple friends built Noded.

Noded is a tree-based note taking app based on reusable page elements. It provides support for basic notes, uploaded files, a built-in code editor, customizable databases, static website exports, and sub-tree sharing. Check it out here.

permalink  |  2020-02-25T01:28:06.154Z

Blog Post

Blog Post

Dependency Injection in Less Than 100 Lines of Pure JavaScript

DI is a powerful pattern for segmenting code to keep it efficient and easy to reuse. In this article, we're going to build a basic DI in <100 lines of pure ES6. Read about it here.

permalink  |  2019-11-16T19:18:49.804Z

Blog Post

Blog Post

A New Platform - My Relentless Pursuit of Privacy

I've finally moved the home of my blog from Medium.com over to a self-hosted Hexo blog. Why? Read more here.

permalink  |  2019-11-15T07:49:14.346Z

Code Release

Code Release

flitter-auth@0.13

This release of Flitter's auth provider brings an OAuth2 server, OAuth2 client, and refinements to the login flow structure. More details here.

permalink  |  2019-11-01T16:19:46.584Z

Speaking

Speaking

Computing in the Kubernetes Framework

Recently I had the pleasure of presenting at the University of Kansas' Center for Research Methods and Data Analysis Weekly Colloquium. You can find resources from my talk on using k8s for scientific computing here.

permalink  |  2019-11-01T15:49:18.769Z

Blog Post

Blog Post

Building a Raspberry Pi Cluster - Part 3

In the third installment of my miniature-HPC series, we discuss OpenMPI, Python3, and running parallel jobs. Read more here.

permalink  |  2019-11-01T15:46:47.194Z

Garrett Mills
Copyright © 2021 Garrett Mills