instant-thinking.de

just enough to get you started and leave you confused

QuickLinks vom 02. Mai bis zum 17. Mai

| Comments

Meine pinboard.in-Links vom 02. Mai bis zum 17. Mai:

  • pysprinklers - the PySprinklers project is a homebrew intelligent sprinkler system designedto conserve water by not running the sprinklers if it had rained.
  • musicForProgramming(); - A series of mixes intended for listeningwhile programming to aid concentrationand increase productivity (also compatiblewith other activities).
  • stringer - A [work-in-progress] self-hosted, anti-social RSS reader. Stringer has no external dependencies, no social recommendations/sharing, and no fancy machine learning algorithms. But it does have keyboard shortcuts (hit ? from within the app) and was made with love! When BIG_FREE_READER shuts down, your instance of Stringer will still be kicking.
  • ToDoFlow - provides an API for interacting with todo lists in plain text files with taskpaperlike format with powerful query syntax. It provides functions to modify lists and to convert them to markdown, html and XML used in Alfred2 workflow.
  • fasd - (pronounced similar to “fast”) is a command-line productivity booster. Fasd offers quick access to files and directories for POSIX shells. It is inspired by tools like autojump, z and v. Fasd keeps track of files and directories you have accessed, so that you can quickly reference them in the command line.
  • pro - is a command to wrangle your git repositories. It includes features like instantly cd’ing to your git repos and getting a status overview, and running an arbitrary command in every git repo.
  • entr - The Event Notify Test Runner is a general-purpose UNIX utility intended to make rapid feedback and automated testing natural and completely ordinary.
  • VisualAck - is like grep (or ack), except faster and with UI. For Mac.
  • Palua - quickly switch the mode of your Function Keys on any Mac keyboard by Hotkey or based on active Application.
  • Light Table - is a new interactive IDE that lets you modify running programs and embed anything from websites to games. It provides the real time feedback we need to not only answer questions about our code, but to understand how our programs really work.

Excel? Ich habe hier diese Shell…

| Comments

Oft, sehr oft, ist Excel das Mitel der Wahl um Daten aus verschiedenen Quellen zusammen zu fassen. Häufig, sehr häufig, kann man das auch auf der Shell mit einer Reihe von ein- oder zweizeiligen Scripten erledigen. Und öfter, immer öfter, ist man mit ein paar relativ unbekannten Befehlen1 deutlich schneller als mit dem GUI-Monster, das Excel nun mal ist. Und wann immer man so etwas automatisieren möchte, sind Scripte2 wirklich das, was man benutzen möchte.

Hier sei exemplarisch das zusammenführen von zwei einfachen Textdateien mittels paste und die Numerierung der Zeilen des Ergebnisses mit nl gezeigt:

paste und nl in Aktion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 ~ >  cat a.txt
foo
bar
fnord

 ~ >  cat b.txt
blue
red
green

 ~ >  paste a.txt b.txt > c.txt

 ~ >  nl c.txt
     1  foo     blue
     2  bar     red
     3  fnord   green

Irre, oder?

Das ganze funktioniert natürlich auch mit CSV-Dateien die wesentlich größer sind als diese kleinen Beispiele3

(via: Gareth)

  1. Siehe dazu auch combine und pee aus den moreutils

  2. Wiederholbare Ergebnisse und einfache Revisionsverwaltung seien hier die Stichwörter…

  3. Und damit gelegentlich auch die maximale Zeilenanzahl von Excel 2003 sprengen…

QuickLinks vom 14. April bis zum 29. April

| Comments

