Skip to content

Instantly share code, notes, and snippets.

View matharden's full-sized avatar

Mat Harden matharden

View GitHub Profile
@matharden
matharden / richText2HTMLExample.js
Created August 13, 2021 17:07 — forked from mvogelgesang/richText2HTMLExample.js
Converts Google AppScript RichTextValue to HTML encoded strings.
/**
* 2019 @mvogelgesang
* This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/*************
* colors.js *
*************
*
* You're almost at the exit. You just need to get past this
* color lock.
*
* Changing your environment is no longer enough. You must
* learn to change yourself. I've sent you a little something
* that should help with that.
/****************
* drones101.js *
****************
*
* Do you remember, my dear Professor, a certain introductory
* computational rationality class you taught long ago? Assignment
* #2, behavior functions of autonomous agents? I remember that one
* fondly - but attack drones are so much easier to reason about
* when they're not staring you in the face, I would imagine!
@matharden
matharden / presenting-checklist.md
Last active July 16, 2020 10:16
Checklist for when about to present to people

Presenting Checklist (Mac OS)

  • Turn off notifications (ALT+click Notification Center)
  • Turn off Bluetooth (in case someone sits on your Bluetooth keyboard/mouse, unless you're using Bluetooth of course)
  • Turn off f.lux (can catch you out when using projectors)
  • Prevent your computer from sleeping. Run Caffeine (or use settings to not let your computer sleep)
  • Always run slides in presentation mode
@matharden
matharden / email-charter.md
Last active June 12, 2018 13:11
Email charter

10 Rules to Reverse the Email Spiral

  1. Respect Recipients' Time - This is the fundamental rule. As the message sender, the onus is on YOU to minimize the time your email will take to process. Even if it means taking more time at your end before sending.

  2. Short or Slow is not Rude - Let's mutually agree to cut each other some slack. Given the email load we're all facing, it's OK if replies take a while coming and if they don't give detailed responses to all your questions. No one wants to come over as brusque, so please don't take it personally. We just want our lives back!

  3. Celebrate Clarity - Start with a subject line that clearly labels the topic, and maybe includes a status category [Info], [Action], [Time Sens] [Low Priority]. Use crisp, muddle-free sentences. If the email has to be longer than five sentences, make sure the first provides the basic reason for writing. Avoid strange fonts and colors.

@matharden
matharden / keybase.md
Created June 8, 2015 17:18
keybase.md

Keybase proof

I hereby claim:

  • I am matharden on github.
  • I am matharden (https://keybase.io/matharden) on keybase.
  • I have a public key whose fingerprint is E158 1408 E5A2 744C 8436 6B5D 39C6 3C94 4609 364E

To claim this, I am signing this object:

@matharden
matharden / progress.html
Last active August 29, 2015 14:15
MOJ progress bar
<ol class="progress">
<li class="progress--completed">
<div class="progress__step">
<span class="progress__label">Prisoner details</span>
</div>
</li>
<li class="progress--completed">
<div class="progress__step">
<span class="progress__label">Visitor details</span>
</div>
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@matharden
matharden / gist:5709910
Created June 4, 2013 21:49
Quick Terminal command to back-up Heroku PostgreSQL database with today's date.
cd ~/Apps/app-name
heroku pgbackups:capture
curl -o $(date "+backup-%Y-%m-%d.dump") `heroku pgbackups:url`