Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
| MIT License | |
| Copyright (c) 2021 Daniel Ethridge | |
| 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 | |
| furnished to do so, subject to the following conditions: |
| the log of my life | |
| commits I wish I had not made, | |
| abandoned branches, mangled | |
| merges. I cannot revert, | |
| cannot rebase my life | |
| on other principles, | |
| squash the hard | |
| parts and leave | |
| only their results, |
Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).
docker run -it --rm --privileged --pid=host justincormack/nsenter1
more info: https://github.com/justincormack/nsenter1
| # Install dependencies | |
| # | |
| # * checkinstall: package the .deb | |
| # * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
| # * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
| apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
| mkdir -p ~/sources/ && \ | |
| # Compile against OpenSSL to enable NPN. I updated this block to get the latest 1.0.2h release. It's critical that OpenSSL be up to date. |
| #!/bin/bash | |
| # file: ttfb.sh | |
| # curl command to check the time to first byte | |
| # ** usage ** | |
| # 1. ./ttfb.sh "https://google.com" | |
| # 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com" | |
| curl -o /dev/null \ | |
| -H 'Cache-Control: no-cache' \ | |
| -s \ |
| # You will need fswatch installed (available in homebrew and friends) | |
| # The command below will run tests and wait until fswatch writes something. | |
| # The --stale flag will only run stale entries, it requires Elixir v1.3. | |
| fswatch lib/ test/ | mix test --stale --listen-on-stdin |
| #!/usr/bin/env bash | |
| set -x | |
| term_handler() { | |
| echo "Stopping the server process with PID $PID" | |
| erl -noshell -name "[email protected]" -eval "rpc:call('[email protected]', init, stop, [])" -s init stop | |
| echo "Stopped" | |
| } | |
| trap 'term_handler' TERM INT |
| package join | |
| import ( | |
| "fmt" | |
| "strings" | |
| "testing" | |
| ) | |
| var ( | |
| testData = []string{"a", "b", "c", "d", "e"} |