Skip to content

Instantly share code, notes, and snippets.

@adam-james-v
adam-james-v / literate-clojure-emacs-config.org
Created April 4, 2021 04:45
A minimum-viable emacs config. for literate programming with Clojure.

Emacs Config

;;

This is a ‘minimum viable config’ built for the purpose of literate programming with Clojure / Clojurescript. It uses MELPA to download and install a few packages that I consider necessary for a good Clojure dev. experience, though that’s of course only my opinion. I use CIDER, a robust and popular REPL tool. It could arguably be substituted for inf-clojure, but I haven’t tried that myself.

This config does assume that you already have emacs installed and that you have at least a cursory understanding of how to navigate and use it. Or, at the very least know a few keywords to search as you try learn things. Emacs can be a daunting tool (I don’t even know most of it myself yet, honestly), but you can do the most critical things without too much difficulty and a bit of patience.

@jkatz
jkatz / encrypt_password.py
Last active March 26, 2024 16:37
Methods to create password verifiers for PostgreSQL
# Copyright 2019-2022 Jonathan S. Katz
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@achesco
achesco / generate-pg-ssl.md
Last active February 26, 2024 06:31
Generate self-signed SSL certificates for PostgreSQL server and client

CNs are important!!! -days 3650

Create a Certificate Signing Request (CN=localhost)

umask u=rw,go= && openssl req -days 3650 -new -text -nodes -subj '/C=US/ST=Massachusetts/L=Bedford/O=Personal/OU=Personal/emailAddress=example@example.com/CN=localhost' -keyout server.key -out server.csr

Generate self-signed certificate

umask u=rw,go= && openssl req -days 3650 -x509 -text -in server.csr -key server.key -out server.crt

LaTeX: preventing text from overflowing into margins

There are multiple approaches one could take.

Explicit breaks inside \texttt{}

@simonewebdesign
simonewebdesign / install-quake3.sh
Last active November 14, 2023 19:25
Install Quake 3: Arena on a mac
#!/bin/bash
# Install Quake 3: Arena on a mac
# Copyright (c) 2016 simonewebdesign
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@subfuzion
subfuzion / github-wiki-how-to.md
Last active April 20, 2024 09:22
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@coussej
coussej / bench.sql
Last active November 20, 2021 06:12
-- clean up database from previous test
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
-- create EAV tables
CREATE TABLE entity (
id SERIAL PRIMARY KEY,
name TEXT,
description TEXT
);