Meine pinboard.in-Links vom 14. April bis zum 29. April:

  • Notepad2 - a fast and light-weight Notepad-like text editor with syntax highlighting. This program can be run out of the box without installation, and does not touch your system’s registry.
  • BitTorrent Sync - is a simple tool that applies p2p protocol for direct live folder sync with maximum security, network speed and storage capacity. It has native versions for Mac, Windows and Linux, as well as native NAS integration.
  • Contextinator - lets you divide your web browsing sessions into projects and manage all of their related information. A project is a collection of browser tabs opened in the same window, series of filters in existing applications (Gmail, Evernote, Dropbox, etc.), bookmarks, people and tasks.
  • Bash $PS1 Generator - This tool will help you generate a custom colorful bash prompt for Unix-like operating systems, including Linux and Mac OS X.
  • moreutils - is a growing collection of the unix tools that nobody thought to write long ago when unix was young.
  • Liquid prompt - is a smart prompt for the “Bourne-Again” Unix shell (bash) and for Zsh. The basic idea of the liquid prompt is to nicely display useful informations on the shell prompt, only when they are needed. It adds carefuly chosen colors to draw your attention on what differs from the normal context. Thus, you will notice what changes, when it changes, because you do not become accommodated to informations that are always displayed in the same way.
  • shelr.tv - allows you to record something interesting from your terminal and share it to your followers. It is almost the same thing as YouTube but for plain text shellcasts. You can copy and paste everything you see.
  • Maid - keeps files from sitting around too long, untouched. Many of the downloads and temporary files you collect can easily be categorized and handled appropriately by rules you define. Let the maid in your computer take care of the easy stuff, so you can spend more of your time on what matters.Think of it like the email filters you might already have, but for files. Worried about things happening that you don’t expect? Maid doesn’t overwrite files and actions are logged so you can tell what happened. Maid is inspired by the Mac OS X shareware program Hazel. Think of Maid as “Hazel for hackers”. Your rules are defined in Ruby, so simple rules are easy and difficult rules are possible. This also makes Maid a great general-purpose advanced file renaming tool.
  • wemux - enhances tmux to make multi-user terminal multiplexing both easier and more powerful. It allows users to host a wemux server and have clients join in either Mirror, Pair or Rouge Mode. It features multi-server support as well as user listing and notifications when users attach/detach.
  • jrnl - is a simple journal application for your command line. Journals are stored as human readable plain text files - you can put them into a Dropbox folder for instant syncing and you can be assured that your journal will still be readable in 2050, when all your fancy iPad journal applications will long be forgotten. jrnl also plays nice with the fabulous DayOne and can read and write directly from and to DayOne Journals. Optionally, your journal can be encrypted using the 256-bit AES.

Hochzeitstag

| Comments

Heute vor drei Jahren haben Kathi und ich geheiratet.

Ich wünsche der besten Ehefrau der Welt und mir eine wundervolle lederne Hochzeit1 und freue mich auf das nächste Jahr im aufregenden Hafen der Ehe.

  1. Es gibt wirklich wunderliche Listen im Internet…

TV-Serien mit Handbrake rippen

| Comments

Filme von DVDs zu rippen ist einfach. Man nimmt einfach Handbrake, schaut nach dem DVD-Titel mit der längsten Spieldauer und legt los.

Blöd ist es, wenn es sich bei der DVD um eine Serien-DVD handelt und die einzelnen Folgen in die Titel der DVD verpackt sind. Das schaut etwa bei der fünften Staffel von Lauras Stern1 so aus:

Der erste Titel enthält alle Folgen am Stück, der elfte ist ein elfsekündiger Warner-Brothers-Jingle. Dazwischen befinden sich die neun einzelnen Folgen die ich eigentlich haben will.

Die einzige Möglichkeit die man hier nun regulär hat, sich wenigsten ein bisschen elend nervtötendes auf-den-Computer-warten-bis-der-mal-fertig-mit-einer -Folge-ist zu ersparen, ist die Queue.

Das bedeutet, jeden gewünschten Titel einzeln auszuwählen und in die Queue zu stellen. Wenn alle da sind gibt man Handbrake das Start, und es werden alle Titel am Stück mit den gewählten Einstellungen gerippt. Weitere Automatisierungsmöglichkeiten gibt es in der GUI nicht.

Daher ist es ein Glück, dass Handbrake auch als CLI-Applikation angeboten wird. Diese kann man einfach herunterladen und irgendwo in den eigenen $PATH legen. ~/bin bietet sich da an2.

Um nun alle neun Folgen zu rippen ohne auch nur einen Klick tätigen zu müssen genügt ein Einzeiler in der Shell:

