Skip to content

Instantly share code, notes, and snippets.

@drewr
drewr / index.html
Last active February 16, 2024 22:29
<!DOCTYPE html>
<html lang="en">
<head>
<title>Display a satellite map</title>
<meta property="og:description" content="Display a satellite raster baselayer." />
<meta charset='utf-8'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel='stylesheet' href='https://unpkg.com/maplibre-gl@4.0.1/dist/maplibre-gl.css' />
<script src='https://unpkg.com/maplibre-gl@4.0.1/dist/maplibre-gl.js'></script>
<style>
drewr@474b6b83 Thu 15 17:25:03 877 1 src/drewr/rustutils(main●)% nix-shell -E 'let pkgs = import <nixpkgs> {}; unstable = import <nixpkgs-unstable> {}; shell = pkgs.mkShell { buildInputs = [ unstable.cargo unstable.pkg-config unstable.openssl unstable.glibc ];}; in shell' --run "cargo build"
Compiling libc v0.2.153
Compiling proc-macro2 v1.0.78
Compiling syn v1.0.109
Compiling indexmap v1.9.3
Compiling aho-corasick v1.1.2
Compiling form_urlencoded v1.2.1
Compiling clap_lex v0.2.4
Compiling proc-macro-error-attr v1.0.4
Compiling unicode-normalization v0.1.22

Describe how you typically work to resolve conflicts with others in shared community

It’s a great question. We can’t do anything meaningful together without working through conflict, because all true relationships eventually experience it. It’s especially the case in a diverse environment with different perspectives, which is one that an academic community should strive to be.

The amount that conflict is allowed grow, I believe, is commensurate with the trust level between the two parties. As trust erodes, almost anything can cause conflict. The best way to keep trust high is by deepening each other’s understanding of the other’s motives and values. The more we understand each

@drewr
drewr / core.clj
Created July 9, 2022 21:18
Redeem NYT gift code
(ns freenyt.core
(:gen-class)
(:require [etaoin.api :as eta]
[etaoin.keys :as k]))
;;(def driver (eta/firefox-headless))
(defn -main [& args]
(let [driver (eta/safari)]
(eta/go
driver (str "https://www.nytimes.com/subscription"
% zig build && ./zig-out/bin/main https://github.com/drewr/zigutils
debug: drewr zigutils
warning: The following command failed:
error: OutOfMemory
/Users/aar/Downloads/zig-macos-aarch64-0.10.0-dev.139+850b053ea/lib/zig/std/os.zig:3997:19: 0x102bdb1cb in std.os.mmap (main)
.NOMEM => return error.OutOfMemory,
^
/Users/aar/Downloads/zig-macos-aarch64-0.10.0-dev.139+850b053ea/lib/zig/std/heap.zig:331:17: 0x102bd8def in std.heap.PageAllocator.alloc (main)
) catch return error.OutOfMemory;
@drewr
drewr / init.el
Created June 10, 2020 21:00
org-roam and helm debugging
(eval-after-load 'helm
'(require 'helm-config))
;; ....
(use-package helm
:ensure t
:pin "melpa"
:requires (async popup)
:config
@drewr
drewr / jurassic_park.clj
Last active December 10, 2018 13:31
java -cp clojure-1.9.0.jar clojure.main /tmp/jurassic_park.clj
(ns jurassic-park
"Post-movie fun with the boys"
(:require [clojure.main :as m]))
(defn jurassic-read
[request-prompt request-exit]
(or ({:line-start request-prompt :stream-end request-exit}
(m/skip-whitespace *in*))
(let [input (.readLine *in*)]
(cond

After you've created a GKE cluster, run:

kubectl apply -f <(curl -s https://gist.githubusercontent.com/drewr/4bdc3540ecb6c4ddf8058c59692ea7a8/raw/es-k8s.yaml)`

That will give you a single-node instance accessible via elasticsearch:9200 around your cluster.

Apr 02 14:19:54 hotel kernel: usb 3-5.1.4: USB disconnect, device number 21
Apr 02 14:19:55 hotel kernel: usb 3-5.1.4: new full-speed USB device number 22 using xhci_hcd
Apr 02 14:19:55 hotel kernel: usb 3-5.1.4: New USB device found, idVendor=16c0, idProduct=047c
Apr 02 14:19:55 hotel kernel: usb 3-5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Apr 02 14:19:55 hotel kernel: usb 3-5.1.4: Product: Atreus2
Apr 02 14:19:55 hotel kernel: usb 3-5.1.4: Manufacturer: technomancy
Apr 02 14:19:55 hotel kernel: inp
@drewr
drewr / infra-engineer.org
Last active March 8, 2021 18:13
Software Engineer, Infrastructure

Software Engineer, Infrastructure

[recruiting preamble text here]

The Infrastructure team in Elastic Engineering sits underneath the Elastic product stack and support many efforts in the company at large. Primarily we’re software developers that handle state — CI specifications, cloud resources, integrations between teams. The Elastic Stack is built on our infrastructure and we touch everything needed to get it there. We also do software consulting around the organization to put our products to use for our own business.