Dave James Miller

Software Developer. Computer Geek. INTJ.

Page 3 of 7

Fade out notes in WorkFlowy

Fades out the notes field in WorkFlowy until you hover over it or focus it, to make it easier to see the main list items.

My Recommended PuTTY Settings

I use PuTTY all the time to connect from Windows to my Linux servers via SSH. These are the settings I use (that differ from the defaults).

Yo License.txt

git.djm.me

Generates a LICENSE.txt file - choose from 15 licenses.

.uk Domains

In June 2014, Nominet will open up registration of domains directly under “.uk”, removing the need for “.co.uk”. We explain what’s changing and how this affects you.

Keeping your passwords secure

Very bad things can happen if your password is discovered by a hacker, so it’s vital to keep your passwords secure. Here we bring you our top tips to help you avoid your email account / website being hacked.

Cookie & Caramel

Bailey

Lanzarote

Sarah’s 10km run

In aid of Crohn’s disease.

Becks

16 July 1999 – 6 August 2013

New Forest 2013

Silverstone 2013

Sarah & Ceri’s Housewarming

Laravel Boris

git.djm.me

Adds an artisan boris command to Laravel 4.0 that runs the Boris REPL in the Laravel environment.

Laravel Breadcrumbs

git.djm.me

A simple Laravel-style way to create breadcrumbs.

Laravel Aliases

git.djm.me

Adds an artisan aliases command to Laravel that lists registered aliases and the classes they map to, including resolving facades.

Installing PHP 5.4 on Debian 6 (Squeeze)

Debian 7 (Wheezy) is due to come out soon, but I didn’t want to wait to upgrade to PHP 5.4, nor to install the release candidate. I tried using the Wheezy repository, but got dependency errors. Fortunately Dotdeb provides packages for…

List the number of open HTTP connections per IP in Linux

This was useful when fighting a DDoS attack on one of our web servers.

Installing Dnsmasq for wildcard local domains on Debian

I use this to point all subdomains of a domain to my local development server.

Automatic updates for Debian

Originally I was using apticron to email me whenever new security updates were available and then manually applying them, but with 3 Debian servers and frequent updates this was getting annoying. So I decided to automate it.

Automatic upgrades for phpMyAdmin

In order to ensure phpMyAdmin is kept up to date without having to manually upgrade it, I decided to find a way to script it. I found the instructions here, but here’s a more detailed version.

Synergy hotkey to toggle screens

Synergy is a cross-platform program that lets you share a keyboard & mouse between multiple computers over a network. (I use it for controlling my MacBook using my PC keyboard and mouse.) Synergy supports hotkeys, but there is no way to…

Installing PHP 5.2 FastCGI on a cPanel server (alongside PHP 5.3+)

This is based on my instructions for Debian and a bit from this forum post. It requires root access and you must be comfortable using the command line.

Script to download MySQL database & files from live to development server

This is a script I use on a lot of sites to copy the database (MySQL) and any uploaded files to the development site, and modify the database as required.

New Year 2013

Upgrade phpMyAdmin via the command line

This script makes it easy to upgrade phpMyAdmin on one or multiple servers at the same time.

Christmas 2012

Bulk (batch) rename files in Linux

rename -v s/OLD/NEW/ FILENAMES

Write to standard output/error streams in PHP CLI

How to write to STDOUT and STDERR in PHP.

Recursively copy a directory, including symlink support, in PHP

function copy_dir($src, $dst)

Recursively delete a directory, including symlink support, in PHP

function delete_dir($dir)

Split WordPress theme functions.php into multiple files and autoload them

I use this to split my theme’s functions.php into multiple smaller files on particularly complex sites, and to autoload those files (instead of having to manually require each one).

What is a CMS (Content Management System)?

A CMS is a system that allows you, as a non-technical user, to easily manage the content of your website, without needing to learn anything advanced (such as HTML)…

Extract images from a .ico file (e.g. favicon.ico) on Linux

icotool -x -o . favicon.ico

Alberon Secret Santa

Alberon Christmas Lunch

Quod and Turf Tavern, Oxford – with a brief stop to look at the Bodleian Library Christmas tree.

Using Gravity Forms with WP-Types custom date fields

This is a filter to take Gravity Forms format dates (dd/mm/yyyy) and convert them to WP-Types format dates (integer).

Sort and filter WordPress posts query by a custom field

In this example the event start & end dates are entered as timestamps using WP-Types. It could also be modified for Advanced Custom Fields which uses strings.

Keyboard shortcuts to indent/outdent and format as code in WordPress TinyMCE

This allows you to indent lists/paragraphs in the TinyMCE WYSIWYG editor using Tab, and outdent using Shift+Tab. I wrote it because I write a lot of nested lists, it’s tedious using the keyboard to indent and outdent, and I couldn’t find any…

Sarah’s Rainbow Cake

My sister came to visit and brought me homemade cake!

Insert a post into WordPress from an external script

With wp_insert_post() and wp_set_post_terms()…

Get HTTP redirect destination for a URL in PHP

Makes a HTTP request and read the Location header(s) to determine the redirect destination.

Display WordPress admin area dates in UK English (en_GB) format (day-month-year)

While entering several back-dated posts into a WordPress blog, I got annoyed at the date fields being in American month-day-year format and decided to fix it.

Cyprus 2012

Ten Pin Bowling

Chocolate Birthday Cake

August Bank Holiday in Golcar

Stan the cat meets Becks the dog.

Stan Drinking From the Bath Taps

Hide blank icons in bookmarks toolbar in Firefox

Copied from this style and modified to also hide the folder icon and show an arrow instead. /* ==UserStyle== @name Hide blank icons in bookmarks toolbar in Firefox @namespace djm.me @version 1.0.0 @author Dave James Miller (https://djm.me/) @homepageURL https://djm.me/code-snippets/2012/08/hide-blank-icons-in-bookmarks-toolbar-in-firefox @license…

Frogs

© 2021 Dave James Miller — Powered by WordPress

Theme by Anders NorenUp ↑