Skip to content

Instantly share code, notes, and snippets.

View jedevc's full-sized avatar

Justin Chadwell jedevc

View GitHub Profile

Dagger Engine profiling

  1. Start the dagger engine using the --debugaddr flag when starting the engine, e.g. --debugaddr=0.0.0.0:6060

    • The dev dagger engine started with ./hack/build starts with this by default.
  2. Capture a profile using go tool:

    $ go tool pprof -raw -output=cpuproc.txt 'http://<engine-ip>:6060/debug/pprof/profile?seconds=30'
    
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/dagger/dagger/engine/config/config",
"$ref": "#/$defs/Config",
"$defs": {
"Config": {
"properties": {
"logLevel": {
"type": "string",
"enum": [
@jedevc
jedevc / Cargo.toml
Created January 21, 2024 13:26
Pixelflut examples
[package]
name = "pixelflut-tools"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
package main
import (
"fmt"
"sync"
)
func main() {
a := make(chan int, 1)
b := make(chan int, 1)
@jedevc
jedevc / README.md
Last active April 13, 2023 15:30
Reproduction environment for containerd docker pusher
  1. Set up the bad registry:
    docker compose up
    
  2. Attempt to push an image to the bad registry:
    ctr --debug image push localhost:80/alpine:latest
    
import random
def bubbleDown(li, i, n):
assert i >= 0
assert i < n
left = 2 * i + 1
right = 2 * i + 2
if right < n:
@jedevc
jedevc / install.md
Last active January 29, 2019 15:36
Instructions for installing the logicproof package for pandoc

Installing the logicproof package

Note: this guide assumes you are using pandoc. If you are not, then the instructions will still apply, up until the last step.

Go to https://www.ctan.org/tex-archive/macros/latex/contrib/logicproof and download the package as a .zip file and extract into your working directory.

Enter the directory you just extracted and run latex logicproof.ins to generate the latexproof.sty file.

@jedevc
jedevc / editor
Created March 12, 2018 11:15
Use your favorite editor anywhere!
#!/bin/bash
###
# Quick and simple script to open an editor and use it to insert text anywhere.
# To use it, simply set up a keybinding using whatever your OS supports.
#
# Author: Justin Chadwell
# License: UNLICENSE
# Dependencies: xdotool, whatever editor you plan to use