Tips & Clues

Start/Stop VPN connection automated in a .CMD file

I am pretty proud of this script, as it does what is otherwise a bit fiddly -- and it took some fairly in depth research to come up with a solution that uses only what is provided out of the box with Windows 10. My only issue that remains with it is that I had to include the username & password - I would like to find a way to have it use the existing credentials in the VPN configuration. (Let me know if you have any bright ideas!!)

I used clues from a lot of places to do this, but the clever logic that allows me to do the conditional code step that you see here:

PhpMyAdmin error message when the script has not been run during install...

I see this fairly often when I have done fast installs of ubuntu:
"Connection for controluser as defined in your configuration failed."

What happens is I ignore the install script that needs to run for PhpMyAdmin to establish its database etc.
Happily the fix is fairly easy - just run the script again now:
sudo dpkg-reconfigure phpmyadmin

Recent Drupal tricks and tips...

Found lots of bocked (SPAM) users in my Drupal 7 site. Deleted with this SQL script (in PHPMYADMIN)
DELETE FROM users WHERE `status` = 0 AND `uid` != 0; Also had 49,000+ failed admin login attempts on my site - had caused a lockout of my admin user.
Did this in phpmyadmin : DELETE FROM flood;
Topic: 

Allow webmin traffic through the default firewall [iptables] settings in Proxmox Containers

Just a liitle trick I needed to do to get my webmin access enabled in the vhost on Proxmox:

iptables -I INPUT 1 -p tcp --dport 10000 -j ACCEPT

Topic: 

Proxmox Vhost IP Address Configuration

Some key cmds that I had to use to get the networking operational on the proxmox server:


root@proxmax:/etc/network# vzctl set 103 --ipadd 192.168.3.88 --save

This will poke a new IP address into the config for the container.
The "/etc/network/interfaces" files that results will look like this:

Remote reboot while logged in via RDP

At a CMD prompt run:
shutdown -t 0 -r -f

Topic: 

bash history date/time stamps

By default, the bash history does not keep tabs on the time of day that a given command was run. But it is really as simple as defining ONE environment variable: "HISTTIMEFORMAT"

This from "Linux by Example": HISTTIMEFORMAT takes format string of strftime. Check out the strftime manual to choose and construct the timestamp that suit your taste. My favorite is "%F %T ".

export HISTTIMEFORMAT="%F %T "

Extract IP Addresses from a text file...

This is a cool little grep search to pull any IPs from a text file:
grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' file_with_ips_in_it.txt | sort | uniq

Upgraded jaxbeachtech.com to Drupal 7

I finally bit the bullet and upgraded the site to Drupal V7 - it was pretty straight forward, a few glitches here and there, but overall, pretty smooth. It was worth waiting a few years for the code to be nicely cleaned up :)

A BIG Thank You to all those clever people that contributed to the Drupal 7 experience - there is no doubt about it - it is a fantastic product.

Drupal's magical "DRUSH" CLI

I have just spent a few hours getting familiar with this cool tool. Drush allows most housekeeping for Drupal sites to be done from a command line - it's a wonderful thing. Just take a look at how much I got done executing this single command:

sudo drush @veo up

And here's what it did for me:


donmc@jbt:/var/www/VEOffice$ sudo drush @veo up
Update information last refreshed: Sat, 04/28/2012 - 16:25

Update status information on all installed and enabled Drupal projects:

Pages

Subscribe to RSS - Tips & Clues