What you need to do: print something to a Windows printer from your ColdFusion application on Linux. How to do it: use the samba tool suite to execute a print command, sending a file to a printer. I use a small form to collect the data that I need to print. The form results are written to a file and then the file is sent to the printer using cfexecute. <cfexecute name=”/usr/bin/smbclient” arguments=” //print_server_ip/virtual_printer_folder my_password […]
Year: 2012
Appending URL Query String Variables to $.getJSON
For all it’s simplicity, sometimes jQuery offers up a bit of complexity that sneaks past me in the documentation. The RIGHT way to pass url query strings: $.getJSON(“jobs.cfm”, {id: 32}, function(d) { … }); The WRONG way to pass url query string: $.getJSON(“jobs.cfm?id=32”, function(d) { … });
hostapd
It literally took me less than 30 minutes to convert a 5 year old Inspiron laptop running FC17 into a wifi ap using hostapd. I used yum to install the software (yum install hostapd dhcp dhcp-*) and then edited the hostapd.conf file and issued the hostapd /path/to/conf/file to start things up and then we were live. The signal is strong and performance is consistent with the WRT-54G router that’s been running for seven years. Now, […]
Way Off Topic
I usually reserve this blog for computer-related topics such as Oracle and ColdFusion and JavaScript. However, I want to share with you the transformation of my planted freshwater aquarium after I moved it off of a high-output, 130W compact florescent fixture and onto a mixture of old-tech T-8 florescent bulbs and new-tech LED strip light. The changes are cataloged in a facebook album. I mixed the two technologies because florescent bulbs give a nice warm […]
Quick Tip: Oracle REGEXP_REPLACE
I’ve always thought of regular expressions as party tricks used at a Magna Cum Laude party at MIT. I still do. Regular expressions are a mystery wrapped in enigma and set in a field shrouded in a thick mental fog. Unfortunately, I occasionally need to venture into that party in the foggy field to retrieve a domain name from a URL for example. select REGEXP_REPLACE(‘https://mail.somedomain.com/flippyWidgets’,’.+:\/\/([^/]+).*’, ‘\1’) from dual You can also do this in JavaScript… […]