Posts for: #cli

WP-Cli Tips and tricks

Install wp-cli curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar php wp-cli.phar --info chmod +x wp-cli.phar mv wp-cli.phar /usr/local/bin/wp Install new wordpress domain using wp-cli Make sure directory has permisisons for web user cd "WEB_DIRECTORY" sudo -u www-data wp core download sudo -u www-data wp config create --dbname=DATABASE_NAME --dbuser=DATABASE_USER --dbpass=DATABASE_PASSWORD --dbhost=DATABASE_HOST sudo -u www-data wp core install --url=URL_INCLUDING_HTTPS --title=SITE_TITLE --admin_user=ADMIN_USERNAME --admin_password=ADMIN_PASSWORD --admin_email=ADMIN_EMAIL --skip-email sudo -u www-data wp plugin delete 'hello' sudo -u www-data wp plugin delete 'akismet'
MORE →

How to create keystrokes on Debian

This is very useful when working with VPSes where you can’t paste into the VNC connection (maybe I’m doing something wrong and you can?). Below is a quick piece of code I use. This should be ran as the user and not root. This sleeps for 5 seconds so you can navigate to where you need. sleep 5s; xdotool type CODE_TO_TYPE_HERE This is very easy and simple, but since I just switched to Debian full time from Windows it was a nice/easy way.
MORE →

Fix battery drain while sleeping with laptop

I recnetly decided to switch to Debian full time for my personal laptop (Lenovo Thinkpad X1 Yoga Gen 3), after using it for a week or so I noticed that when I closed the lid it would die after less than a day. After some googleing I found the answer and they are below. I also noticed that the machine never seemed to wake up like it did on Windows (just open it and it should come alive), after switching over to deep_sleep it fixed that issue.
MORE →

Setup Unifi Controller on Debian10 /Buster

The script to do this for you can be found HERE If you want to run in a single line (not always a great idea if you don’t trust the source. Hopefully you trust me :-) curl -s https://leffler.tech/scripts/unifi-buster.sh | bash Manually below Link to original persons blog post The requirements of the Unifi Controller do not allow a direct installation. But with a few manual steps a successful setup is possible!
MORE →

Cisco Cheat Sheet

Enter enable mode: en Enter Global Config (use this mode for 99% of the configuration, must be in enable mode): conf t Set port back to default default int G0/4 Encrypts all passwords on the device: service password-encryption Configure enable password (or secret in this case): enable secret ________ Create user with highest privilege: username _____ priv 15 password ______ Generate RSA key for SSH (needed if you plan to use SSH):
MORE →

Comments: