To add syntax checking to vim with Debian, just edit /etc/vim/vimrc and uncomment
the “syntax on” line.
Then your editor will show (in color) syntax errors in Postfix and html/css files.
You may experience problems with ssh and ipv6. If so edit the /etc/ssh/sshd_config file
and enable the ListenAddress 0.0.0.0 option. You can also enable (unpound) the ipv6
option ListenAddress ::.
You may experience lockouts from ssh if you have AAAA ipv6 records in your nameserver if
you don’t make theses changes.
Be sure and restart ssh after changes.
To check spamassassin and verify all required perl modules are installed
spamassassin -D –lint 2>&1 | grep -i failed
then use cpan install module::name ie
cpan install Digest::SHA1
Some additions are required to augment the default install. There is benefit
to adding missing modules as a more complete spam analysis will occur.
You can copy or backup all your databases with these commands including
coping to another server.
mysqldump -u root -p yourdb > mysqlbak.sql
or for dumping all databases
mysqldump –all-databases -u root -p > mysqlbakall.sql
mysql -u root -p yourdb < mysqlbak.sql
to restore all databases
mysql -u root -p < mysqlbakall.sql
It is simple to reset the Samsung S6. Sometimes this is necessary to improve battery life
and performance or just remove clutter from your phone.
First us Samsung’s excellent Smart Switch software (d/l from Samsung for Windows or OSX) and
backup your phone. The software backs up all your data including sms, email settings, etc.
It is very quick also.
Then do a hard reset by holding volume up key, home key, and power key with the phone
powered off. release the home key as soon as you see the Samsung logo and you should boot
into the recovery mode.
Then select from Recovery Mode menu “wipe data / factory reset” using Volume buttons to
navigate and Power button to confirm. After restarting your phone, connect backup to
your desktop and restore your phone with Smart Switch.
You find a few apps with setup requirements but it’s mostly painless.
After months of ownership and many experiments, I have found the best setup for battery life
on my S6-active was to change wifi-settings to enable wifi only while awake (#1 battery eater if
you enable wifi while sleeping) or if you don’t need/care about data usage, leave wifi off.
Also use android email app and only sync during most important part of day (settings has ability
to sync during specified hours) for your email. You can manually sync at other times.
If you take this approach, your S6 (or at least my S6-Active) shows 50+ hours standby after a full charge.
You can easily clone like routerboard hardware with these commands:
First to ssh admin@youripaddress or run terminal from winbox and run the following on the device you want to clone in this example we clone an rb751g to rb951.
## on rb751g type:
/export compact file=name
Then copy the name.rsc file to the rb951 $$either drag and drop it to files with winbox or use sftp.
hard reset the device you want to clone to by powering off and holding reset button, powering on,
and releasing reset button when led next to power plug starts to rapidly flash. Wait until the
os initializes and access with winbox.
## on rb951 type (after hard reset):
/import name.rsc ## you should see no errors.
## then on rb951 type:
/system reset run-after-reset=”name.rsc”
This will clear the current config and import the one from the rb751g
After a minute to load or so you should be able to access the rb951 with winbox and have a complete clone
of the rb751g.
To add serial access to your vm, with Debian/Ubuntu apt-get install libguestfs-tools.
Then with vm shutdown, execute the following:
root:~# guestmount -d vmname -i /mnt
root:~# ln -s /mnt/lib/systemd/system/getty@.service /mnt/etc/systemd/system
root:~# umount /mnt
Reboot your vm and you should have serial console access.