[ OS X ]
[ Techstuff ]
by Tobias Ebnöther
@ 29.07.2010 17:46 CEST
Hi all, long time no see :)
Lately I got more and more unstatisfied with Colloquy so I decided to go back to xchat. Since xchat aqua seems unmaintained I opted for "the real thing" on X11. Unfortunately MacPorts once again failed to build it (I think I never managed to sucessfully build something with it that has some deps) so I had too look for something else.
Bruno pointed me at Homebrew which looks totally awesome. There was no Formula for xchat but it was pretty easy to create one. After only two hours my commit was accepted and it's in the main branch now :)
To be able to nicely switch channels I decided to map the command (⌘) key to alt aka meta. For that purpose I added the following lines to my ~/.Xmodmap:
[ OS X ]
[ Techstuff ]
by Tobias Ebnöther
@ 06.10.2009 10:57 CEST
Ok several co workers asked me how to make the command line mail tool use a proper mailserver under osx. The problem is that it sends mails directly which will not be accepted by most of the mailservers.
If you only want to send your mail plaintext over a mailserver and not use any authentication you just have to add this line to your /etc/postfix/main.cf:
relayhost = gorn.ch
If your mailserver allows SSL encryption you should also add the following lines:
Now create a file called /etc/postfix/sasl_passwd make sure it's only readable by root because you will have to put in your password there the syntax looks like this:
gorn.ch username:password
Finally run this and you should be good to go. Send a mail over the commandline to make sure it works. :)
[ Techstuff ]
[ OS X ]
by Tobias Ebnöther
@ 06.08.2008 15:26 CEST
Skype has an awesome new feature. If you want to edit your last message you can simply do it with a regular expression. Definitely a feature every command line geek will love and most likely already use without knowing (took me some days to figure out ;))
So if you type something like "Hello Patrick" to Patrice you can simply correct it by writing "s/Patrick/Patrice/" see the video for a demo:
[ OS X ]
[ Techstuff ]
by Tobias Ebnöther
@ 28.07.2008 17:00 CEST
I am a big fan of Araxis Merge and I also use svnmerge.py quite often. Lately I run into a bunch of nasty conflicts that weren't so easy to resolve. I wrote a little script that you can execute in the current directory to open all conflicting files in Araxis.
It opens the file diff with your working state on the left and the subversion state on the right. If you save it saves to the "real" file. You still need to execute svn resolved afterwards.
#!/bin/bash
OPTS="-2"
for FILE in `svn st | grep '^C' | awk '{print $2}'`; do
/usr/local/bin/compare $OPTS "${FILE}.working" "${FILE}.merge-right"* "${FILE}"
done
You probably need to adjust the path to compare. I specified the full path here since Image Magick has the same command. You can add additional options like -wait to the OPTS variable to resolve one file after another.
PS: I hope someone from Araxis reads this and renews my support which is running out soon :)
[ OS X ]
[ Techstuff ]
by Tobias Ebnöther
@ 14.03.2008 14:00 CEST
This is mainly for myself because I search that snipped every time I set up a mac. I place it to /usr/local/bin/lock and then type lock in my shell (or LaunchBar) to fire the screensaver and lock the screen (locking needs to be turned on in the preferences).
#!/bin/bash
SCRS=`ps xcopid,command|grep ScreenSaverEng|cut -b1-5`
if [ -z "$SCRS" ]; then
/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine
fi
To safe some energy I don't use the screensaver but let blank the screen after a while.
[ OS X ]
[ Techstuff ]
by Tobias Ebnöther
@ 14.03.2008 01:11 CEST
I let memcached automatically start with the OS X integrated launchd. Here is the XML I provided to start it with the following settings:
Bound to localhost
Runs as nobody
Spawns only one thread (this can slow things down)
Consume a maximum of 10MB memory (it will just throw old stuff out afterwards)
It will start when you login
It will send all output to /dev/null
Here is the updated script (I use macports now instead of fink just change the path to wherever your binary is). Just put the XML to ~/Library/LaunchAgents/memcached.plist and run launchctl load ~/Library/LaunchAgents/memcached.plist
[ OS X ]
[ Techstuff ]
by Tobias Ebnöther
@ 09.03.2008 23:35 CEST
Some days ago Lukas Smith asked me if it's possible to get source highlighting in Safari. For Firefox I used the ViewSourceWith extension for a long time to use TextMate. So now I wanted to get that in Safari too. Usually I use Safari to browse and Firefox to develop so it's not really necessary but a nice feature.
I found a cool plugin for Safari called SafariScript which ships a view source in TextMate script. But the script is pretty poor. It just fetches the URL via curl to a specified file, so you can only access public sites and only one page at time. The other scripts are very cool trough for example the "Open page in Firefox" script which I love when I opened the page in the wrong browser.
I came up with my own script which you can see bellow. It fetches the source directly from Safari instead of downloading the URL and it adds a timestamp and random number to the tempfile so it should be possible to open as much pages as you want. Just put it in place of the old script and add a cool keyboard shortcut (I use ⌘U as in Firefox).
property newline : ASCII character 10
set timestamp to do shell script ("date +%s") & (random number from 1 to 1024) as text
set tmpfile to POSIX path of ((path to "temp" as Unicode text) & "view_source" & (timestamp) & ".html ")
set tmpfileSpec to ((path to "temp" as Unicode text) & "view_source" & (timestamp) & ".html ") as file specification
tell application "Safari"
set htmlSource to source of document of front window as text
end tell
set fp to open for access tmpfileSpec with write permission
set eof of fp to 0
write (htmlSource) to fp starting at eof
close access fp
tell application "TextMate"
activate
open tmpfileSpec
end tell
do shell script "rm -f -- '" & tmpfile & "'"
[ OS X ]
[ Techstuff ]
by Tobias Ebnöther
@ 09.03.2008 19:09 CEST
Yesterday I wrote a little Patch to fix the tagging feature in ecto3. You will have to set the setting to the following:
I fixed the image upload too, but I didn't figure out how to use a customized image template to let FluxCMS generate the thumbnails instead of uploading them separately.
[ Techstuff ]
[ OS X ]
by Tobias Ebnöther
@ 13.01.2008 14:48 CEST
A few days ago I bought the macheist bundle. In my opinion this years bundle is great. I allready converted nearly ALL of my useraccounts to 1password generated password. Played around with snapz pro (now I can blog cool screencasts in great quality :) and CSSEdit. Also I used AppZapper to Zap iStopMotion since I will not produce a movie anyways, just wanted to take a look. Probably more detailed reviews will follow.
But now to get more (free) apps you need to referr people to buy it. Actually I don't like to do this, but I like to get free apps :) So if you read this and are going to buy the bundle, please use this link: https://www.macheist.com/buy/invite/89925
[ Techstuff ]
[ OS X ]
by Tobias Ebnöther
@ 22.11.2007 14:54 CEST
As mentioned in the post earlier I was going to do a presentation of TextMate. In the final version I excluded the blogging bundle stuff since it doesn't work well with the FluxCMS blog and I was short on time.
If you're still interested you can get the slides here. The slides are something like a mix between feature presentation (first part) and cheatsheet (second part).
There did some interesting things happen while writing this presentation.
1) Presenting a text editor is more stupid than I thought. Actually there are a lot of things that you like and can't explain well in words - it's just a feeling you get.
2) I'm using ways to less key combos :)
3) TextMate rocks!
4) I need to train my presentation skills and try to not forget things I wanted to say (in the correct order)...