Skip to content

Instantly share code, notes, and snippets.

Avatar
Caffeinating

Brian McCallister brianm

Caffeinating
View GitHub Profile
View aqi.1h.sh
#!/bin/zsh
# [BitBar](https://github.com/matryer/bitbar) script to display air quality
[[ -a ~/.zshrc ]] && source ~/.zshrc
# aqi can be installed via `brew install brianm/tools/aqi`
# whereami can be installed via `brew install brianm/tools/whereami`
tmp=$(mktemp)
whereami | xargs aqi -- | sort -rn > $tmp
echo "Air: $(head -1 $tmp | cut -f 2)"
View cargo-tree.txt
wsf on  master ❯ cargo tree
wsf v1.1.9 (/Users/bmcc/src/github.com/brianm/wsf)
├── anyhow v1.0.31
├── chrono v0.4.11
│ ├── num-integer v0.1.42
│ │ └── num-traits v0.2.11
│ │ [build-dependencies]
│ │ └── autocfg v1.0.0
│ │ [build-dependencies]
│ │ └── autocfg v1.0.0
@brianm
brianm / .gitignore
Last active Feb 11, 2020
Go net/rpc over ssh+netcat and unix domain sockets It would be nice if ssh.Session implemented io.ReaderWriter
View .gitignore
local_client
server
client
ext
View wt
#! /bin/bash
set -e
# Requires WT_GOOGLE_API_KEY be set to a valid Google API Key
# That means, it needs to have both timezone API and geocoding API enabled
# https://developers.google.com/maps/documentation/timezone/get-api-key
# https://console.developers.google.com/apis/credentials
if [ "$#" -lt 1 ] || [ -z "$WT_GOOGLE_API_KEY" ]; then
echo "Usage: $(basename $0) LOCATION" >&2
View decoder.rs
extern crate base64;
use std::fmt;
use std::io::{Read, Result};
pub struct Base64Decoder<'a> {
r: &'a mut Read,
config: base64::Config,
extra: [u8; 3],
View kubby.service
[Unit]
Description=standalone kubelet
After=docker.service
Requires=docker.service
[Service]
User=root
ExecStartPre=-/bin/docker kill kubby
ExecStartPre=-/bin/docker rm kubby
ExecStartPre=-/bin/docker create \
View issues.md

Turning Off Github Issues

My friend Michael Jackson turned off github issues on one of his smaller projects. It got me thinking...

Maintainers getting burned out is a problem. Not just for the users of a project but the mental health of the maintainer. It's a big deal for both parties. Consumers want great tools, maintainers want to create them, but maintainers don't want to be L1 tech support, that's why they

View MemcakeTest.java
package org.skife.memcake;
import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import org.skife.memcake.connection.Connection;
import org.skife.memcake.connection.Value;
import org.skife.memcake.connection.Version;
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

View CallThingie.java
public class HttpClient implements Call.Factory {
private final OkHttpClient ok;
HttpClient(final OkHttpClient ok) {
this.ok = ok;
}
/**
* Returns a CompletableCall, which supports CompletableFuture based enqueueing.
You can’t perform that action at this time.