How to fetch field(s) from MySQL query result in bash

In case you want to fetch/export the result of a mysql query into a text file, but you don´t have the option to use the OUTFILE command you can simple use the following bash command:

:~$ mysql -u USER -p PASSWORD -h HOST --silent --skip-column-names -e 'select field1, field2, field3 from table' > query-result.csv

Eierlikörtorte

Boden

  • 1 Biscuit-Boden (ggf. fertig)

Creme

  • 6 Eier
  • 90 g Zucker
  • 70 g Mehl
  • 20 g Kakaopulver
  • 9 Blatt Gelatine
  • 100 g weiche Butter
  • 100 g Puderzucker
  • 2 Pck. Vanillezucker
  • 1 Pck. Dr. Oetker ParadiesCreme Stracciatella
  • 1 Pck. Frischkäse
  • 1/4 Liter Eierlikör
  • 500 g Schlagsahne

Deko

  • 2 Pck. Waffelröllchen mit Schokolade, á 100 g
  • 2 EL Schokoladenraspel

3 Eier mit 3 EL Wasser schaumig schlagen. Zucker 3-4 Minuten unterschlagen. Mehl und Kakao dazusieben und vorsichtig unterheben.

Den Biscuitteig in eine mit Backpapier ausgelegte Springform (26 cm Ø) streichen. Im vorgeheizten Backofen 200°C, 15-20 Minuten backen. Auskühlen lassen (entfällt bei einem fertigen Tortenboden).

Gelatine in kaltem Wasser einweichen.
Butter, Puderzucker und Vanillinzucker cremig rühren. Die übrigen 3 Eier trennen.
Eigelb und Eierlikör, bis auf 2 EL, in die Buttermischung rühren. Gelatine ausdrücken, bei milder Hitze auflösen und langsam unter die Masse rühren. Masse leicht gelieren lassen, Frischkäse dazugeben. Inzwischen die Sahne mit der Paradiescreme (statt Milch) steif schlagen. Eiweiß ebenfalls steif schlagen. Nun erst die Sahne, dann das Eiweiß unterheben.
Als Tortenrand die Waffelröllchen um den Biscuit legen, Röllchen abwechselnd mit der Schokoseite nach oben und unten senkrecht aufstellen.
Anschließend die Likör-Sahne einfüllen und glatt streichen. Mit dem übrigem Eierlikör beträufeln und zum Abschluss die Schokoraspeln darüber streuen.

Die Torte im Kühlschrank 4-5 Stunden fest werden lassen (am besten über Nacht).

Working with ‘tmux’

Working with ‚tmux‘ enables a number of terminals to be created, accessed, and controlled from a single screen in Unix. The screen can be splitted vertically and horizontally (called panes). Like ’screen‘ tmux can handle different sessions.

Get a list of running, named tmux sessions
~$: tmux ls

Create a new named tmux session
~$: tmux new-session -s [sessionname]

Reopen an existing tmux session
~$: tmux a -t [sessionname]

Shortcuts within a session:
Managing windows
Ctrl+b c: Open/Create a new window within a tmux session
Ctrl+b ,: Rename the current window
Ctrl+b n: Switch to next windows
Ctrl+b p: Switch to previous window
Ctrl+b w: List all windows
Ctrl+b 0-9: Switch to window 0-9 of the tmux session

Managing panes
Ctrl+b %: Split window vertically
Ctrl+b „: Split window horizontally
Ctrl+b arrow key: Switch pane
Hold Ctrl+b, don’t release it and hold one of the arrow keys: Resize pane
Ctrl+b [: Start copy mode. Simply quit with q. PgUp/PgDown lets you scroll up/down.
Ctrl+b q: Show pane numbers
Ctrl+b {: Move current pane left
Ctrl+b }: Move current pane right
Ctrl+b &ltspace>: Toggle through different pane layouts
Ctrl+b !: Break pane into its own window

Ctrl+b : setw synchronize-panes on/off: Synchronize commands to all panes

Managing Session
Ctrl+b $: Rename current session
Ctrl+b d: Detach current session
Ctrl+b &: Kill current session

Ctrl+b :: Open command prompt
Ctrl+b x: Exit terminal
Ctrl+b ?: Help

1: Detaching a session will leave it (and all its windows) but let it run in the background
2: Exit a pane/window will close it and it´s commands.

Download my .tmux.conf

External resources:
– http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/
– http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/
– http://lukaszwrobel.pl/blog/tmux-tutorial-split-terminal-windows-easily/

Install Oracle (Sun) Java SDK on Ubuntu Linux

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer

# if installed parallel to OpenJDK
sudo update-java-alternatives -s java-6-oracle
# or
sudo apt-get install oracle-java6-set-default