Skip to content

Instantly share code, notes, and snippets.

@thecarlhall
thecarlhall / FreeTime.gs
Created November 6, 2023 15:49
Find how much free time (i.e., unscheduled) there is per calendar day
/*
* User Settings
*/
// Always use current week. How many weeks past that to check?
const WEEKS_AHEAD = 0;
// Assume each day starts, ends at the same times
const WORK_START_HR = 9;
const WORK_END_HR = 18;
@thecarlhall
thecarlhall / focus_flex_columns.html
Created March 25, 2023 16:06
Minimum html+css+javascript to have flex columns that will toggle focus on a selected column
<html>
<body>
<style>
.row {
display: flex;
}
.column {
flex-grow: 1;
border: 1px dashed black;
padding: 10px;
@thecarlhall
thecarlhall / 0-scrape_api.sh
Created June 8, 2020 01:32
Scripts to check the API implementation of Gonic
#!/usr/bin/env bash
curl http://www.subsonic.org/pages/api.jsp | \
grep -A 4 '<h3' | \
grep -e '<h3' -e Since | \
tail -n +6 | tr -d "\r\n" | \
sed -e $'s/<h3>/\\\n/g' | \
sed 's/<[^>]*>//g' | \
awk '{print $3, $1}' | \
sort -V > api-by-version.csv

Keybase proof

I hereby claim:

  • I am thecarlhall on github.
  • I am thecarlhall (https://keybase.io/thecarlhall) on keybase.
  • I have a public key ASA5sANtMykA5Gp0pXlvJtfdXaiCv6UFakWoO3DMBiUHsQo

To claim this, I am signing this object:

@thecarlhall
thecarlhall / 0test.log
Last active February 28, 2018 18:34
Maven setup for integration testing with DynamoDB
[INFO] --- download-maven-plugin:1.2.1:wget (install-dynamodb_local) @ app ---
[INFO] Got from cache: /home/carl/.m2/repository/.cache/maven-download-plugin/dynamodb_local_latest.zip
[INFO]
[INFO] --- process-exec-maven-plugin:0.7:start (dynamodb_local) @ app ---
[INFO] arg: java
[INFO] arg: -Djava.library.path=dynamodb/DynamoDBLocal_lib
[INFO] arg: -jar
[INFO] arg: dynamodb/DynamoDBLocal.jar
[INFO] arg: -port
[INFO] arg: 53351
@thecarlhall
thecarlhall / templates_slash_Java.xml
Created September 30, 2015 01:00
Intellij Live Template for create a fluent "with" method for a Java class variable.
<templateSet group="Java">
<template name="with" value="public $CLASS_NAME$ with$NAME$($VAR_TYPE$ $VAR_NAME$) {&#10; this.$VAR_NAME$ = $VAR_NAME$;&#10; return this;&#10;}&#10;$END$" description="Fluent getter" toReformat="false" toShortenFQNames="true">
<variable name="CLASS_NAME" expression="className()" defaultValue="" alwaysStopAt="false" />
<variable name="NAME" expression="" defaultValue="&quot;Name&quot;" alwaysStopAt="true" />
<variable name="VAR_NAME" expression="decapitalize(NAME)" defaultValue="$NAME" alwaysStopAt="false" />
<variable name="VAR_TYPE" expression="typeOfVariable(VAR_NAME)" defaultValue="$VAR_NAME" alwaysStopAt="false" />
<context>
<option name="JAVA_CODE" value="true" />
<option name="JAVA_STATEMENT" value="true" />
<option name="JAVA_EXPRESSION" value="true" />
@thecarlhall
thecarlhall / gist:9769769
Created March 25, 2014 19:46
keybase.md
### Keybase proof
I hereby claim:
* I am thecarlhall on github.
* I am thecarlhall (https://keybase.io/thecarlhall) on keybase.
* I have a public key whose fingerprint is A91D B52F 5B79 FDF7 8148 F10A 8418 AB87 21C8 CE0E
To claim this, I am signing this object:
[user]
name = Carl Hall
email = carl@cloudability.com
[rerere]
enabled = 1
[core]
excludesfile = /Users/carl/.gitignore_global
pager = less -r
[color]
ui = auto
@thecarlhall
thecarlhall / nginx.conf
Created September 3, 2013 06:15
Example nginx configuration for Drupal from http://wiki.nginx.org/Drupal
server {
server_name {{ server_name }};
root {{ server_root }}; ## <-- Your only path reference.
# Enable compression, this will help if you have for instance advagg‎ module
# by serving Gzip versions of the files.
gzip_static on;
location = /favicon.ico {
log_not_found off;
################################################################################
# terminal/prompt stuff
################################################################################
BLUE="\[\033[0;34m\]"
CYAN="\[\033[0;36m\]"
GREEN="\[\033[0;32m\]"
RED="\[\033[0;31m\]"
MAGENTA="\[\033[0;35m\]"
YELLOW="\[\033[0;33m\]"
WHITE="\[\033[1;37m\]"