Dave James Miller

Developer. Computer Geek. INTJ.

Month

March 2012

Allow access by IP address with CanCan in Ruby on Rails

This is what I used to get CanCan to allow users on the local network to access parts of our intranet without having to log in. Read More

Download data from Ruby on Rails production database to development server using Replicate

Replicate is a Gem that lets you dump and load relational objects between Ruby/Ruby on Rails environments, e.g. dump data from your production database and load it in your development database. The examples in the README use shell scripts to do this. I… Read More

Automatically push changes to Git repository before deploying with Capistrano (cap deploy)

I use this Capistrano task so I don’t have manually do git push before cap deploy. It includes some error checking to make sure I’m on the right branch (master) and don’t have any uncommitted changes. Read More

ruby-debug-passenger

github.com/davejamesmiller

Adds a rake debug task to Ruby on Rails to restart Phusion Passenger with an interactive debugger co…

Read More

Sleep/suspend/hibernate computer automatically when TV is switched off using AutoHotKey

I wrote this AutoHotKey script to automatically switch off my PC when the TV is switched off so when I watch TV in bed (using VLC) I only have to press one button to switch it all off, rather than… Read More

Toggle hidden files and/or file extensions in Windows Explorer with a keyboard shortcut using AutoHotKey

This is part of my AutoHotkey script that allows me to toggle hidden files with Ctrl+Alt+H and file extensions with Ctrl+Alt+E. Read More

Hide the permalink and Edit button on the WordPress Edit Post admin page

This hides the permalink and edit button on the Edit Post page in WordPress. It is useful for when permalinks are not editable (e.g. if it uses the post ID only) in that case its really just taking up screen… Read More

Hide the title box on the Edit Post page in the WordPress admin

This hides the title textbox in the Edit Post page in WordPress. It is possibly useful when using a theme like P2 that doesn’t actually display the title, so you don’t want to be going to the trouble of writing one. Read More

Create a symlink on a remote server when ‘ln’ is disabled

This is a script I used when I wanted to create a symlink on a remote web server, but that web server had the ln command disabled (using cPanel’s Jailshell). Read More

Script to delete and re-create a Linux test user account

I use this script to repeatedly delete and re-create a Linux (Debian/Ubuntu) user account for testing my dotfiles installation script. Read More

Automate backup to an external hard drive with AutoIt and Beyond Compare

This is a pair of scripts I used to back up my computer using Beyond Compare (which I highly recommend) and AutoIt. Read More

Create a new file with Ctrl+Alt+N keyboard shortcut in Windows Explorer with AutoHotKey

This is part of my AutoHotkey script. When you are in Windows Explorer it allows you to press Ctrl+Alt+N and type a filename, and that file is created in the current directory and opened in the appropriate editor (usually gVim in my case, but it will… Read More

© 2017 Dave James Miller — Powered by WordPress

Theme by Anders NorenUp ↑