Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Peter J. Jones pjones

🏠
Working from home
View GitHub Profile
View lulzbot.md

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

View timed.js
// 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;
View fizzbuzz.hs
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
View rspamd.nix
# rspamd configuration:
{ config
, lib
, pkgs
, ...
}:
with lib;
let
View ivy-conf.el
(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)
View opening.md

[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.

View Person.hs
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Person where
View equifax.md

Equifax Data Breach

Computer security is a "hobby" of mine so I want to make sure the people I care about understand the gravity of the Equifax data breach and how to respond.

What you should know

Back in July, criminals broke into Equifax's computers and stole information on at least 143 million Americans (the U.S. population is

@pjones
pjones / autosshfs.nix
Created Mar 28, 2017
autofs + sshfs NixOS module.
View autosshfs.nix
# Configure autofs for mounting sshfs mounts as a specific user.
#
# Heavily inspired by https://github.com/hellekin/autosshfs
{ config, pkgs, lib, ...}: with lib;
let
cfg = config.pjones.services.autosshfs;
mkdir = "${pkgs.coreutils}/bin/mkdir";
##############################################################################
View gist:31a2da98113b7702fc444a6327565ce3
services.compton = {
enable = true;
package = pkgs.compton-git;
fade = true;
fadeDelta = 5;
activeOpacity = "1.0";
inactiveOpacity = "0.92";
menuOpacity = "1.0";
shadow = false;
extraOptions = ''