Skip to content

Instantly share code, notes, and snippets.

View djs55's full-sized avatar

David Scott djs55

View GitHub Profile
@djs55
djs55 / gist:1b2f46bd1e09fbb61e80d44ae39b6af3
Created October 4, 2021 06:55
Example `com.docker.diagnose check` output when virtualization is disabled
```
PS C:\Users\dave\github.com\djs55\pinata\common\cmd\com.docker.diagnose>
PS C:\Users\dave\github.com\djs55\pinata\common\cmd\com.docker.diagnose> .\com.docker.diagnose.exe check
[277:07:52.926][I] ipc.NewClient: 0ef83901-com.docker.diagnose -> \\.\pipe\dockerBackendV2 com.docker.service.exe
[goroutine 1 [running, locked to thread]:
[win/backend/pkg/service.NewClientForPath(...)
[ win/backend/pkg/service/service.go:26
[win/backend/pkg/service.NewClient(...)
[ win/backend/pkg/service/service.go:20
[common/pkg/diagkit/gather/diagnose.init()
@djs55
djs55 / hyperkit-cpu.go
Created November 30, 2020 13:35
Measure hyperkit host CPU load
package main
import (
"fmt"
"os/exec"
"strconv"
"strings"
"time"
)
@djs55
djs55 / docker-desktop-mac-cpu-investigation-snapshots.md
Created July 3, 2020 08:58
Development builds of Docker Desktop for investigating the Mac CPU issue

This is a list of Docker Desktop for Mac development builds which contain prototypes useful for investigating the Mac CPU issue: docker/roadmap#12 These are based on Edge, but may contain unexpected bugs. They should be used for testing only rather than for production work.

2020-07-02: development snapshot: https://desktop-stage.docker.com/mac/edge/46421/Docker.dmg

  • Contains code to limit the size of the filesystem event queue. This is worth trying if you routinely see com.docker.hyperkit and com.docker.osxfs use a lot of CPU. See docker/roadmap#12 (comment)
@djs55
djs55 / docker-desktop-mutagen-builds.md
Last active July 25, 2020 13:30
Development builds containing the Docker Desktop + Mutagen integration

This is a list of Docker Desktop for Mac development builds which contain mutagen. These are based on Edge, but may contain unexpected bugs. They should be used for testing the Mutagen feature rather than for production work.

2020-07-14: development snapshot: https://desktop-stage.docker.com/mac/edge/46638/Docker.dmg

  • Exclude files from a mutagen sync based on the .dockerignore file.
  • Flush around docker exec as well as docker run for more reliable scripting.
  • Fix a bug which could result in duplicates in the list of synchronised directories.
  • Allow the sync to be bypassed by using :consistent or :cached. In particular this means if you want the previous :delegated behaviour before mutagen, switch to :cached. This
@djs55
djs55 / log-from-test-program.txt
Created December 2, 2019 21:04
Log from a test program
Building webapp
Step 1/4 : FROM alpine
---> 965ea09ff2eb
Step 2/4 : COPY entrypoint.sh /
---> Using cache
---> ab66ccdb8818
Step 3/4 : RUN chmod +x /entrypoint.sh
---> Using cache
---> 2013b08c40dc
Step 4/4 : ENTRYPOINT [ "/entrypoint.sh" ]
@djs55
djs55 / opam.rb
Last active April 27, 2020 15:36
A patched opam 1.2 bottle for homebrew on macOS
class Opam < Formula
desc "Package manager for OCaml"
homepage "https://opam.ocaml.org"
url "https://github.com/ocaml/opam/archive/1.2.2.tar.gz"
sha256 "3e4a05df6ff8deecba019d885ebe902eb933acb6e2fc7784ffee1ee14871e36a"
revision 4
head "https://github.com/ocaml/opam.git"
bottle do
cellar :any_skip_relocation

Keybase proof

I hereby claim:

  • I am djs55 on github.
  • I am djs55 (https://keybase.io/djs55) on keybase.
  • I have a public key ASBCxTheZf3EORRJuwMaIz672pa_-mW6QU__CTOmcDVGywo

To claim this, I am signing this object:

@djs55
djs55 / gist:e8d6faa72fe5ab66b920
Created June 26, 2015 10:30
local-allocator-interface.c
/* some opaque handle */
struct allocator;
/* Allocate and return an allocator. Non-blocking. Won't communicate
on the rings */
struct allocator *alloc();
/* Read the config file; Examine the block device (to discover sector
size); Suspend and resume the ring to synchronise and discover the
@djs55
djs55 / xenvmd-ring-protocol.md
Last active August 29, 2015 14:19
xenvmd ring protocol

Notes:

  • LVM operates in "segments" which are typically (but not always) 4MiB
  • device mapper operates in sectors which are either 512 or 4096
  • the system should operate in terms of segments (being bigger) and the local allocator can translate down to sectors when needed
  • the types below haven't been optimised: in particular there's overlap between the structure of the dm types and the LVM types.
  • suspend/ resume signalling is missing
  • we should allow the ring to be poisoned, just in case someone reads a ring which has been deallocated
@djs55
djs55 / gist:10734804
Created April 15, 2014 13:55
keybase.md
### Keybase proof
I hereby claim:
* I am djs55 on github.
* I am djs55 (https://keybase.io/djs55) on keybase.
* I have a public key whose fingerprint is 5F7C 5F2A 9DCD 726B D8DA E4E5 52E9 2ADE CC07 713F
To claim this, I am signing this object: