Prepare (Ubuntu 22.04 Live):
sudo su
apt install pv
Dump disk (or partition) to local file
zstd --fast < /dev/nvme0n1 | pv > laptop.img.zst
Dump disk (or partition) to compressed image over network (NAS)
| module VAT | |
| RATES = { | |
| "AT" => 20.0, | |
| "BE" => 21.0, | |
| "BG" => 20.0, | |
| "CY" => 19.0, | |
| "CZ" => 21.0, | |
| "DE" => 19.0, | |
| "DK" => 25.0, | |
| "EE" => 20.0, |
| # Examples: | |
| # | |
| # expect { code }.to change { finds("users") }.by(3) | |
| # expect { code }.to change { updates("contents") }.by(1) | |
| # expect { code }.not_to change { inserts } | |
| # | |
| # MongoSpy.flush | |
| # ..code.. | |
| # expect(MongoSpy.queries).to match( | |
| # "find" => { "users" => 1, "contents" => 1 }, |
Prepare (Ubuntu 22.04 Live):
sudo su
apt install pv
Dump disk (or partition) to local file
zstd --fast < /dev/nvme0n1 | pv > laptop.img.zst
Dump disk (or partition) to compressed image over network (NAS)
| <?php | |
| class RestRequest | |
| { | |
| protected $url; | |
| protected $verb; | |
| protected $requestBody; | |
| protected $requestLength; | |
| protected $apiKey; | |
| protected $username; |
Example with wget:
wget --no-parent -rpk --wait=1 --random-wait --adjust-extension --convert-links https://wbsite.com/page
--no-parent prevents going up in the URLs
--wait=1 --random-wait slows down request and add jitter to go easy on the server
--adjust-extension --convert-links fixes links containing parameters to work with simple files
If it needs a connected session:
| #!/usr/bin/env ruby | |
| # frozen_string_literal: true | |
| # | |
| # Benchmark: checking whether a single serial is revoked in a CRL. | |
| # A) OpenSSL::X509::CRL#revoked.find { ... } (only API available today) | |
| # B) X509_CRL_get0_by_serial() (proposed, via Fiddle) | |
| # | |
| # Each approach runs in its own forked process so the reported peak RSS reflects | |
| # only that approach. Requires MRI on Linux (uses fork + /proc; falls back to | |
| # Process.getrusage on macOS/BSD). |