To see what and how many packages you have installed on your Debian system (including derivatives like Ubuntu) system there are some simple commands to use:
To list all installed packages including version and description use
dpkg -l
This should be piped to less using | less for better reading.
You may also use the following to print only the packages without version and description using
dpkg --get-selections | awk '{print $1}'
This command can easily be piped to a file for saving using > file_name
It’s also easy to count the number of installed packages using
dpkg --get-selections | wc -l
Have you ever wanted to hide a user from the login screen in Windows for various reasons? The answer may be split but the solution is simple:
- First we need to open Registry editor by running (Win+R) regedit
- Locate the key
HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon\SpecialAccounts\UserList
- Under this key create a new DWORD that matches the username exactly, and set the value to 0 (zero) to hide it
If you later want to show it just change the value from 0 to 1.
BruisedFruit (previously known as QWiki) is an ultra-lightweight PHP wiki implementation designed for people who (from time to time) need to quickly and easily setup a small, bloat-free wiki that ‘just works’.
And here are a rewrite rule to make it work on nginx:
# SEO friendly URLs for BruisedFruit
#
location /wiki/ {
if (!-e $request_filename) {
rewrite ^/wiki/search(.*)$ /wiki/search.php?search=$1 last;
rewrite ^/wiki/([^/]+)/([^/]+)/?$ /wiki/index.php?page=$1×tamp=$2 last;
rewrite ^/wiki/(.*)$ /wiki/index.php?page=$1 last;
}
}
Backup is a VERY nice thing. I’m unfortunately not the best to remember it myself and it’s been costly.. But it is also very nice to dump all tables to a file and move it to another server and restore it with a simple command (after you have created the database of course).
To back up your database use the following command:
mysqldump -u [Username] -p[password] [databasename] > [backupfile.sql]
And to restore it again use this:
mysql -u [Username] -p[password] [databasename] < [backupfile.sql]
And then it’s done! Just remember to store your backups a safe place.