Skip to content

Instantly share code, notes, and snippets.

@chbrown
chbrown / main.clj
Created November 13, 2017 22:31
tools.trace-example
(ns main)
(defonce ^:private counter (atom 0))
(defn- interleave-with-reversed [s]
(interleave s (reverse s)))
(defn frobnicate [user]
(apply str (interleave-with-reversed user)))

Keybase proof

I hereby claim:

  • I am chbrown on github.
  • I am chbrown (https://keybase.io/chbrown) on keybase.
  • I have a public key ASDCAV-8Fgynhe6xekE4n1VpfYrVfJF-qdCzpPm9eNCiJgo

To claim this, I am signing this object:

@chbrown
chbrown / example.md
Created August 31, 2016 23:20
Proper GFM nested lists

Break.

  • Root level
    • Second level
      • Third level
    • Back to second level

Break again.

  1. Root level
@chbrown
chbrown / vehiclepositions.pb
Created May 20, 2016 15:06
CapMetro Vehicle Positions PB File - Socrata API - Firewall Failure
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>Barracuda Web Filter</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body content-type="text/plain; charset=UTF-8">
<span id="redir_msg" style="display: none"><p>Redirecting you to Barracuda Web Filter.</p></span><script x-barracuda="1" language="JavaScript">
@chbrown
chbrown / 1k_array.json
Last active April 29, 2016 17:08
Long array with random data generated by json-generator.com
This file has been truncated, but you can view the full file.
[
{
"_id": "5722e433413a839e80088639",
"index": 0,
"guid": "db33a728-66a3-481f-a71c-9f3ddbdfd4d5",
"isActive": false,
"balance": "$2,185.98",
"picture": "http://placehold.it/32x32",
"age": 25,
"eyeColor": "green",
@chbrown
chbrown / _upgrade-pg9.4-to-pg9.5.md
Last active October 7, 2021 13:57
Upgrade PostgreSQL 9.4 to 9.5 on Mac OS X with Homebrew

First, check your current config (example output in homebrew.mxcl.postgresql.plist.xml lower down in this gist):

cat ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

Most importantly, note the -D /usr/local/var/postgres argument.

Second, shut down your current PostgreSQL.

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
@chbrown
chbrown / email.html
Created November 24, 2015 04:28
FastMail newsletter (November 2015)
<html>
<head>
<title>New FastMail features and other news</title>
<style>
body { font: 15px/1.35 "Helvetica Neue", Arial, sans-serif; }
p { margin: 15px 0; }
ul { margin: 15px 30px; }
li { margin: 5px 0; }
a { color: #4b1923; }
#border { background: #44557e; padding: 0 15px 15px; border-radius: 4px; }
@chbrown
chbrown / 1-initial-request.md
Last active November 18, 2015 21:13
FastMail compose support request

I prefer web interfaces rather than desktop clients when possible, i.e., when the web interface is at least almost as good as the desktop client, so I use the FastMail web app almost exclusively. For the most part, it's great. I would prefer not to be reprimanded for pinning ancient emails every time I look at my Archive, but whatever.

But let's talk about Compose.

Let's say I'm writing a rich text email, and I want to create a numbered list. I click the numbered list icon in the toolbar, and get a 1. I write something, newline, 2. Great. Write some more stuff. Now I want to start a sublist. Tab! Awesome. I add a few more sublist items. Now I want to dedent and add an item to the root list. Shift+tab! Wait, nope, that focuses the subject field. WTF? OK, scan the toolbar... nope, nothing there. Well, the ⏵¶ and ⏴¶ buttons look promising, but mouseover indicates they're for left-to-right / right-to-left text direction settings (how many people actually change text direction in an email?). Okay, hmm. Hack time

@chbrown
chbrown / syslog-snippet.log
Created November 1, 2015 19:19
Bluetooth connection flakiness
2015-11-01 12:26:25.000 PM kernel[0]: **** [IOBluetoothHostControllerUSBTransport][InterruptReadHandler] -- Received kIOReturnNotResponding error - no more retries
2015-11-01 12:26:25.000 PM kernel[0]: **** [IOBluetoothHostControllerUSBTransport][DoDeviceReset] -- thread_call_enter1 (mReEnumerateOrResetThread) -- reEnumerateOrReset = 1 (ReEnumerate Module) -- returned FALSE -- 0xd000 ****
2015-11-01 12:26:25.000 PM kernel[0]: **** [IOBluetoothHostControllerUSBTransport][ReEnumerateOrResetThreadEntry] -- entering -- param0 = 0xd000, param1 = 0x0001 -- 0xd000
2015-11-01 12:26:25.000 PM kernel[0]: **** [IOBluetoothHostControllerUSBTransport][ReEnumerateOrReset] -- entering -- reEnumerateOrResetIn = 1 (ReEnumerate Module) -- this = 0xd000 ****
2015-11-01 12:26:25.000 PM kernel[0]: **** [IOBluetoothHostControllerUSBTransport][ReEnumerateOrReset] -- in our workloop -- 0xd000 ****
2015-11-01 12:26:25.000 PM kernel[0]: **** [IOBluetoothHostControllerUSBTransport][ReEnumerateOrReset] -- parameter is valid -- 0xd000
@chbrown
chbrown / ICANN.md
Created June 26, 2015 00:09
ICANN campaign

Call ICANN in Los Angeles at +1 (310) 301 5800

They must not have a lot of staff or usually get a lot of calls, though, because all I got was a busy signal.

But if you get through to them, tell them (this is the verbiage from NameCheap):

Regarding the proposed rules governing companies that provide WHOIS privacy services (as set forth in the Privacy and Policy Services Accreditation Issues Policy document):

I urge you to respect internet users' rights to privacy and due process.

  • Everyone deserves the right to privacy.