» sudo systemctl daemon-reload
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
==============================================
Edit*
- Open
/etc/wsl.confwith any editor:
| #!/usr/bin/env bash | |
| set -e | |
| tmp=$(mktemp -d) | |
| pushd "$tmp" || exit 1 | |
| function cleanup { | |
| popd || exit 1 | |
| rm -rf "$tmp" | |
| } |
» sudo systemctl daemon-reload
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
==============================================
Edit*
/etc/wsl.conf with any editor:| /* | |
| * MIT License | |
| * | |
| * Copyright (c) 2023-2024 Fabio Lima | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
| #!/usr/bin/env python3 | |
| # | |
| # Nokia/Alcatel-Lucent router backup configuration tool | |
| # | |
| # Features: | |
| # - Unpack/repack .cfg files generated from the backup and restore functionnality | |
| # in order to modify the full router configuration | |
| # - Decrypt/encrypt the passwords/secret values present in the configuration |
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| "strconv" | |
| ) | |
| type Job struct { |
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found
/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
This gist is based on the information available at golang/dep, only slightly more terse and annotated with a few notes and links primarily for my own personal benefit. It's public in case this information is helpful to anyone else as well.
I initially advocated Glide for my team and then, more recently, vndr. I've also taken the approach of exerting direct control over what goes into vendor/ in my Dockerfiles, and also work from
isolated GOPATH environments on my system per project to ensure that dependencies are explicitly found under vendor/.
At the end of the day, vendoring (and committing vendor/) is about being in control of your dependencies and being able to achieve reproducible builds. While you can achieve this manually, things that are nice to have in a vendoring tool include:
| ## | |
| ## HTTP Router benchmarks -- August 31st, 2017 running Go 1.9.0 | |
| ## | |
| ## This benchmark suite is based on https://github.com/julienschmidt/go-http-routing-benchmark | |
| ## using the most up-to-date version of each pkg as of today. Each router has their own | |
| ## pros and cons, so consider the designs of each router to suit your application. | |
| ## | |
| [peter@pak ~/Dev/go/src/github.com/pkieltyka/go-http-routing-benchmark]$ go test -v -bench="Chi" . |
| #!/bin/bash | |
| # headset mac | |
| mac="00:1D:DF:67:0A:29" | |
| profile="a2dp" | |
| # Special Bluetooth controller | |
| btMac="" | |
| # connect|disconnect wait time | |
| waitTime=5 | |
| macId="${mac//:/_}" |
| go test -run=. -bench=. -benchtime=5s -count 5 -benchmem -cpuprofile=cpu.out -memprofile=mem.out -trace=trace.out ./package | tee bench.txt | |
| go tool pprof -http :8080 cpu.out | |
| go tool pprof -http :8081 mem.out | |
| go tool trace trace.out | |
| go tool pprof $FILENAME.test cpu.out | |
| # (pprof) list <func name> | |
| # go get -u golang.org/x/perf/cmd/benchstat | |
| benchstat bench.txt |