Lauras Stern Beispiel
1
for i in `seq 2 10`; do f=$(($i-1)); HandBrakeCLI -i ~/Movies/DVD-Rips/LAURAS_STERN_VOL5.dvdmedia/ -t $i --preset "High Profile" -o Lauras.Stern.S05E$f.mp4; done

Diese Zeile ist im Prinzip ein einzelner for-Loop, der in der Variablen i mit Hilfe von seq die Zahlen von 2-10 durchläuft. In jedem Durchlauf wird als erstes die Variable f mit i weniger 1 belegt. Alsdann wird HandBrakeCLI aufgerufen. Hinter -i befindet sich die Input-Datei. Hier ein bereits mit RipIt auf die Festplatte gebanntes DVD-Image3. Hinter -t wird der zu rippende Titel aus der Variablen i bestimmt. Das benutzte Handbrake-Preset ist das High Profile. Hinter -o folgt dann noch ein passend benannter Dateiname in dem die Variable f jeweils für die passende Numerierung der Folgen sorgt.

So spart man sich auch noch die Umbenennerei und hat die Dateinamen in einem schönen Format, um automatisierten Meta-Daten Ergänzern wie iFlicks einen guten Start zu verschaffen.

(For-Loop via: MetaFilter. Doppelklammern-Syntax via: Bashguru.)

  1. Ja, ich könnte den Titelsong singen wenn man mich nachts um drei weckte und drum bäte. Fehlerfrei.

  2. Wie das ganze unter Windows funktioniert kann ich leider nicht sagen…

  3. Mit dem ensprechenden Pfad würde es aber auch eine DVD im Laufwerk tun…

QuickLinks vom 13. März bis zum 09. April

| Comments

Meine pinboard.in-Links vom 13. März bis zum 09. April:

  • Robot Framework - is a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD). It has easy-to-use tabular test data syntax and it utilizes the keyword-driven testing approach. Its testing capabilities can be extended by test libraries implemented either with Python or Java, and users can create new higher-level keywords from existing ones using the same syntax that is used for creating test cases.
  • dArt - is a simple, non-interactive command line tool to fetch artwork from Apple’s servers. It supports songs, music videos, movies, short films, TV shows, iBooks, audiobooks, OS X/iOS apps and podcasts.
  • PushDialer - Initiate outbound phone calls on your iPhone from your computer using Push Notifications.
  • huginn - is a system for building agents that perform automated tasks for you online. They can read the web, watch for events, and take actions on your behalf. Huginn’s Agents create and consume events, propagating events along a directed event flow graph. Think of it as Yahoo! Pipes plus IFTTT on your own server. You always know who has your data. You do.
  • SCM Breeze - is a set of shell scripts (for bash and zsh) that enhance your interaction with tools such as git. It integrates with your shell to give you numbered file shortcuts, a repository index with tab completion, and many other useful features.
  • ponysay - cowsay reimplemention for ponies.
  • Selfoss - The new multipurpose rss reader, live stream, mashup, aggregation web application.
  • osxmonad - This is a library which allows XMonad to manage Mac OS X windows.
  • Antigen - is a small set of functions that help you easily manage your shell (zsh) plugins, called bundles. The concept is pretty much the same as bundles in a typical vim+pathogen setup. Antigen is to zsh, what Vundle is to vim.
  • FileBot - is the ultimate tool for organizing and renaming your movies, tv shows or anime, and music well as downloading subtitles and artwork. It’s smart and just works.

Ponysay

| Comments

Seit Urzeiten gibt es diese Anwendungen, die eigentlich niemand braucht, die aber trotzdem total cool sind, weil es eben geht.

Ein Paradebeispiel ist ponysay. Ein wrapper für cowsay im My little Pony style

Next up:

funfact | ponsay in die .bashrc schreiben, in der funfact schon echt lange dieses alias ist:

funfact alias
1
alias funfact="elinks -dump randomfunfacts.com | sed -n '/^| /p' | tr -d \|"

Weil es geht.

Musik DVDs zu MP3 rippen mit OS X

| Comments

Ich habe da einige echt tolle Musik DVDs im Regal stehen. Die gefallen mir so gut, die würde ich auch gerne mal einfach nur hören. Beim laufen. Beim Auto fahren. So ging es mir etwa mit der wirklich sehr schönen1 DVD An Evening with the Dixie Chicks. Gute Idee, da gibt es doch sicher was in diesem Internet…

