Skip to content

Instantly share code, notes, and snippets.

View BR0kEN-'s full-sized avatar
⌨️
Coding... A lot.

Sergii Bondarenko BR0kEN-

⌨️
Coding... A lot.
View GitHub Profile
@BR0kEN-
BR0kEN- / guzzle_gzip_unpack.php
Created March 3, 2021 12:13
Guzzle unarchive Gzip on the fly (without storing an archive on disk)
<?php
// Requirements:
// - ext-zlib
// - guzzlehttp/guzzle
declare(strict_types=1);
use GuzzleHttp\Client;
use GuzzleHttp\RequestOptions;
@BR0kEN-
BR0kEN- / README.md
Created February 19, 2022 00:37
macOS: Enable Touch ID in CLI after reboot

Many of those who have enabled Touch ID for Terminal/iTerm found out that the /etc/pam.d/sudo is reverted to its original state after reboot.

Setting the permission to edit the file, adding a necessary line, and reverting the permission back are all trivial operations that can be automated.

If you are a bash user, add these lines to your .bash_profile:

ensure_touch_id() {
    local AUTH_FILE_PATH="/etc/pam.d/sudo"
    local AUTH_FILE_LINES=()