Skip to content

Instantly share code, notes, and snippets.

@yogthos
yogthos / clojure-beginner.md
Last active Aug 12, 2022
Clojure beginner resources
View clojure-beginner.md

Introductory resources

@charlesroper
charlesroper / gist:f2da6152d6789fa6f25e9d194a42b889
Last active Aug 14, 2022
How to setup a practically free CDN
View gist:f2da6152d6789fa6f25e9d194a42b889

How to setup a practically free CDN

I've been using [Backblaze][bbz] for a while now as my online backup service. I have used a few others in the past. None were particularly satisfactory until Backblaze came along.

It was - still is - keenly priced at a flat $5 (£4) per month for unlimited backup (I've currently got just under half a terabyte backed-up). It has a fast, reliable client. The company itself is [transparent about their operations][trans] and [generous with their knowledge sharing][blog]. To me, this says they understand their customers well. I've never had reliability problems and everything about the outfit exudes a sense of simple, quick, solid quality. The service has even saved the day on a couple of occasions where I've lost files.

Safe to say, I'm a happy customer. If you're not already using Backblaze, [I highly recommend you do][recommend].

Taking on the big boys with B2

@lizthegrey
lizthegrey / attributes.rb
Last active Aug 14, 2022
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'
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.

@axw
axw / docker-compose.yml
Last active Jul 7, 2022
Docker Compose with Elastic Stack and APM Server 6.5.0
View docker-compose.yml
version: "2.1"
services:
apm-server:
image: docker.elastic.co/apm/apm-server:${STACK_VERSION:-6.5.0}
ports:
- "127.0.0.1:${APM_SERVER_PORT:-8200}:8200"
- "127.0.0.1:${APM_SERVER_MONITOR_PORT:-6060}:6060"
command: >
apm-server -e
-E apm-server.rum.enabled=true
@fernandoaleman
fernandoaleman / mysql2-mojave.md
Last active Jun 18, 2022
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.

@emilio2hd
emilio2hd / README.md
Last active Jul 7, 2022
Docker + Elasticsearch + Logstash + Kibana
View README.md

Configuring Elasticsearch + Logstash + Kibana using Docker

Here, there are some configs to use Elasticsearch as a Docker container and Logstash + Kibana as well.

You will see that Elasticsearch config is separated from Logstash and Kibana because I'm assuming that you want to use the ES container to other things rather than only log analyses.

Docker instalation

Go to https://docs.docker.com/install/ and open the "Docker CE" menu, choose you OS and follow their instructions.

After install, open your terminal and type:

@benoittgt
benoittgt / in_relentless_pursuit_of_rest_notes.md
Created Oct 20, 2017
"In Relentless Pursuit of Rest" from Derek Prior
View in_relentless_pursuit_of_rest_notes.md
@sheerun
sheerun / .bowerrc
Last active Jan 3, 2022
Proper .bowerrc file pointing to new Bower registry (if using legacy Bower version)
View .bowerrc
{
"registry": "https://registry.bower.io"
}
View Subscriptions .md

Subscriptions

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

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.