Alan’s Personal Techy Website

  • To set a background job from the terminal in Linux

    If you run a command from the shell terminal, and you realise that it is going to run a while, you can put it into the background first ctrl-z which suspends it, then bg which starts it running in background, then disown -h which detaches the job from your session, this is important as if you exit…

  • Securing Centos server

    A few useful resources relating to securing Centos find tools and installing isn’t always simple 1. log watch monitors logs and can send e-mails of what has been going on here is a useful resource of how to https://www.dieskim.me/2012/07/03/centos-6-virtualmin-logwatch-install-configure-mail-to-email-disable-service-monitoring-debug-fixmysql-http-error/ 2. chkrootkit  check stuff too http://generallinux.com/install-chkrootkit-on-centos/

  • How to upload a mysql database from a sql.gz file

    How to upload a database from a database.sql.gz file.  For instance c-panel databse backup can create this file and you might want to use it up upload to a test system or when moving server zcat  database.sql.gz | mysql -u username -p -h localhost databasename password: Executing this command line in the shell on your…

  • Is MapQuest a viable alternative to Google Maps for your website?

    Recently I have been coding some stuff using MapQuest rather than Google Maps. This was mainly spurned by the fact that Google Maps is no longer free – however of course we are talking about more than 25,000 impressions per day, so it is still free for most small website owners. Actually using the MapQuest…

  • Cloning a website

    To create a static copy of all website pages, for some reason that may be necessary, in linux   wget –mirror -w 2 http://www.example.com  

  • Sending data from php to javacript in WordPress

    It is often useful to send data from PHP to Javascript and WordPress gives you a method. You can use the localise script function to send data from php to javascript in WordPress coding e.g. $params = array ( “imageurl” => plugins_url(‘images/’, __FILE__), “post_id” => get_the_id(), ); wp_localize_script( ‘myScript’, ‘myparams’, $params ); and access it…