Skip to content

Instantly share code, notes, and snippets.

View magnetised's full-sized avatar

Garry Hill magnetised

View GitHub Profile
{
disko.devices = {
disk = {
nvme0n1 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
I0706 09:23:47.882528 8 udevprobe.go:212] device: /dev/nvme0n1, WWN: nvme.1d0f-766f6c3034356339643838623936386562393232-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 filled during udev scan
I0706 09:23:47.882572 8 udevprobe.go:216] device: /dev/nvme0n1, Serial: vol045c9d88b968eb922 filled during udev scan
I0706 09:23:47.882583 8 udevprobe.go:220] device: /dev/nvme0n1, PartitionTableUUID: d209c89e-ea5e-4fbd-b161-b461cce297e0 filled during udev scan
I0706 09:23:47.883008 8 udevprobe.go:245] Dependents of /dev/nvme0n1 : {Parent: Partitions:[/dev/nvme0n1p1 /dev/nvme0n1p2] Holders:[] Slaves:[]}
I0706 09:23:47.883121 8 udevprobe.go:255] Device: /dev/nvme0n1 is of type: disk
I0706 09:23:47.883328 8 udevprobe.go:212] device: /dev/nvme0n1p1, WWN: nvme.1d0f-766f6c3034356339643838623936386562393232-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 filled during udev scan
I0706 09:23:47.883390 8 udevprobe.go:216] device: /dev/nvme0n1p1, Serial: vol045c
@magnetised
magnetised / .envrc
Created December 20, 2019 10:29 — forked from ejpcmac/.envrc
.envrc for persistent cached Nix shells
####################################
# Environment setup for Nix shells #
####################################
# From https://github.com/direnv/direnv/wiki/Nix#persistent-cached-shell
#
# Usage: use_nix [...]
#
# Load environment variables from `nix-shell`.
# If you have a `default.nix` or `shell.nix` one of these will be used and
git branch -m <new-name>
@magnetised
magnetised / nginx.rb
Last active December 18, 2015 23:09 — forked from mranallo/nginx.rb
require 'formula'
class Nginx < Formula
homepage 'http://nginx.org/'
url 'http://nginx.org/download/nginx-1.2.3.tar.gz'
sha1 '98059ae08ebbfaaead868128f7b66ebce16be9af'
devel do
url 'http://nginx.org/download/nginx-1.3.5.tar.gz'
sha1 'ce0245295f23a54f10d916eb6b7b34469d0618a1'
rvm --trace install jruby 2>&1
+__rvm_parse_args:669> [[ -n 4.3.11 ]]
+__rvm_parse_args:704> [[ -z install ]]
+__rvm_parse_args:707> [[ error == install || 0 -eq 1 || -n '' ]]
+__rvm_parse_args:16> [[ -n install ]]
+__rvm_parse_args:18> rvm_token=install
+__rvm_parse_args:20> (( 1 > 0 ))
+__rvm_parse_args:22> next_token=jruby
+__rvm_parse_args:23> shift
+__rvm_parse_args:28> case install ([[:alnum:]]*|@*)
$ rvm --trace install jruby 2>&1
+__rvm_parse_args:669> [[ -n 4.3.11 ]]
+__rvm_parse_args:704> [[ -z '' && -n '' ]]
+__rvm_parse_args:707> [[ error == || 0 -eq 1 || -n '' ]]
+__rvm_parse_args:16> [[ -n install ]]
+__rvm_parse_args:18> rvm_token=install
+__rvm_parse_args:20> (( 1 > 0 ))
+__rvm_parse_args:22> next_token=jruby
+__rvm_parse_args:23> shift
+__rvm_parse_args:28> case install ([[:alnum:]]*|@*)
@magnetised
magnetised / outputs.rb
Created January 23, 2013 13:53
An example of a content type with multiple outputs
class IntegratedPage < Page
# Define multiple outputs for this page. Each one will be accessible by adding
# the relevant extension to the page's URL. e.g.
# /my-page => HTML
# /my-page.xml => XML
# /my-page.rss => RSS
outputs :html, :rss, :json, :xml
# If the output specified doesn't map to the extension of a a known MIME type
# then you can define the format manually.
@magnetised
magnetised / image_field.rb
Created January 22, 2013 10:57
Example of defining image output sizes
class Photo < Piece
field :image do
# Define a list of outputs that will be generated for each image
size :large do
# Here you have access to a minimagick context which can be used to
# apply any ImageMagick process to your uploaded image.
# https://github.com/minimagick/minimagick
fit 640, 360
end