Enabling Touch ID for Sudo in Terminal on macOS Sonoma

Overview

The process to enable Touch ID for the sudo command in the macOS Terminal app allows users to authenticate system-level changes using their fingerprint instead of typing an administrator password. This feature is particularly useful for those who frequently use the sudo command in Terminal, as it streamlines the authentication process.

Steps to Enable Touch ID

  1. Open Terminal: You can find Terminal in the Applications/Utilities folder, or by searching for it using Spotlight or Launchpad.
  2. Navigate to PAMs Directory: Enter cd /etc/pam.d into Terminal to change the working directory to where macOS stores Pluggable Authentication Modules (PAMs) information.
  3. Duplicate sudo_local.template: Use the command sudo cp sudo_local.template sudo_local to copy sudo_local.template to a new file named sudo_local. You will need to enter your administrator password to authorize this action.
  4. Edit sudo_local File: Run sudo pico sudo_local to edit the sudo_local configuration file with the Pico text editor.
  5. Modify the File: In the Pico editor, find the line that includes pam_tid.so and remove the hashtag (#) at the beginning of the line to uncomment it.
  6. Save Changes: Press Control (⌃) – X, then type Y and press the Return key to save the file and exit the editor.

Authenticating with Touch ID

Once you have completed the setup, the next time you use the sudo command in Terminal, you will be prompted with a Touch ID request. Simply rest your finger on the fingerprint sensor to authenticate the command.

Considerations

  • This method is future-proof in macOS Sonoma, meaning it will survive software updates.
  • For macOS Ventura and older, you need to re-enable Touch ID for Terminal after each software update.
  • The method was discovered by Rachel Greenham and confirmed by Dan Moren of Six Colors.

Citation Links

7 Ways to Create SaaS Ideas

In this video, Rob Walling, a serial entrepreneur and investor, shares seven ways to come up with profitable B2B SaaS ideas:

  1. Find a problem: Identify a problem that businesses need to be solved and are willing to pay for. Five ways to find such problems include scratching your own itch, finding a problem at your day job, solving a problem for a spouse/relative/colleague, having a poor customer experience, and finding a problem online.
  2. Translate an existing idea to a new niche: Take a general tool and focus it on a specific vertical, catering to the unique needs of that niche.
  3. Enter a large space with hated competitors: Target industries with large incumbents known for poor customer service and subpar products. Offer better products, pricing, and support to gain market share.
  4. Build on your network: Utilize your connections to gain early product input and access to other people’s audiences.
  5. Enter a fast-growing ecosystem: Ride the wave of a growing market by creating a product that serves that market’s needs. This approach can be risky if the market’s growth slows down.
  6. Build on an existing product you own: Leverage your existing customer base to determine what other problems you could solve for them.
  7. Look at ways you’ve spent money at your day job: Identify SaaS subscriptions you’ve paid for in the past and see if there’s an opportunity to improve upon them.

After identifying a potential SaaS idea, the next step is to validate it by ensuring it solves a problem that businesses are willing to pay for.

Go check his videos for detail:

https://www.youtube.com/watch?v=z_EMDtbB2tA

MySQL Cheatsheet for DevOps

Create User

CREATE USER 'user'@'host' IDENTIFIED WITH mysql_native_password BY 'password';

Grant Privilege Template

GRANT PRIVILEGE ON database.table TO 'user'@'host';

Grant All Privileges

GRANT ALL PRIVILEGES ON *.* TO 'user'@'host' WITH GRANT OPTION;

Full RDS admin grants:

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'admin'@'%' WITH GRANT OPTION;

Full RDS user grants:

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON *.* TO 'user'@'%';

Show Grants for User

SHOW GRANTS FOR 'user'@'host';

Drop User

DROP USER 'user'@'host';

Exit from MySQL

exit

Login

mysql -u user -h host --port=3306 -p

Backup

mysqldump -u user -h host database > database.sql -p

Restore

mysql -u user -h host database < database.sql -p

Reference:

Install Docker and Docker Compose in Ubuntu 20.04

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo usermod -aG docker ${USER}
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Cara meng-install Laravel 8 Breeze dengan Bootstrap

Akhirnya menemukan cara menginstall Laravel 8 Breeze + Bootstrap dengan elegan. Adalah menggunakan jetstrap. Jetstrap yang awalnya digunakan untuk jetstream. Oleh developernya di-extend untuk bisa swap Breeze ke Bootstrap.

Sementara (28 mei 2021) saya cek di package.json masih Bootstrap 4.6.0

install fresh laravel

curl -s https://laravel.build/project-name | bash

install breeze

composer require laravel/breeze --dev

php artisan breeze:install

install jetstrap

composer require nascent-africa/jetstrap --dev

php artisan jetstrap:swap breeze

run npm

npm install && npm run dev

run npm again if error

npm install && npm run dev

run migration

php artisan migrate

or if you are using sail

sail artisan migrate

Selamat meniqmati buossquu

Cara Delete WordPress Tables

Menghapus table WordPress salah satunya bisa dilakukan dengan cara berikut:

Pertama login ke MySQL dan jalankan perintah berikut:

SELECT concat('DROP TABLE IF EXISTS `', table_name, '`;')
FROM information_schema.tables
WHERE table_schema = 'nama-database';

Perintah di atas akan menghasilkan teks perintah berikutnya:

 DROP TABLE IF EXISTS `wp_term_relationships`;
 DROP TABLE IF EXISTS `wp_term_taxonomy`;
 DROP TABLE IF EXISTS `wp_options`;
 DROP TABLE IF EXISTS `wp_links`;
 DROP TABLE IF EXISTS `wp_termmeta`;
 DROP TABLE IF EXISTS `wp_commentmeta`;
 DROP TABLE IF EXISTS `wp_comments`;
 DROP TABLE IF EXISTS `wp_posts`;
 DROP TABLE IF EXISTS `wp_postmeta`;
 DROP TABLE IF EXISTS `wp_users`;
 DROP TABLE IF EXISTS `wp_usermeta`;
 DROP TABLE IF EXISTS `wp_terms`;

Kopas teks di atas dan jalankan lagi di MySQL console untuk menghapus table.

Jam Tujuh Sampai Rumah

Hanya sekadar pemanis.

Setelah hampir 2 minggu jeleh ndak nyepeda, akhirnya pagi ini gowes lagi. Yang pendek pendek aja. Jam tujuh sampai rumah. Ya lebih dikit gpp lah. Yang jelas ga pake mampir mampir.

Sampai rumah masih segar, pikiran masih fresh dan ga terlalu capek. Ngisis dikit ngeringin keringat dan bisa langsung nyandak gawean.

Oh iya #JTSR ini nemu di post instagram @beginu

Layak dicoba buat penyegaran sebelum bekerja.