My Contribution
to the Public Domain
Well, here is my humble contribution to the Public Domain, sorted
roughly in chronological order.
I hope you will find some of the following helpful ...
There is also
older stuff,
which probably no one is interested any longer in.
Concatenate movies automatically
Here is a little
Automator Workflow,
with which you can concatenate a
number of movies automatically.
You first have to open the
workflow
in Automator.
Then you select the movies in Finder.
Then you click the "play" button in Automator.
Make your presentations / lectures more lively with PowerDraw
Have you ever wished to just draw a few lines on the screen during your
presentation? Or did you wish you could highlight a word or phrase or
part of a drawing during your lecture? Maybe you even wanted a few blank
slides so you could explain something in more detail?
Then
PowerDraw
is the tool for you.
It is particularly useful when giving presentations / lectures using
a ModBook
(this is a tablet MacBook).
On the right you can see a picture how it looks like
Here is an overview of the features:
- Overdraw mode: while switched on, all mouse clicks and dragging are
intercepted by
PowerDraw to create line drawings. If overdraw mode is switched off,
then only PowerDraw's buttons are active; all mouse events in other
areas of the screen go to the application underneath, as ususal.
- Two buttons for stepping forward/backward in your presentation (this is
particularly useful while overdraw mode is on).
- Buttons to skip to the next/previous slide, no matter how many
animations there are.
- The GUI is fairly minimal, so as not to
intrude too much; it is also quite efficient (hopefully),
so that switching between drawing mode and click-through mode, and
between different drawing colors is as quick as possible.
-
PowerDraw remembers what you have drawn over each slide; so if you go
back a slide, the drawings you have made there will be displayed again.
And it does not matter whether you go back via PowerDraw's button, or
via Powerpoints
own user interface (e.g., backspace, right click, etc.)
- PowerDraw
never intercepts keyboard events, so key clicks will always go to
Powerpoint (or whatever application is in focus at the moment). This is
a safety net. (Another reason is that
the ModBook has no keyboard at all.)
Installation: just download
the disk image and move the application inside
to your Applications folder.
Usage: just run PowerDraw, the rest should be straight-forward.
Prerequisites: Mac OS X 10.5 or higher and, if you want to use it with
Powerpoint, Powerpoint 2008.
Donation: if you find yourself using this app sometimes, please consider
making a donation (see the button at the bottom of the configurations
sheet); all kinds of donations will be highly appreciated!
License:
please notice that I put PowerDraw under
a copyright and license
that basically says it's free for personal use but not for commercial use.
Test program showing how to create a window that is always on top,
transparent, and still gets mouse events in Cocoa (on Mac OS X)
Because it cost me at least 2 days to find out how to create a window
under Cocoa that allows to do the following:
- a transparent window using Cocoa that is always on top of all other
windows;
- a button with which one can toggle the mouse behavior on the "glass
canvas";
- while the button is pressed, the transparent window captures mouse events;
while the button is not pressed, the window is click-through;
- the toggle button always receives mouse events.
I post this little
test program ;
here is the
single source file
again, so that (hopefully) people will find it better via google
(it is, of course, contained in the zip file, too).
It works under XCode 3.1.3 and Mac OS X 10.5 (Tiger).
Make the iPhone work with congstar
When I switched to congstar in Germany, I had the problem that it wouldn't let
me enter the parameters for the Cellular Data Network (APN, username, password)
although my iPhone did receive an EDGE signal.
I solved this with the following procedure:
-
Download this Carrier Bundle:
congstar_de.bundle.zip
and unzip it.
-
Copy it over to your iPhone:
scp -r congstar_de.bundle root@169.254.xxx.xxx:"/System/Library/Carrier\ Bundles",
where 169.254.xxx.xxx is the current IP address of you iPhone.
(I usually do this by creating a private network on my Mac.)
-
Ssh into your iPhone:
ssh root@169.254.xxx.xxx
and
cd /System/Library/Carrier\ Bundles.
-
Make the new carrier bundle the one to be used in Germany on the T-Mobile
network like so:
# mv 26201 26201_old
# mv 26206 26206_old
# ln -s congstar_de.bundle 26201
# ln -s congstar_de.bundle 26206
-
Reboot your iPhone.
And by some magic, I even got the correct internet parameters in
Settings -> General -> Network -> Cellular Data Network after the
reboot, namely
APN = internet.t-mobile , username = t-mobile ,
password = tm !
(They are not contained in the carrier bundle...)
Update: with the upgrade to firmware 2.2, I don't have the menu
'Settings -> General -> Network -> Cellular Data Network'
any more :-( , but the settings are still correct ;-)
The iPhone still doesn't show the carrier's name at the top left (next to the
signal strength), and you still get a blank carrier name in Settings ->
Carrier, where it should say D1 or T-Mobile ... but, oh well ...
I've got an iPhone 2G with firmware 2.1, jailbroken and unlocked.
I relied on a number of most valuable sources for the above procedure:
http://www.volkspost.info/carrierbundle_pwn2/
,
http://en.wikipedia.org/wiki/Mobile_network_code
,
http://hackint0sh.org/forum/showpost.php?p=274640&postcount=20
(the plutil was already installed on my Mac).
Batch Convert a Number of Movies with Quicktime
Here is a little applescript that
batch converts
a number of movies into the format that you have used last time when you
converted a movie using Quicktime.
Just unpack the
gzip file
(double-clicking should do it),
then drag a number of movies onto the icon.
A few Basic Shapes as OmniGraffle Stencil
I have imported a few shapes from Visio into OmniGraffle and created a
stencil of them.
It contains a curly brace, a number of cloud shapes, thunderbolts,
block arrows, and callout boxes.
Just download the zip file, unpack it, and move the .gstencil file into
~/Library/Application Support/OmniGraffle/Stencils.
Move Off-Screen Windows to the Main Screen
Here is a little applescript that
moves all windows
that are almost or completely off-screen
to a position on the screen (main display).
This can be very handy when you plug in your Mac laptop to different displays
(such as projector and flat panel). Then, it often happens (to me,
at least) that some windows get pushed to the very sides of the screen, so
that only a few pixels of the windows remain on-screen.
I should mention that this version is based on the script provided
by Jonathan Laliberte
Here is a little variation; the difference is:
all windows that are more or less off-screen (no matter how much) are moved back
so that they are completely on screen (if possible).
Counting Polygons in VRML / X3D
If you want to count the number of polygons in a VRML / X3D file
without a VRML loader / brwoser,
here is a little script.
Simplex Noise
Here is a port to GLUT
of Stefan Gustavson's
demo
of "simplex noise", which was invented by Ken Perlin.
My port compiles and runs fine under Mac OS X 10.4 on my Powerbook,
and it should also compile fine under Linux (please let me know).
Klausur-Auswertung
(The following text is in German, because the Excel sheet is in German, too.)
Mit diesem Excel Sheet
kann man Klausurergebnisse komfortabel auswerten, d.h., Noten erstellen und
kleine Statistiken erzeugen.
Hier sind 3 Beispiel-Snapshots:
Bsp 1,
Bsp 2,
Bsp 3 (verschiedene Ausschnitte desselben
Excel-Sheets).
Folgende Dinge berechnet das Sheet automatisch:
- Pro Student: Summe der Punkte und Note,
- Histogramm über die Gesamtpunkte,
- Histogramm über die Noten,
- Durchfallquote,
- Für jede Aufgabe ein Histogramm der erreichten Punkte,
- Farbkodierung der Noten,
- auf einem zweiten Sheet eine anonymisierte Tabelle der Noten, so
daß daraus sehr einfach eine HTML-Tabelle erzeugt werden kann;
Alle diese Dinge werden automatisch berechnet, sobald man eine der Eingaben
ändert (z.B. Punkte in einer Aufgabe, Schwellwerte, etc.).
Folgende Daten muß man eingeben:
- Pro Student: die erreichten Punkte in jeder Aufgabe;
- Je einen Schwellwert für die Note 1.0 und 4.0;
Eine kurze Anleitung und Erläuterungen sind im Excel-Sheet enthalten.
Bemerkung:
Beim Öffnen muß man "enable macros" anklicken (ansonsten funktioniert
die Aktualisierung der Farbcodes der Noten nicht; alles andere funktioniert aber
weiterhin).
Make Proceedings from many PDFs
This page
explains an easy method to produce a single PDF (such as a
proceedings) from a bunch of PDFs, such that the pages of the single PDF have
headings and consecutive page numbers.
Print Your Mac's IP
This little script prints your external
as well as your internal IP on the command line.
These two IPs might be different if you are behind a router or a NAT
device.
The script is written in Python (which is installed on your Mac).
Find Duplicate Files on the Mac
Here is a little command line tool for Mac OS
X (10.4, Tiger) that finds duplicate files in a directory tree. Just put the
binary somewhere in your PATH, e.g.,
~/bin.
Details:
Find files that are (byte-wise) identical,
but are (possibly) scattered among different directories.
This might happen, for instance, if you copy a large directory
tree and (accidentally) resolve symbolic links during the copying.
The output (on stdout) consists of two lists (mainly):
first a list of files that have been found to be equal, one file
per line, and the last file within each group of equal files
gets a period appended;
second, the list of duplicates sorted by complete pathname.
Special files, like .DS_Store, are not considered.
Also, special directories, like CVS, are skipped.
In addition, only regular files are considered,
no symbolic links or other special files.
The implementation uses a number of optimization tricks to speed up
the search. On my G4, scanning a directory tree consisting of 40,000 files
in total, containing 7,000 duplicates, took about 3 minutes.
And here is the source code as
XCode 2.4 project.
Screen Saver for the Mac
If you are looking for a "slide show" or "picture flow" screensaver
that offers you more control over the display than Apple's built-in screensaver,
then ArtSaver might be right for you.
It is mostly geared towards people who want to see their image collections (such as
beautiful landscape shots or fine art) as large as possible, and with the info which
images they are seeing.
(Here is also some
praise in French", thanks to Jean Devriendt.)
So, here is ArtSaver version 2.1.
Some of its options and features are the following:
- Keeps a persistent database of all the images found in the
specified directory tree or iPhoto album. This has the following benefits:
- handles huge image databases,
- displays images immediately when started, and,
- does not "exercise" the disk every time it gets invoked.
I have tested my screensaver with directory trees containing about
150,000 images (scattered among about 300,000 other files).
-
Use all images in a directory tree (minus the ones that are
excluded by other options, see below), or all images in one of your
iPhoto albums.
- You can review the previous images (cursor keys), pause
the slide show (space bar), or have ArtSaver
show the current one in Finder (return key).
- Options include:
- the speed of the gradual zoom-in and out (Ken Burns effect);
- the duration how long an image is displayed;
- whether or not the path of the image should be displayed, too.
(instead of the complete path, ArtSaver can also display just the
filename.)
- whether or not ArtSaver should use Spotlight for finding all images in a given
directory tree (with Spotlight it is faster, but sometimes Spotlight
does not find all the images, or none at all, and then the other
option can be quite valuable);
- many many more ...
- You can specify constraints to exclude certain images:
- the minimal size in pixels (for instance, thumbnails);
- the minimal size in bytes;
- a list of file patterns; if the path of an image matches
one of the patterns, it gets excluded (for instance, "index
prints").
- You can review the file names that ArtSaver has displayed afterwards
(see the Help button in the Options pane).
- Observes the EXIF-orientation tag
ArtSaver 2.1 works under both Mac OS 10.5 (Leopard) and 10.6 (Snow Leopard);
Installation: as usual,
download the disk image,
open it (if your Mac hasn't done it for you),
and double-click on ArtSaver.saver.
(If you want to install it "by hand", then copy ArtSaver.saver
either to the directory /Library/Screen Savers
or ~/Library/Screen Savers
in your home.)
ArtSaver should work out-of-the box with its built-in defaults.
However, in ArtSaver's Options pane you'll probably want to
specify the directory where ArtSaver
can find the images (default = ~/Pictures), and whether and how ArtSaver
should display the image name. All other options in the other two sections
probably work by default, but they are there if you need to change them.
When you close the Options pane, ArtSaver recursively
scans the directory tree containing the files, and saves the list of images
in a database (its plist file).
After that, every time ArtSaver gets invoked, it will just read this list, and never
has to go through the whole directory tree, which can be a huge time savings, if there
are many images.
Scanning a directory tree of 300,000 files (150,000 of which are
images) takes about 1 minute on my Intel-based Mac Book Pro as of 2008
(both with or without using Spotlight).
The
Change Log at the bottom of the
Read-Me explains the changes over the previous version.
If you enjoy this screen saver, I would really appreciate a
donation via paypal.
(It would also keep me motivated to make further enhancements ;-) )
Please notice that I put ArtSaver under
a copyright and license
that basically says it's free for personal use but not for commercial use.
And here is the source code as XCode 3.2 project.
And the
single source file (for Google's database ;-) ).
If you have any comments or suggestions, please don't hesitate to send me an
email at
zach
in.tu-clausthal.de.
Convert CSV to Mail Aliases
I transfered all my contacts from my good old Revo to a Siemens CX65.
But I send my email under Linux using mutt.
So here is a little Perl script that converts a CSV file into
a file containing an email alias for each name.
Prerequisite: the Perl module Text::xSV
(see the man page perlmodinstall for installation instruction).
Gabriel Zachmann
Last modified:
Thu May 13 15:50:31 MDT 2010