Composer behind corporate Proxy Server
set http_proxy=http://username:password@proxy:portset https_proxy=http://username:password@proxy:port Don’t use quotes around the parameter Encode passwords with php -r “echo urlencode(‘Pa$$w0rd!’);” winsh winhttp import proxy source=ie Self signed certificate in certificate chain – npm config set strict-ssl false c:\programdata\gemrc :ssl_verify_mode: 0
Ultimate Laptop Buying Guide
When your friends and family know you are technical you are often the first point of call for when technology plays up. One of the most often requests for help is when it comes to buying a laptop and asking for recommendations. I can quite understand this as there is an ever changing set of…
UwAmp (Apache) .htaccess files not working
If you find that your .htaccess files are having no effect in UwAmp, then try setting Allow Override to All. This can be found in Apache Config, then selct your virtual server and double click the relevant Folder line. Change the Allow Override to All from none and OK.
UwAmp cURL error 60: SSL certificate problem
UwAmp cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) If you get the above error you may need to specify a certificate file in your PHP.INI which you can download from https://curl.haxx.se/ca/cacert.pem Once downloaded edit your PHP.INI and set the following
Testing Stripe Webhooks with Localhost
Stripe allows you to test your webhooks, but if you are running a local development environment such as UwAmp then it is difficult to integrate. The solution is to use Putty to create a reverse tunnel to publish the local dev enviornment through your webserver. On NGinx on the VPS server you need to allow the remote port…
Backup entire Ubuntu System
sudo su cd / tar cvpjf backup.tgz –exclude=/proc –exclude=/lost+found –exclude=/backup.tgz –exclude=/mnt –exclude=/sys / tar – The backup program c – Create archive v p j – use bgzip compression f backup.tgz –exclude=*** exclude these directories from the backup
Virtual Server Hosting Comparison
Digital Ocean, Linode and Vultr offer some fantastic Virtual Server solutions from as little as $5. A comparison table of the entry level virtual servers from these three providers are listed below and any of them will provide a great solution if you want to run your own server. Full control over your configuration Easily…
Rewrite all domains to .co.uk .com .net
This will redirect domain.com www.domain.com domain.co.uk www.domain.co.uk www.domain.net to domain.net
Show vehicle positions with the Google Maps v3 API
Most people are already familiar with Google Maps, so why not utilise that to present your business data to your users. Today I am going to show you how to use the Google Maps API to track vehicles using their AVL data. This is something I have done for the Fire Service to show the…
Generating Dynamic Icons for Google Maps with PHP
Google Maps provides a standard Marker marker image that looks like this and whilst I do not intend to offend Ji Lee, this icon can be replaced with an image of your choice. By using PHP to create an image dynamically on the fly you can have images that provide much more information.
Party Excuses
The excuse for a party generator is a playground that has allowed me to use my PHP Date Class. PHP already includes date functions, but these only work on certain date ranges and would not allow dates from say the 18th Century. My own date class allows a wider range of dates and provides functions…
My Singleton
If you have not come across design patterns, they are well worth reading up on. There is a great overview for PHP developers at IBM.
Hide a single page title in WordPress
Took me a litle while to work out how to do this as I thought it would be an option for a page, but it was nowhere to be found. My solution was to use the CSS to specifically target the h2 element on the page using the fact that the parent div has the…
Solved – Slow startup on ICH8R / Asus P5B-E / SATA RAID Disks
Since I swapped out four 250Gb SATA drives for two 750Gb drives the startup time has been delayed by a matter of minutes as the ICH8R Raid Controller sat thinking about detecting the new drives. Changing the BIOS setting from RAID to IDE removed the problem completely, but alas no RAID. I recently came across…
Making Life Easier
As someone who spends a lot of time at the keyboard I find that RSI (Repetitive Strain Injury) is a constant visitor. Working on a laptop, even with a full-sized keyboard I find that the little finger of my left hand is the biggest problem as it spends so much time at the bottom left…
PHP – List a range of dates
This will display ten dates starting from yesterday. The words Yesterday and Today will be added to the relevant dates.