Skip to content

Instantly share code, notes, and snippets.

View DoctorU's full-sized avatar

Steve Hobdell DoctorU

View GitHub Profile
@DoctorU
DoctorU / WAITING_DOTS.md
Created October 6, 2025 08:10
The little dots used as "waiting..." by gcloud and ollama

What are the little dots used as waiting by gcloud and ollama?

They're basically representations of the following letters in braille:

Braille symbol meaning
?
#
7
v
@DoctorU
DoctorU / Order of Service.md
Last active October 5, 2025 08:50
Securing Cloud Run Services

Order of service

  • Clone this gist.
  • Set environment variables for REGION, PROJECT_ID and REPOSITORY.
  • shipping-private-markdown-service.sh
  • Set environment variable for SERVICE_URL.
  • test-markdown-service.sh
  • shipping-public-service.sh
  • Visit the public service's URL in a browser.
  • cleanup.sh
@DoctorU
DoctorU / Main.java
Created February 1, 2024 10:30
A simple WiFi signal strength-to-dots converter. Works in C or Java
public class Main
{
static int fromdBmtoNDots(int dbm) {
int dots = 0;
if(dbm >= -90 ) dots++;
if(dbm >= -80) dots++;
if(dbm >= -70) dots++;
if(dbm >= -67) dots++;
if(dbm >= -30) dots++;
return dots;
@DoctorU
DoctorU / doctoruseful.zsh-theme
Last active November 15, 2023 17:16
My custom Zsh theme. extract into ~/.oh-my-zsh/custom/themes/ then add it to .zshrc with `omz theme set doctoruseful`.
# ZSH Theme, edited from fishy theme,
# but restoring the best bits of git_prompt!
# prerequisite plugins:
# git-prompt
_plugin_installed() {
echo "$plugins" | grep -o "\b${1}\b" >/dev/null
}
_plugin_installed git-prompt || omz plugin enable git-prompt
@DoctorU
DoctorU / met-office-sso-to-csv.sh
Created December 17, 2020 10:30
jq parser for the metoffice's site-specific observations to CSV
#!/usr/bin/env sh
# Source your data from https://www.metoffice.gov.uk/services/data/datapoint/uk-hourly-site-specific-observations
jq -r '.SiteRep.DV.Location.Period[]|(.value as $date|.Rep[]|[$date, (.|to_entries|map(.value))])|flatten|@csv'
@DoctorU
DoctorU / jrebel_build.xml
Last active April 25, 2017 15:15
ant task to automatically add jrebel 7.0.x to hybris local.properties.
<?xml version="1.0" encoding="UTF-8"?>
<project name="My JRebel Custom Targets" basedir="." default="all" xmlns:if="ant:if">
<!-- override this if your hybris install is somewhere else -->
<property name='jrebel.hybris' value='${basedir}/hybris'/>
<property name='jrebel.hybris.localproperties' value="${jrebel.hybris}/config/local.properties"/>
<target name='jrebel' description='Adds jRebel agent to local.properties' depends="jrebel.env">
<condition property="jrebel.agentpath.ok">
<resourceexists>
<file file="${jrebel.agentpath}"/>
@DoctorU
DoctorU / log4j.properties
Created February 25, 2015 17:53
Log4J configuration to log spring controller handler mappings (url to method mapping)
log4j.logger.org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping=INFO
log4j.logger.org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping=INFO
# Or just (to cover more bases):
log4j.logger.org.springframework.web.servlet.mvc=INFO
@DoctorU
DoctorU / MINECRAFT.md
Last active August 29, 2015 14:13 — forked from anonymous/README.md
Running Minecraft on a Google Compute Engine centos 7 instance. Or any other cloud VM.

First, you'll need to spin up a Google Compute Engine instance using your favourite Linux Distro. I like CentOS 7 :)

Make sure:

  • Use Ephemeral IP address (sticky to the instance, not static)
  • Set up the port for the default 25565 (I think) - needs a firewall?

Also you'll have to change the port that the minecraft server runs on, because the GCE is only open on https or http.