{{ message }}

Instantly share code, notes, and snippets.

# O-I

Last active Sep 23, 2021
Clojure beginner resources
View clojure-beginner.md

### Introductory resources

Last active Sep 22, 2021
Hardening SSH with 2fa
View attributes.rb
 default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
Last active Apr 8, 2020
View clifford.md

A quadratic space is a real vector space V with a quadratic form Q(x), e.g. V = R^n with Q as the squared length. The Clifford algebra Cl(V) of a quadratic space is the associative algebra that contains V and satisfies x^2 = Q(x) for all x in V. We're imposing by fiat that the square of a vector should be the quadratic form's value and seeing where it takes us. Treat x^2 = Q(x) as a symbolic rewriting rule that lets you replace x^2 or x x with Q(x) and vice versa whenever x is a vector. Beyond that Cl(V) satisfies the standard axioms of an algebra: it lets you multiply by scalars, it's associative and distributive, but not necessarily commutative.

Remarkably, this is all you need to derive everything about Clifford algebras.

Let me show you how easy it is to bootstrap the theory from nothing.

We know Cl(V) contains a copy of V. Since x^2 = Q(x) for all x, it must also contain a copy of some nonnegative reals.

Last active Sep 21, 2021
Install mysql2 on MacOS Mojave
View mysql2-mojave.md

For MacOS Catalina, visit Install mysql2 on MacOS Catalina

# Problem

Installing `mysql2` gem errors on MacOS Mojave.

# Solution

Make sure `openssl` is installed on Mac via Homebrew.

Last active Oct 3, 2020
Proper .bowerrc file pointing to new Bower registry (if using legacy Bower version)
View .bowerrc
 { "registry": "https://registry.bower.io" }
Last active Sep 25, 2020
View Subscriptions .md

# Subscriptions

• Learn how to set up basic subscriptions
• Create composable service objects

So far in this book we've talked about how to sell products once. A customer selects a product, puts their information in, and hits the "buy now" button, and that's end of our interaction with them.

Last active Aug 28, 2021
How to recover lost Python source code if it's still resident in-memory
View recover_source_code.md

# How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

## Install GDB (needed by pyrasite)

``````apt-get update && apt-get install gdb
``````
Created Oct 14, 2016
Running into RVM and readline issues
View Rails C error.
Last active Sep 20, 2018
Are you losing sleep() over intermittent Capybara test failures? You should!
If your developent environment is significantly different than the CI environment, the barriers to effectively troubleshooting the problem may be too high. What I've seen a lot of developers do is just "punt" and insert a `sleep(2)` in their tests to increase the probabilty that the other processes finish first. And then write the test assumi