Skip to content

Instantly share code, notes, and snippets.

View micahlt's full-sized avatar
💻

Micah Lindley micahlt

💻
View GitHub Profile
@micahlt
micahlt / usable-macos.md
Created June 1, 2026 15:35
Making macOS usable

Micah's Usable macOS Setup

I genuinely think that macOS is a bad operating system out of the box, and it doesn't include almost any quality of life feature provided by most Linux desktop environments (GNOME my beloved) or even Windows. This is mostly for my own reference to remember how I set up my work Macbook Pro to be more usable long-term.

Homebrew

Homebrew is an immediate install for any macOS device I use. It makes package management and installing open-source applications and utilities miles easier.

Window Management

CavalryOnLinux

A guide to running the Cavalry motion graphics software on Linux using Wine.

This guide has been tested exclusively on Wine 11.

Initial setup

Set up a new prefix

@micahlt
micahlt / lolwp.ps1
Last active March 26, 2024 14:25
Set elmo wallpaper
Function Set-WallPaper($Image) {
<#
.SYNOPSIS
Applies a specified wallpaper to the current user's desktop
.PARAMETER Image
Provide the exact path to the image
.EXAMPLE
@micahlt
micahlt / launch.json
Created September 18, 2023 15:37
VSCode JavaFX config
{
// This is a VSCode launch config for Java with unmodularized JavaFX
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Launch with JavaFX",
"mainClass": "HelloFx",
"request": "launch",
"vmArgs": "--module-path C:\\JavaFX\\lib --add-modules javafx.controls"
@micahlt
micahlt / UnrealbookArchiver.js
Created August 4, 2023 01:58
Archive Unrealbook files from the web interface API
const fs = require("fs");
const path = require("path");
const { Readable } = require('stream');
const { finished } = require('stream/promises');
const downloadFile = (async (url, path) => {
try {
const stream = fs.createWriteStream(path);
const { body } = await fetch(url);
return await finished(Readable.fromWeb(body).pipe(stream));
@micahlt
micahlt / .micah_alias
Last active July 16, 2024 19:11
Alias setup for Linux machines
alias up="cd .."
alias nrd="npm run dev -- --port=3000"
alias nrb="npm run build"
alias nr="npm run"
alias cls='clear'
alias cpbranch="git rev-parse --abbrev-ref HEAD"
alias lsports="sudo lsof -i -P -n | grep LISTEN"
@micahlt
micahlt / Profile.ps1
Last active June 20, 2024 17:42
Powershell Profile
# MICAH LINDLEY'S POWERSHELL PROFILE
Function up { cd .. }
Function ~ { cd ~ }
Function gocode { cd "C:\Users\Micah Lindley\Documents\Code" }
Function cbt {
start firefox $args
start microsoft-edge:$args
$argList = '{0} --profile-directory="Default"' -f $args
start chrome -ArgumentList $argList
}
@micahlt
micahlt / disable-ssr.jsx
Created January 26, 2023 02:42
Disable SSR for Next.js Page
export default dynamic(() => Promise.resolve(Page), {
ssr: false,
});
@micahlt
micahlt / cli.js
Created December 20, 2022 05:36
TheCaf.me Memo CLI
require("dotenv").config();
const MongoClient = require("mongodb").MongoClient;
const prompts = require("prompts");
(async () => {
const client = new MongoClient(process.env.CAFMONGO);
const dbName = "info";
await client.connect();
const db = client.db(dbName);
const collection = db.collection("db-meta");
@micahlt
micahlt / fetch-demo.js
Created July 16, 2020 19:49
An example of a simple ES6 fetch request
fetch('http://example.com/api-endpoint', {
method: 'POST', // this can be GET, POST, PUT, DELETE, etc depending on the API's standards
body: 'hello, api' // this can be any data you choose to transmit through a POST or PUT request
// there are other options as well, check out the MDN article
})
.then(response => response.json()) // the response object has several properties
// the most commonly used are .json() and .status()
.then(data => {
console.log(data); // now you can do whatever you want with the data, which is the property of the
// response object you passed above. You can also pass the entire response object