qlmanage -p FILE
qlmanage -p FILE >& /dev/null &
Saturday, January 26, 2008
use Quick Look (OS X) from command line
Saturday, December 15, 2007
Open in (OS X) Terminal here...
...seems so handy! but doesn't come with the system.
now, obviously the problem has already been encountered before:
so i used this to get started (and finished) - result is a Finder.app Workflow:
...just accompany this snippet with on processItem(i) and on canChangeDirectoryTo(f), save it as Workflow - done.
http://c-command.com/scripts/finder/open-in-terminal
so i used this to get started (and finished) - result is a Finder.app Workflow:
on run {input, parameters}
repeat with i in input
my processItem(i)
end repeat
return input
end run
...just accompany this snippet with on processItem(i) and on canChangeDirectoryTo(f), save it as Workflow - done.
Monday, November 12, 2007
ElsterFormular "Externe Exception C0FB007F" und WINE
while I was still having a windows machine ElsterFormular was the software i used once a year. now, that i have no windows machine anymore things got a bit more complicated.
i couldn't find a software to submit a 'Umsatzsteuererklärung' (not the 'Umsatzsteuervoranmeldung'), that was free and available for linux and OS X - i couldn't even find one that was available for any of the two operating systems...
that is when WINE came into play (on the linux machine):
i couldn't find a software to submit a 'Umsatzsteuererklärung' (not the 'Umsatzsteuervoranmeldung'), that was free and available for linux and OS X - i couldn't even find one that was available for any of the two operating systems...
that is when WINE came into play (on the linux machine):
- Debian GNU/Linux (mostly stable; but with some testing packages) with Kernel 2.6.22
- wine 0.9.44-1
- ElsterFormular 2006-2007 (8.2.2.0)
Externe Exception C0FB007F
and the solution was not to reinstall the software (pointed out here and on some other threads here) - i tried that - but to install
- mfc42.dll
- Jet 4.0 Service Pack 8 (SP8) für Windows 95 / 98 / NT 4.0
Friday, November 9, 2007
imapsync - personal reminder...
at the end of a long story there was the need to transfer mail from a Lotus Domino server to a local Thunderbird account... anyways, for some other reasons it seemed quite a good idea to transfer them to a local IMAP server, and the have Thunderbird download all mail.
after some different IMAP servers the best solution seemed to be dovecot - with the others there were problems, e.g. with extended attributes.
copying mails from Domino to the local IMAP server was then done with imapsync:
references
after some different IMAP servers the best solution seemed to be dovecot - with the others there were problems, e.g. with extended attributes.
copying mails from Domino to the local IMAP server was then done with imapsync:
imapsync --host1 domino.e.t.c --user1 "USERNAME" --authmech1 PLAIN --host2 localhost --user2 dummy --authmech2 PLAIN --prefix2 "~/mail/" --syncinternaldates --split1 50 --split2 50 --nofastio1 --debug
references
Wednesday, November 7, 2007
self-signed certificate with multiple DNS names (aka subjectAltName)
following [1] and adding
unfortunately, the DNS:copy:commonName didn't work for me...
references:
subjectAltName = DNS:PROBABLY_YOUR_COMMONNAME,DNS:*.SOME_DOMAIN_NAMEto the [ v3_ca ] section of your openssl.cnf file should do the trick.
unfortunately, the DNS:copy:commonName didn't work for me...
references:
Tuesday, November 6, 2007
OS X Leopard and broadcasted cups printers - no Shared Printers
for whatever reason - and it might be that bonjour should become the preferred method - printers broadcasted from a cups print server don't show up in OS X 10.5 it is annoying in case one just wants to print (without fiddling around with the cups server)...
for the moment the solution seems to be to add
nevertheless, you will have to add the 'Shared Printer' via 'Printer & Fax' - just that now the printers from the cups server will show up.
references:
for the moment the solution seems to be to add
BrowseProtocols cupsto /etc/cups/cupsd.conf (e.g. after BrowseAllow all). in case you know what you are doing
sudo killall -HUP cupsdrestarts the printing service (aka cupsd). the references also show a way of doing all this via cups' web interface (on http://localhost:631)...
nevertheless, you will have to add the 'Shared Printer' via 'Printer & Fax' - just that now the printers from the cups server will show up.
references:
Sunday, November 4, 2007
Matlab: Undefined function or method 'propertyeditor' for input arguments of type
launching matlab, typing 'figure', menu: View->Property Editor, and then
> ??? Undefined function or method 'propertyeditor' for input arguments of typefound a thread - and a solution: http://groups.google.com/group/comp.soft-sys.matlab/...
> 'double'.
> Error in ==> viewmenufcn at 43
> propertyeditor (hfig, 'toggle')
> ??? Error while evaluating uimenu Callback
> [...] In my case the following folder was missing:
> "$MATLAB\toolbox\matlab\plottools"
>
did help here, too. strangely enough the error occurred only for certain users - even after they had deleted their ~/.matlab directory...
iSync.app (or rather SyncServices) doesn't sync CalDAV calendars
i have some calendars on an Apple CalendarServer and edit them via iCal.app, Thunderbird/Lightning, and a Web Interface - all fine - and synchronization with my phone is done on the mac via iSync.
problem is that i cannot select any of the CalDAV calendars as target to "Put events created on my phone into". as long as i have no dummy local calendar i cannot select to sync calendars at all.
might be a shortcoming of the SyncServices...
references:
problem is that i cannot select any of the CalDAV calendars as target to "Put events created on my phone into". as long as i have no dummy local calendar i cannot select to sync calendars at all.
might be a shortcoming of the SyncServices...
references:
iSync.app dosn't show calendars (or shows them but won't sync 'em)
i was playing around with the CalDAV support in Leopard's new iCal.app - subscribing to CalDAV servers, WebDAV servers, publishing, deleting them again, etc. in the end i could see, edit, and update most of the calendars i wanted to. unfortunately, i couldn't sync them to my phone...
because:
calendars didn't show up in the iSync dialogue for my phone or
calendars showed up in the dialogue but just didn't sync
i cannot say i have a 'real' solution but at least things work again...
as the data of the calendars was not (i repeat NOT) stored locally i could just delete everything that seemed faintly related to iCal.app, iSync.app, my phone or SyncServices, i.e. i deleted the following files/directories...
because:
calendars didn't show up in the iSync dialogue for my phone or
calendars showed up in the dialogue but just didn't sync
i cannot say i have a 'real' solution but at least things work again...
as the data of the calendars was not (i repeat NOT) stored locally i could just delete everything that seemed faintly related to iCal.app, iSync.app, my phone or SyncServices, i.e. i deleted the following files/directories...
~/Library/Preferences/com.apple.iCal*...logged out (hm, i even rebooted) and started all over again: hooked up the CalDAV calendars into iCal.app, setup the phone for iSync.app and tried again. calendars are back and sync just fine.
~/Library/Preferences/com.apple.isync*
~/Library/Preferences/iCalExternalSync.plist
~/Library/Preferences/ByHost/com.apple.syncservices*
~/Library/Preferences/ByHost/com.apple.iCal.helper*
~/Library/Calendars
~/Library/Phones
~/Library/Application\ Support/iSync
~/Library/Application\ Support/SyncServices
Sunday, October 7, 2007
reverse lookup of names with Apple Script in Address Book.app
thought with an asterisx server on the network it should be possible to get incoming calls signaled on the mac - with Address Book.app lookup for names and pictures...
incoming (ISDN) calls are handled by the chan_capi module and then notified via app_notify
the OS X client comes from the same page, however for me the notification part with Address Book.app lookup didn't work. to have growl notification i then put an AppleScript into Library/Application Support/AsteriskNotifier/Scripts
references:
incoming (ISDN) calls are handled by the chan_capi module and then notified via app_notify
- at the end of extensions.conf something like the following has to go (put in values for MSN and HOSTNAME_TO_BE_NOTIFIED)
[capi-in]
exten => MSN,1,Notify(${CALLERID(num)}|${CALLERID(name)}|${EXTEN}/HOSTNAME_TO_BE_NOTIFIED)
exten => MSN,2,Wait(120)
exten => MSN,3,Hangup()
update (9/11/2007):
i had a wrong Notify call in my extensions.conf and that was why the notification part didn't work... the AppleScript, still, exemplifies a lookup in Addressbook.app for a given number.
global callerName, callerNumber, callerImg
-- notification("01792259314||4066585")
-- notification("||4066585")
on notification(message)
-- message comes in "${CALLERID(num)}|${CALLERID(name)}|${EXTEN}"
set the text item delimiters to {"|"}
-- first the number
set callerNumber to text item 1 of message
-- second the name - if available
if (text item 2 of message) is not equal to "" then
set callerName to text item 2 of message
else
set callerName to "Unknown"
end if
-- third the number that was called
set calledNumber to text item 3 of message
-- for further reference...
set callerImg to null
set the text item delimiters to {" "}
if callerNumber is not equal to "" then
-- this is necessary if the number in Address Book.app is in a different format
-- e.g. "034567890" doesn't match "+12 (345) 67890"
set lookForNum to callerNumber
set lookForNum to my trim_line(lookForNum, "00", 0)
set lookForNum to my trim_line(lookForNum, "0", 0)
tell application "Address Book"
set found to false
set phoneNums to {}
repeat with loopPerson in people
set PhoneNumsCount to (count every phone of loopPerson)
repeat with i from 1 to PhoneNumsCount
set phoneNum to (get value of phone i of loopPerson)
set newString to my remove_specialChars(phoneNum)
ignoring white space
if newString contains lookForNum then
-- beep
-- display dialog phoneNum as string
set phoneNums to phone i of loopPerson
set callerNumber to phoneNum
if callerName is not equal to "Unknown" then
set callerName to first name of loopPerson & " " & last name of loopPerson
end if
if image of loopPerson exists then set callerImg to image of loopPerson
exit repeat
end if
end ignoring
end repeat
if phoneNums is not {} then
set found to true
exit repeat
end if
end repeat
-- if found then
-- activate
-- set selection to loopPerson
-- end if
end tell
end if
tell application "GrowlHelperApp"
-- Make a list of all the notification types
-- that this script will ever send:
set the allNotificationsList to ¬
{"Incoming Call"}
-- Make a list of the notifications
-- that will be enabled by default.
-- Those not enabled by default can be enabled later
-- in the 'Applications' tab of the growl prefpane.
set the enabledNotificationsList to ¬
{"Incoming Call"}
-- Register our script with growl.
-- You can optionally (as here) set a default icon
-- for this script's notifications.
register as application ¬
"Asterisk Notification" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
-- Send a Notification...
if callerImg is not null then
notify with name ¬
"Incoming Call" title ¬
callerName & " @ " & (time string of (current date)) description ¬
callerNumber as string application name ¬
"Asterisk Notification" image (callerImg)
-- callerNumber & " on " & calledNumber
else
notify with name ¬
"Incoming Call" title ¬
callerName & " @ " & (time string of (current date)) description ¬
callerNumber as string application name ¬
"Asterisk Notification" image from location "~/Library/Application Support/AsteriskNotifier/phone.jpg"
end if
end tell
end notification
on remove_specialChars(this_text)
set copy_flag to true
set the clean_text to ""
repeat with this_char in this_text
set this_char to the contents of this_char
if this_char is not "(" and this_char is not ")" and this_char is not "+" and this_char is not "x" and this_char is not "-" and this_char is not "_" then
set the clean_text to the clean_text & this_char as string
end if
end repeat
return the clean_text
end remove_specialChars
on trim_line(this_text, trim_chars, trim_indicator)
-- 0 = beginning, 1 = end, 2 = both
set x to the length of the trim_chars
-- TRIM BEGINNING
if the trim_indicator is in {0, 2} then
repeat while this_text begins with the trim_chars
try
set this_text to characters (x + 1) thru -1 of this_text as string
on error
-- the text contains nothing but the trim characters
return ""
end try
end repeat
end if
-- TRIM ENDING
if the trim_indicator is in {1, 2} then
repeat while this_text ends with the trim_chars
try
set this_text to characters 1 thru -(x + 1) of this_text as string
on error
-- the text contains nothing but the trim characters
return ""
end try
end repeat
end if
return this_text
end trim_line
- Notify application module for the Asterisk PBX: http://mezzo.net/asterisk/app_notify.html
- AppleScript Support for Growl: http://growl.info/documentation/applescript-support.php#usingImages
- http://www.apple.com/applescript/guidebook/sbrt/pgs/sbrt.07.htm
- http://www.faqintosh.com/risorse/en/othutil/addrbook/lookupphn/
- http://www.mactech.com/articles/mactech/Vol.21/21.10/ScriptingAddressBook/index.html
- http://www.mumbles-project.org/
- http://www.acm.uiuc.edu/macwarriors/workshops/applescript/1999/nutshell/control.html
Friday, October 5, 2007
Modify iWeb sites to work with Google Analytics
wanted to use Google Analytics together with iWeb & didn't want to use BBEdit, someEdit, someOtherEdit or an Automator action... as i have to sync the iWeb content anyway - why not use a little (python) script to integrate the Google snippet?
use somthing like
https: / / iiegn.dyndns.org / svn / de.iiegn / _stuff / iWeb.py
references:
use somthing like
find iWeb/ -iname '*.html' -exec ./iWeb.py "</body>" iWeb.analytics {} {} \;with iWeb.analytics beeing the Google snippet and iWeb.py the follwoing script. after that i use sitecopy --update [SITENAME]...
#!/usr/bin/env pythonthe latest version of this script might be available from (something like):
import sys,os
usage = "usage: %s searchText insertText_file [infile [outfile]]" % os.path.basename(sys.argv[0])
def init():
stext = sys.argv[1]
replaceTextFileIn = open(sys.argv[2],'r')
replaceTextFileContent = replaceTextFileIn.readlines()
replaceTextFileIn.close()
# print replaceTextFileContent
input = sys.stdin
output = sys.stdout
if len(sys.argv) > 3:
input = open(sys.argv[3])
inputContent = input.readlines()
input.close()
if len(sys.argv) > 4:
output = open(sys.argv[4], 'w')
for s in inputContent:
output.write(s.replace(stext, ''.join(replaceTextFileContent) + stext))
output.close()
if __name__ == "__main__":
if len(sys.argv)
https: / / iiegn.dyndns.org / svn / de.iiegn / _stuff / iWeb.py
references:
Thursday, October 4, 2007
Preview.app as viewer in jHylaFax (or other java/macport/... applications)
/usr/bin/open -a Preview [FILENAME]
Sunday, September 30, 2007
debian, ampache, and xspf player
installed ampache (https://ampache.bountysource.com/wiki/Ampache_on_Debian) and after local play was working wanted to try xspf player:
but it seemed like the link for the temporary playlist-id did not transfer correctly - solution was to modify the trunk version of show_xspf_player.inc.php from the svn repository.
but it seemed like the link for the temporary playlist-id did not transfer correctly - solution was to modify the trunk version of show_xspf_player.inc.php from the svn repository.
<div id="mp3player">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="400" height="170" id="xspf_player" align="middle">
<param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="/modules/flash/xspf_player.swf?autoplay=true&playlist_url=" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="type" value="application/x-shockwave-flash" />
<param name="width" value="400" />
<param name="height" value="170" />
<param name="name" value="xspf_player" />
<param name="align" value="middle" />
<embed src="/modules/flash/xspf_player.swf?autoplay=true&playlist_url=" quality="high" bgcolor="#ffffff" width="400" height="170" name="xspf_player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div>
Sunday, September 9, 2007
i've been simpsonized
Have you ever wondered what I would look like as a character on The Simpsons? Never? Not even once? D'oh! Well, anyway, I would look like this:you can give it a try at http://www.simpsonizeme.com
however, you might wonder what Burger King is going to do with all the photos, DOBs and e-mail addresses...
Subscribe to:
Posts (Atom)