Your IP Address
You appear to be coming from the ip address below..
3.131.37.22You appear to be coming from the ip address below..
3.131.37.22Simple. Fire these commands to reset your user and also secure their gpg keys / files as well. The user name will be substituted automatically.
sudo chown -R $USERNAME:$USERNAME /home/$USERNAME
sudo find ~ -type f -print0 | xargs -0 chmod 0640
sudo find ~ -type d -print0 | xargs -0 chmod 0750
sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 740 ~/Desktop/*.desktop
sudo chmod 600 ~/.gnupg/*
sudo chmod 700 ~/.gnupg
Very simple. Use the following commands..
Backup to an external file.
On the *nix command line, just run..
mysqldump -u root -p database_name > /path/to/database_dump_file.sql
Punch in the password for root (in this case) and the backup is output to the file database_dump_file.sql. It’s ASCII so it can be edited if needed.
Restore from an external file..
mysql -u root -p database_name < /path/to/database_dump_file.sql
Typed the password and that's it, finished.
Need the database names quickly?
Log in to the database as ususal with the command at the *nix command line.
mysql -u root -p
And then issue the following at the prompt..
mysql> show databases;
and you get this....
+----------------------+
| Database |
+----------------------+
| information_schema |
| largedump |
| dspam |
| mysql |
| performance_schema |
| testdata |
| testdata_1 |
| dataset_4 |
| dataset_2 |
+----------------------+
9 rows in set (0.01 sec)
This is quite handy and easy to set up.
First, open up main.cf, the principal configuration file in Postfix. I use vim, but of course you can use whatever editor you like, e.g. vi, nano etc.
sudo vim /etc/postfix/main.cf
In your main.cf, add the following lines in the configuration
smtpd_sender_restrictions =
check_sender_access hash:/etc/postfix/sender_access
Now, create a file to store the list of banned names.
sudo touch /etc/postfix/sender_access
and now edit it to add the banned names…
sudo vim /etc/postfix/sender_access
Add the banned addresses in the following format..
news@z.mindsportzero.com REJECT
subscriptions@cashiq.net REJECT
business-quote@receiveyourquote.co.uk REJECT
penny.fox@flashmarketing.info REJECT
enquiries@flashmarketing.info REJECT
Save the file. Now, create the hashed db file for this file..
sudo postmap /etc/postfix/sender_access
Now you should have a file in the /etc/postfix directory called /etc/postfix/sender_access.db
Now all you need to do is restart postfix.
sudo service postfix restart
Tanaaaa!
Here’s the command to run a complete scan but exclude the sys, proc, dev and lib directories.
sudo clamscan -r -i --exclude-dir='^/sys|^/proc|^/dev|^/lib' /
In Debian / Ubuntu, use avconv.
avconv -i input.mp4 -b 64k -s hd720 -strict experimental output.mp4
This command uses avconv, where..
-i input.mp4 = the input file name
-b 64k = down sample the audio channel to 64k – should be fine.
-s hd720 = reduce the video from hd1020 to the 720 format
-strict experimental = Allows mp4 output
output.mp4 = the output file.
If you haven’t got avconv installed, use
sudo apt-get install avconv
and follow instructions.
This is my website for short blog posts and interesting materials that are noteworthy or have some handy-tip value.