Ich machte mich also auf, um erneut2 Geld auszugeben und die Tracks als Audio-Version zu erstehen. Eine recht naive Idee wie sich heraus stellen sollte…

Audio-Version kaufen - Geld ausgeben im Internet ist manchmal schwierig

iTunes so: “Vielen Dank für deine Suchanfrage, wir haben hier diese wunderbare Videodatei3…”

Ich so: “Narf. Danke, aber das habe ich ja schon hier als DVD rumstehen…”

Amazon so: “Vielen Dank für deine Suchanfrage, wir haben hier diese wunderbare DVD…”

Ich so: “Narf. Ja, genau diese DVD. Habe ich schon. Ich möchte Audio only. Was ist denn bloss so schrecklich schwer daran?”

Pirate Bay so: “Vielen Dank für deine Suchanfrage, wir haben hier diese wunderbaren Country MP3@320kbps…”

Ich so: “Tja. Seufz.”

Was also tun? Immerhin ist dieser BitTorrent Kram nicht für jeden etwas und es ist ja möglich4, dass die nächste DVD nicht als Audio-Rip vorliegt.

DVD zu Audio rippen - Selber machen ist manchmal leichter

Also macht man das eben selbst. Ich finde das ist ethisch sehr vertretbar.

Ich habe versucht, den Kram, den ich ja doch schon besitze, noch einmal zu kaufen und habe davon abgesehen, meinen Kram durch einen BitTorrent Download anderen Leuten zur Verfügung zu stellen, die die DVD potentiell eben nicht im Regal stehen haben. Also: Good Karma.

So habe ich das getan:

DVD rippen

Um an den DVD-Content zu kommen nimmt man heute üblicherweise Handbrake. Hier, wie üblich, den längsten Titel, nämlich den Hauptfilm, auswählen und im Preset Drawer Regular / Normal einstellen.

Wenn der Rip nur für das Audio gedacht ist, kann man die Video-Qualität auch auf Egal stellen und so einiges an Encoding Zeit und CPU-Cycles sparen. Dazu einfach die Video Quality per Constant Quality konfigurieren und den langen Regler ganz nach links ziehen.

Das ganze klappt natürlich auch mit total fancy gerenderten Rips in awesome Qualität. Nur das encoden ist dann eben aufwändiger und dauert länger.

Bei den Audio-Einstellungen sollte dagegen nicht gespart werden. Dort wählt man, sofern vorhanden, den 2.0 ch Track aus. Ein 5.1 ch Track tut es auch, ist dann aber eben nicht professionell auf Stereo runtergemixt worden.

Als Codec wird AAC (CoreAudio) benutzt, Mixdown ist Stereo, die Samplerate bleibt auf Auto und die Bitrate wird auf 320 erhöht.

Zum Schluss noch sicherstellen, dass unter Chapters das Erstellen von Kapitelmarken aktiviert ist.

Dann kann Handbrake zu Werke gehen und aus der DVD eine Datei erstellen.

Audio extrahieren

Man nehme anschliessend das kleine und sehr feine Extract Movie Soundtrack um die Audio-Informationen aus der Video-Datei zu extrahieren.

Mit den Standard-Einstellungen exportiert das Programm pro gefundenem Kapitel eine AIFF-Datei auf den Desktop. Das ist ein verlustfreies Format und genau so schon in iTunes abspielbar.

In iTunes hineingeworfen kann man die Songs dann taggen, mit CoverArt versehen und auch in AAC- oder MP3-Dateien umwandeln. Ganz wie es beliebt.

Fazit

In einer idealen Welt läge jeder Musik-DVD ein Download-Coupon bei, mit dem man sich die Songs dann einfach als fertige Audio-Dateien herunterladen könnte5. In einer etwas weniger idealen Welt6, wäre es immerhin möglich sich den Audio-Teil noch einmal als CD oder Download zu kaufen.

Aber bis es soweit ist, kann man ja auch so verfahren und sich unterwegs an Musik erfreuen, die ansonsten ein trauriges und eher stilles Dasein im Regal gefristet hätte.

