This is based upon the LearnLinux.tv guide and this OdinsPlasmaRifle's gist
- /dev/sda1 will be our EFI partition
- /dev/sda2 will be an encryprted LVM ext4 filesystem
This is based upon the LearnLinux.tv guide and this OdinsPlasmaRifle's gist
| package main | |
| import ( | |
| "fmt" | |
| syscall "golang.org/x/sys/unix" | |
| ) | |
| type DiskStatus struct { | |
| All uint64 `json:"all"` | |
| Used uint64 `json:"used"` |
I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.
Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.
All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.
ctrl+shift+i in firefox)streamlink hls://URL_FROM_STEP_5 best -o video1080p.ts| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "sync/atomic" | |
| ) | |
| // Fill Channel with int values | |
| func fillChan(number int) <-chan int { |
На этой странице описывается процесс настройки нагрузочного тестирования внешних ресурсов.
Для тестирования поведения сервиса под нагрузкой используется утилита Yandex Tank.
Танку можно указать патроны (HTTP-запросы, которые будут отправлены на целевой сервер) и расписание (количество запросов в секунду к целевому серверу в каждый момент времени стрельб, а также продолжительность стрельб). Также к танку можно подключить плагин мониторинга, позволяющий снимать показатели (например, количество свободной памяти или загрузку процессора) с целевого сервера.
| # WARNING: Use this at your own risk. It will probably break your other packages and cause other havoc. | |
| # These days you should just upgrade to Ubuntu 18.04. | |
| $ ssh -V | |
| OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016 | |
| wget https://launchpadlibrarian.net/277739251/openssh-client_7.3p1-1_amd64.deb | |
| wget https://launchpadlibrarian.net/298453050/libgssapi-krb5-2_1.14.3+dfsg-2ubuntu1_amd64.deb | |
| wget https://launchpadlibrarian.net/298453058/libkrb5-3_1.14.3+dfsg-2ubuntu1_amd64.deb | |
| wget https://launchpadlibrarian.net/298453060/libkrb5support0_1.14.3+dfsg-2ubuntu1_amd64.deb |
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/tls" | |
| "crypto/x509" | |
| "crypto/x509/pkix" | |
| "errors" | |
| "log" |