Skip to content

Instantly share code, notes, and snippets.

View paulbdavis's full-sized avatar

Paul Davis paulbdavis

View GitHub Profile

On 1.4.1

% time go build -v
github.com/paulbdavis/httperror
github.com/paulbdavis/evil-lair
go build -v  1.08s user 0.19s system 91% cpu 1.390 total

on 1.4.2

Keybase proof

I hereby claim:

  • I am paulbdavis on github.
  • I am dangersalad (https://keybase.io/dangersalad) on keybase.
  • I have a public key ASBsiEsnfEEFp8x_rGAr73gGGMZBMpKYf_KDfOjOq1yhuQo

To claim this, I am signing this object:

#!/usr/bin/env bash
export script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
conf_dir="${XDG_CONFIG_HOME:-$HOME/.config}"
cache_dir="${XDG_CACHE_HOME:-$HOME/.cache}"
data_dir="${XDG_DATA_HOME:-$HOME/.local/share}"
# set failure stuff
trap_msg='s=$?; if [ $s -ne 42 ]; then echo "$0: Error on line "$LINENO": $BASH_COMMAND"; fi; exit $s'
(defun ds/handle-new-window (window)
(let ((new-class (window-class window))
(current-class (window-class (current-window))))
(let* ((frames (group-frames (current-group)))
(isempty (= 1 (length (group-windows (current-group)))))
(fx (- (screen-width (current-screen)) 5))
(fy (- (screen-height (current-screen)) 30))
(dir (if (= (mod (length frames) 2) 0) :row :column)))
(focus-frame (current-group) (find-frame (current-group) fx fy))
;; (ds/split-frame-to-empty (current-group) dir 0.61803)))
package auth
type tokenRefresher struct {
oauth *oauth2.Config
tokens map[string]*oauth2.Token
locks map[string]*sync.Mutex
accessed map[string]time.Time
}
func newRefresher(oauthConfig *oauth2.Config) *tokenRefresher {