Good Karma.

(via: ifunia.com)

  1. Ja, ich höre Country. Und Western…

  2. In Worten: Erneut!

  3. Nur im US-Store, versteht sich von selbst…

  4. Wenn auch höchst unwahrscheinlich…

  5. Das könnte man sich ja, beispielsweise, von Vinyl-LPs abschauen…

  6. Ausser man betrachtet die Sache von der Industrie-Seite…

QuickLinks vom 01. März bis zum 13. März

| Comments

Meine pinboard.in-Links vom 01. März bis zum 13. März:

  • Paperless - is a command-line tool for Mac OS X that will help you automate your paperless workflow from your scanner to your e-filing cabinet. Paperless analyzes your scanned documents and processes them through a set of user defined rules. These rules determine how and where to file the document. The entire process is entirely automated so that all you need to do is press the scan button on your scanner! While you can run Paperless directly from the command-line (via Terminal.app), it would work best if it were combined with an application like Hazel or folder actions. If your scanner is configured to place a document directly into a folder (ScanSnap is awesome), these tools can automatically launch Paperless to tag and process your document so that you never have to look at it again. (Well until you need to actually find it.)
  • Ry’s Objective-C Tutorial - This tutorial is the place to learn the Objective-C programming language. It’s designed to serve as both a concise quick-reference and a comprehensive introduction for newcomers to the language. A familiarity with basic programming concepts like variables, functions, and objects is recommended, but not strictly required.
  • Ry’s Git Tutorial - is a complete introduction to distributed version control with a focus on practical command line usage. We explain Git’s robust branching, merging, and collaboration capabilities from the ground up, so prior experience with centralized systems like SVN or CVS is not required. This tutorial is an updated release of Ry’s Friendly Guide to Git, an e-book originally published through the Amazon Kindle Store for $6. It is now available free of charge.
  • Defer - is a Google Chrome extension to save your links to any of the most popular services for reading later: Instapaper, Readability, Pocket, and Kippt.
  • Mininet - creates a realistic virtual network, running real kernel, switch and application code, on a single machine (VM, cloud or native), in seconds, with a single command. It is a network emulator which creates a network of virtual hosts, switches, controllers, and links. Mininet hosts run standard Linux network software, and its switches support OpenFlow for highly flexible custom routing and Software-Defined Networking. Mininet supports research, development, learning, prototyping, testing, debugging, and any other tasks that could benefit from having a complete experimental network on a laptop or other PC.
  • Windows 95 Tips, Tricks, and Tweaks - Windows needs a lock of your hair to continue…
  • Slogger - indexes various public social services and creates Day One (http://dayoneapp.com/) journal entries or plain text Markdown files for them. It allows you to keep a personal journal that collects your online social life automatically, all in one place.
  • git-remote-gcrypt - a git remote helper for GPG-encrypted remotes. The aim is to provide confidential, authenticated git storage and collaboration using typical untrusted file hosts or services.
  • Koken - is a free system designed for photographers, designers, and creative DIYs to publish independent websites of their work. Koken comes with a free publish services plugin for Adobe Photoshop Lightroom that makes updating, editing and replacing content easy.
  • CamStudio - is able to record all screen and audio activity on your computer and create industry-standard AVI video files and using its built-in SWF Producer can turn those AVIs into lean, mean, bandwidth-friendly Streaming Flash videos (SWFs)

Gone fishing

| Comments

Heute geht es mit einem großen Teil der buckligen Verwandtschaft Sippschaft Familie in den Urlaub. Wir werden die Insel Texel heimbesuchen und hoffentlich ein paar feine Tage bei bestem Wetter im Ferienpark De Krim verbringen.

Zwanzig Leute1 in einem Haus, das wird sicher ein großartiges Abenteuer für alle Beteiligten. Wenn alles gut geht, sprechen wir auch sicher in einer Woche noch miteinander…

Bis dahin, be good, take care.

(Das Texel-Bild ist von der NASA via den Wikimedia-Commons)

  1. Davon sechs Kinder zwischen 6 Monaten und 5 Jahren…