Skip to content

Instantly share code, notes, and snippets.

View clayreimann's full-sized avatar

Clay Jensen-Reimann clayreimann

View GitHub Profile
@clayreimann
clayreimann / Chat analysis.md
Created September 2, 2025 04:08
Audiobookshelf App Issue Summary

🌍 Global Issue Analysis for Audiobookshelf App

✅ Key Cross-Platform Overlaps

Progress/Sync issues → appear in all three folders (most clearly global).

Playback resume bugs → present in iOS, Android, Common.

Background/idle crashes → present in iOS, Android, Common.

@clayreimann
clayreimann / func.groovy
Created January 10, 2019 19:59
How to reserve ports in a Gradle build
// From: https://github.com/bmuschko/gradle-tomcat-plugin/issues/86
def reservePorts(int count) {
def sockets = []
for(int i in 1..count) {
sockets << new ServerSocket(0)
}
def result = sockets*.localPort
sockets*.close()
result
@clayreimann
clayreimann / gist-expander.py
Created August 15, 2018 11:51
File Expander
#!/usr/bin/python
import json
import sys
import os, errno, stat
gist = json.load(open(sys.argv[1]))
gistName = gist['id']
try:
@clayreimann
clayreimann / styles.less
Created December 15, 2015 22:29
Custom stylesheet
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
@import "ui-variables";

The idea is to have nginx installed and node installed. I will extend this gist to include how to install those as well, but at the moment, the following assumes you have nginx and node installed on a Linux distro.

In a nutshell,

  1. nginx is used to serve static files (css, js, images, etc.)
  2. node serves all the "dynamic" stuff.

So for example, www.foo.com request comes and your css, js, and images get served thru nginx while everything else (the request for say index.html or "/") gets served through node.

  1. nginx listens on port 80.