Category Archives: geek
Start headless vbox on windows
start-process ‘C:\Program Files\Oracle\VirtualBox\vboxheadless’ ‘-s yourVMNameHere‘ -WindowStyle Hidden This powershell command will start your virtualbox machine. We’re going to set things up so you can do it by clicking on an icon. Your Mileage May Vary: The stuff below worked great … Continue reading
Razer Gaming Products = spam
Just a little bitch and moan. I purchased a Razer Lachesis and accompanying mouse mat about 3 years ago (from a retailer). Initially I had some very annoying problems with the mouse; it had a glitch which caused the cursor … Continue reading
[django] Creating dynamic lists of radio buttons from arbitrary classes and with long descriptions
I was looking for a way to put a lot of text next to the radio buttons in a django form. I also needed the list of radio buttons to automatically populate and vary according to the situation. After the … Continue reading
Is there a Django template tag that lets me set a context variable?
The answer is buried inside the more complex current_time example in the documentation. Problem You want to add a variable to the context. But you don’t want to go back and add that variable to all the views which call … Continue reading
Django widget renderer render
I got a little frustrated trying to find the ‘simple’ answer to change the html which is generated by the various form field widgets. In this case the RadioSelect field generates radio buttons wrapped in an unordered list. It was … Continue reading
How to configure an open samba share
I’m always battling to expose my linux virtual machines to my windows desktop. Here is a sample smb.conf which completely exposes a directory to a specific IP address: security = share hosts deny = ALL hosts allow = 192.168.1.99 [www] … Continue reading
[Django] How to replace an image using ModelForm
I have a user profile model which holds their ‘mugshot’ image. I’m using modelForm to to present a profile update form. It was easy to build a working form, but now I need a couple of tweaks to the image: … Continue reading
Date formats and Django forms
Date formats are something that US dominance remains unable to overcome. Whilst all software assumes a format of mm/dd/yyyy, all other nations of the world want to change that to their local preference. Django is no exception. Here’s the magic … Continue reading
domainnamegroup.com.au is a scam
I got this letter in the mail recently. At first glance I thought, “oh, does my programmerforhire.com.au domain need renewal already?”… I have a sneaking suspicion that’s exactly the reaction this item was intended to provoke…
My errors always return to jQuery’s “success” function?
How do I tell my application that the query was unsuccessful when jQuery insists on always running the “success” function when it returns?? When we make an ajax call with jQuery the server’s response is consumed by the “success” function … Continue reading