Skip to content

Instantly share code, notes, and snippets.

View pjones's full-sized avatar
🏠
Working from home

Peter J. Jones pjones

🏠
Working from home
View GitHub Profile
@pjones
pjones / flake.nix
Created August 26, 2024 15:30
How to use an overlay in a flake to mix stable and unstable.
{
description = "Packages from stable and unstable";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = inputs@{ self, nixpkgs, ... }:
let
@pjones
pjones / fips.nix
Created July 26, 2024 18:59
Build OpenSSL with FIPS support.
{ openssl
}:
openssl.overrideAttrs (orig: {
# Compile the FIPS module:
configureFlags = orig.configureFlags ++ [
"enable-ec_nistp_64_gcc_128"
"enable-fips"
];
@pjones
pjones / gpg.conf
Created February 24, 2024 03:02
gpg config
cert-digest-algo SHA512
charset utf-8
default-key 204284CB
default-preference-list SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed
default-recipient-self
fixed-list-mode
keyid-format 0xlong
list-options show-uid-validity
no-comments
no-emit-version

Lulzbot Mini

Thank you for purchasing this Lulzbot Mini.

I wrote this document to help get you started with your new 3D printer. With some patience you'll be up and printing all sorts of things soon. And with some simple maintenance your printer should last many years to come.

Tips for Your First Print

// The following function is a combinator. It takes a function as an
// argument, and returns a function.
function timed(subject) {
return function(...args) {
const start = Date.now();
const result = subject.apply(null, args);
const end = Date.now();
console.log("timed function took: " + (end - start) + "ms");
return result;
module Main(main) where
fizzbuzz :: [String]
fizzbuzz = map go [1..100]
where
n % d = n `mod` d == 0
go n | n % 3 && n % 5 = "fizzbuz"
| n % 3 = "fizz"
| n % 5 = "buzz"
| otherwise = show n
# rspamd configuration:
{ config
, lib
, pkgs
, ...
}:
with lib;
let
(defun pjones:ivy-ignore-buffers (buffer)
"Ignore BUFFER if it is already displayed in a window."
(get-buffer-window buffer t))
(add-to-list 'ivy-ignore-buffers #'pjones:ivy-ignore-buffers)

[Printed Mint][pm] is looking for a junior Ruby developer to join our small development team. This is a full-time position with benefits.

We currently have two Ruby on Rails applications in production and a long list of features that need to be implemented.

Did I mention that we're a small team? You'll be working directly with our CTO, Peter J. Jones (author of [Effective Ruby][effrb]) in a positive and inclusive environment.

{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Person where