Skip to content

Instantly share code, notes, and snippets.

@chbrown
chbrown / the-dog-bit-a-girl.xml
Last active August 29, 2015 14:16
TreeForm output
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<sentence defaultfontsize="10" file="/Users/chbrown/github/tree-js/tmp/the-dog-bit-a-girl.xml" lefttranslate="20" linelength="10" mintextwidth="30" name="the-dog-bit-a-girl.xml" toptranslate="20" type="TreeForm">
<syntacticstructure lineblue="0" linegreen="0" linered="0" string="13165790" syntacticlevel="HEAD">
<text text="S ">
<N0 backgroundblue="255" backgroundgreen="255" backgroundred="255" font="Dialog" foregroundblue="0" foregroundgreen="0" foregroundred="0" size="10" strikethrough="false" style="0" subscript="normal" underline="false"/>
<N1 font="Dialog" size="10" style="0" subscript="normal"/>
</text>
<syntacticfeaturesets/>
<syntacticassociations/>
<starttraces/>
@chbrown
chbrown / Instructions.md
Created June 25, 2015 02:46
Installing TypeScript-Sublime-Plugin at 0.1.4
  1. First, uninstall the PackageControl-installed version: Command+Shift+P -> Remove -> Typescript

  2. In your terminal: cd "$HOME/Library/Application Support/Sublime Text 3/Packages/"

  3. In that directory: git clone https://github.com/Microsoft/TypeScript-Sublime-Plugin.git TypeScript

    This is pretty much the source-install process from the plugin's readme, except without --depth 1, which pulls only the latest revision.

  4. Go into the repository: cd TypeScript

  5. And checkout the latest good version: git checkout 0.1.4

  6. Quit Sublime Text and restart

@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.
@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 / 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 / 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 / _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 / 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 / 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 / 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