Skip to content

Instantly share code, notes, and snippets.

View dmjio's full-sized avatar
:octocat:
🍜

David M. Johnson dmjio

:octocat:
🍜
View GitHub Profile
# parted /dev/nvme0n1 -- mklabel gpt
# parted /dev/nvme0n1 -- mkpart primary 512MiB -8GiB
# parted /dev/nvme0n1 -- mkpart primary linux-swap -8GiB 100%
# parted /dev/nvme0n1 -- mkpart ESP fat32 1MiB 512MiB
# parted /dev/nvme0n1 -- set 3 boot on
# mkfs.ext4 -L nixos /dev/nvme0n1p1
# mkswap -L swap /dev/nvme0n1p2
# mkfs.fat -F 32 -n boot /dev/nvme0n1p3
# mount /dev/disk/by-label/nixos /mnt
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>app</string>
<key>CFBundleIdentifier</key>
<string>app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
@dmjio
dmjio / foo.h
Created February 13, 2019 02:55
int foo ();
@dmjio
dmjio / foo.h
Created February 13, 2019 02:55
int foo ();
/nix/store/b1wrwkm0bd70rwbqcxipdbb5mnx1hmnc-qemu-host-cpu-only-for-vm-tests-3.1.0/bin/qemu-system-x86_64
-enable-kvm
-cpu kvm64
-name botlab
-m 4000
-smp 2
-device virtio-rng-pci
-net nic,netdev=user.0,model=virtio
-netdev user,id=user.0
-virtfs local,path=/nix/store,security_model=none,mount_tag=store
@dmjio
dmjio / Foo.hs
Created February 12, 2019 21:28
{-# LANGUAGE ViewPatterns #-}
main = print $ foo ["hey"] ["there"]
foo :: [a] -> [b] -> [(a,b)]
foo (zip -> xs) = xs
Found:
t = \ a -> (findIndex ((==) a)) ==> (elemIndex a)
Perhaps:
t a = (findIndex ((==) a)) ==> (elemIndex a)
./data/HLint_QuickCheck.hs:119:20: Suggestion: Redundant bracket
Found:
(findIndex ((==) a)) ==> (elemIndex a)
Perhaps:
findIndex ((==) a) ==> (elemIndex a)
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];

Keybase proof

I hereby claim:

  • I am dmjio on github.
  • I am dmjio (https://keybase.io/dmjio) on keybase.
  • I have a public key ASCmDav0eJNeEi3YUm1n6_8zBjElqTJN1KSOO_aYZkYrMQo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am dmjio on github.
* I am dmjio (https://keybase.io/dmjio) on keybase.
* I have a public key ASCmDav0eJNeEi3YUm1n6_8zBjElqTJN1KSOO_aYZkYrMQo
To claim this, I am signing this object: