macfidelity

|

rethinking the think-different thing

Posts Tagged ‘perl’

Randnotiz | Monitor RAID status with Perl & Nerdtool/Geektool

Thursday, February 18th, 2010
Obiges Bild zeigt die Zeitsetzung ganz gut
Den Status eines RAIDS auf Dauer im Blick behalten
Da sich inzwischen im IRC Channel ##macintosh.de einige begeisterte Terminal-User treffen kam die Script-Lösung auch direkt aus diesem Kreise – danke nochmal an tschenz. Man könnte den Status natürlich auch einfach manuell im Terminal prüfen oder auf kommerzielle Programme die etwas weiter gehn wie hier beschrieben zurückgreifen – aber auf Dauer ist eine Geek/Nerdtool Variante  zumindest für die reine Info deutlich attraktiver – oder?

Step by Step

01. Script Download Das benötigte Perl Script findet ihr hier zum Download. Wo ihr dieses ablegt bleibt komplett euch überlassen 02. Geektool/Nerdtool Eintrag In meinem Falle kommt Nerdtool zum Einsatz – die relevanten Einstellungen zeigt der folgende Screenshot. 03. Zufrieden zurücklehnen Ganz einfach ;) Einige ergänzende Geektool/Nerdtool Ideen findet ihr u.a. hier im Blog. Beiträge der Kategorie Randnotiz erscheinen nicht auf der Hauptseite

mac | Der Terminal Wrapper cope

Sunday, December 20th, 2009

20091220_cope_01

Neben Virtualisierung ist auch das Terminal in Mac OS X ein Grundthema dieses Blogs. Nachdem ich neulich im IRC durch MartyD auf cope aufmerksam gemacht wurde will ich heute mal einen kurzen Blick auf dieses Projekt werfen – ich denke es dürfte für den einen oder anderen Leser hier eine interessante Sache darstellen.

Für Einstieger im Bereich Terminalanpassung empfehle ich zuvor / oder bei Fragen den Beitrag Snow Leopard Terminal einrichten.

(more…)

apps | Bitnami und Redmine im Quicktest

Tuesday, November 10th, 2009

20091110_bitnami_redmine_01

Eine der Lektionen aus der Walk-Entwicklung ist recht simpel und war eigentlich so auch fast absehbar

Die verwendeten Tools (Versionsmanagement, Tickets, Dokumenation etc) sollten gezielt ausgesucht werden – sich Hals über Kopf auf irgendeinen Ansatz zu verlassen führt leider oft im späteren Projektverlauf für etwaige Probleme.

Daher heute mal ein Blick auf Bitnami welches uns testwilligen Benutzern eine nette Hilfe sein kann.

(more…)

mac & apps | Skripte zu Mac Programmen wandeln mit Platypus

Thursday, July 23rd, 2009

20090723_Platypus_01

Heute gibt’s mit Platypus mal wieder eine Programmvorstellung aus dem Bereich Scripting / Developer Tools.

Das kleine Schnabeltier kann ein guter kleiner Helfer sein wenn man viel mit Skripten arbeitet und diese ohne großen Aufwand in Programme mit typischer Mac-App-Struktur umwandeln / verpacken will.

(more…)

Mac ::: Ack a grep replacement

Wednesday, November 28th, 2007

About ack:

ack is a tool like grep, aimed at programmers with large trees of heterogeneous source code.

ack is written purely in Perl, and takes advantage of the power of Perl’s regular expressions.

Found that via DaringFireball.net

Quote from the project page:

Top 10 reasons to use ack instead of grep.

  1. ack is pure Perl, so it runs on Windows just fine.
  2. The standalone version uses no non-standard modules, so you can put it in your ~/bin without fear.
  3. Searches recursively through directories by default, while ignoring .svn, CVS and other VCS directories.
    • Which would you rather type?
      $ grep pattern $(find . | grep -v .svn)
      $ ack pattern
  4. ack ignores most of the crap you don’t want to search
    • VCS directories
    • blib, the Perl build directory
    • backup files like foo~ and #foo#
    • binary files, core dumps, etc
  5. Ignoring .svn directories means that ack is faster than grep for searching through trees.
  6. Lets you specify file types to search, as in --perl or --nohtml.
    • Which would you rather type?
      $ grep pattern $(find . -name '*.pl' -or -name '*.pm' -or -name '*.pod' | grep -v .svn)
      $ ack --perl pattern

    Note that ack’s --perl also checks the shebang lines of files without suffixes, which the find command will not.

  7. File-filtering capabilities usable without searching with ack -f. This lets you create lists of files of a given type.
    $ ack -f --perl > all-perl-files
  8. Color highlighting of search results.
  9. Uses real Perl regular expressions, not a GNU subset.
  10. Allows you to specify output using Perl’s special variables
    • Example: ack '(Mr|Mr?s)\. (Smith|Jones)' --output='$&'
  11. Many command-line switches are the same as in GNU grep:
    -w does word-only searching
    -c shows counts per file of matches
    -l gives the filename instead of matching lines
    etc.
  12. Command name is 25% fewer characters to type! Save days of free-time! Heck, it’s 50% shorter compared to grep -r.

LAMP environment on Mac Part 2

Wednesday, September 12th, 2007

If i ever need a quick-deployed (L)AMP-env on my mac i am using MAMP.

Some days ago i realized there is another quick-solution called: xampp

Project quote:

XAMPP for Mac OS X is the simplest, most practical and most complete webserver solution for Mac OS X. The distribution includes an Apache 2 web server, integrated with the latest builds of MySQL, PHP (both 4 and 5) and Perl. It comes as a Mac OS X Installer package which contains all the necessary files and requires no dependencies.

If you are an experienced web developer or a Mac enthusiast who needs to run a webserver, create dynamic webpages or use databases, this is your lucky day!
This version is for Mac OS X 10.4 (Intel) and higher.