Connecting to various printers from mac cups
0Connect to windows spool
Go to: http://localhost:631
Administration > Add printer > Windows printer via spools > smb://username:password@printer_ip/printer_name.
Connect to Lexmark printer
Administration > Add printer > Internet printing protocol > ipp://192.168.1.69/printers/Lexmark_E232
Connect to HP printer
Administration > Add printer > AppSocket/HP JetDirect > socket://printer_ip:9100
Dynamic method calling from applescript
0Applescript comes handy sometimes when you need to do some automation job quick within the MAC OS. Though it lacks many of the features offered by the modern languages, you can sometimes simulate them doing some dirty tricks
. One of them is dynamic calling of the methods of a particular script. let’s take the case where you want for example to store some options for your script in a separate file though it might look like a fancy way of storing options. so it will look something like
--script_options.scpt on AppleOptions() return some options end AppleOptions on GrapesOptions() return some options end GrapesOptions .... on Options() --this should be a default option return some sort of options end Options
Now if the calling of these options depends on some context that changes every time you run your script, you can still call your methods without knowing beforehand what’s going to be called, like this:
--main.scpt
set theFruit to some_value_that_came_from_current_context
set selScpt to path_to_the_options_script_file
set selScpt to load script selScpt
set scptOpt to Options() of selScpt
try
set _scptOpt to run script ("on run (inArgs)" & return & "set theCaller to item 1 of inArgs" & return & "tell (item 1 of inArgs) to " & theFruit & "Options()" & return & "end run") with parameters {selScpt}
--optionally check for empty list or string returned in the try block
end try
if (_scptOpt is not "" and _scptOpt is not {}) then
--display dialog "ok"
set scptOpt to _scptOpt
end if
Calling the above script with theFruit set as “Apple” (no case checking in the above script though) will call your imported script’s AppleOptions() or if not found will get the default Options method.
Removing chosen jquery select box replacement
0$("select").removeClass("chzn-done").css('display', 'inline').data('chosen', null);
$("*[class*=chzn]").remove();
SVN checkout failed
0Normally this error occurs when you’re running under some sort of proxy environment. The fix is pretty simple:
Open a terminal window:
type sudo pico ~/.subversion/servers
scroll down until you find the [global] line (should be at the end of the file) and uncomment if commented (aka preceded by ###) the following lines:
http-proxy-host = your_proxy_address
http-proxy-port = your_proxy_port
http-proxy-username = your_proxy_user
http-proxy-password = your_proxy_pass
http-compression = no
Pin problem with eclipse-php in Windows 7
0Eclipse 3.0.2 tends to be stubborn about pinning nicely to the Windows 7 taskbar … the solution for me was to add these to the eclipse-php.ini
–launcher.vm
C:\Program Files\Java\jre7\bin
where C:\Program Files\Java\jre7\bin is the path of the installed jre on your system.
Windows reloaded or failure reloaded?
0Today i had some time to look inside of some newsletter i got in the last few days. One of them seemed pretty interesting because it was talking about a totally new Windows, with cool new stuff(yeah heard that before) and a complete new design(same here). While i wasn’t quite convinced about the last, i took a look at one of the videos presenting the new redesigned UI. In my oppion the changes look good, though they don’t bring something really spectacular compared to competition (in fact it shouldn’t, as it has to be still friendly for people coming from prior versions), but it’s a good change that strengthens my belief that Windows is one of the best choices for most of the people when it comes to daily computer usage. One interesting thing is that Microsoft started to impose restrictions for the Windows 8 tablet chipmakers according to windows8center.com, which in my oppinion is one of the best things they’ve did in the past decade … it should bring more quality, lower prices and most of all … a better experience(did they finally learn the apple philosophy?). – original post here
Anyway here are the videos.
And second one from the Windows 8 presentation in taiwan.
More information can be found on windows8center.com
Using the right tools at the right time
0Reading my daily dose of feeds on GReader, i came across on an older post from Bruno Lowagie’s blog (if iText rings any bells) explaining why software needs to be kept simple and oriented to its designed role and not doing a ton of things that don’t have anything to do with the initial target. I don’t know why but the story amuzes me everytime i read it. here it is:
