Posts Tagged ‘Arbeit’

InDesign: Sprache für ganzes Dokument ändern

Monday, March 8th, 2010

InDesign Es gibt zwei Möglichkeiten die Sprache für das Text- und Absatzformat in InDesign zu ändern. Wenn wir allerdings nicht für jedes Textfeld die Sprache ändern wollen, müssen wir uns eines Workarounds bedienen. Schließlich gibt es kein “Sprache für Dokument ändern”. Dann wollen wir mal:
(more…)

Cheatsheet: moving data from one server to another

Wednesday, January 20th, 2010

This article is about moving a running web-environment along with it’s MySQL database from one server to another via SSH.

Compress files

Let’s compress the directory we’re going to move using gzip:

tar cfvz backup.tar.gz /path/

Dump MySQL database content

mysqldump -uUser -p -hlocalhost database_name > dump.sql

You can also dump several databases with mysqldump by addind the --databases or --all-databases parameter.

Moving files

Now we use SCP to move files to our new machine. The following example copies from the old machine:

scp user@host:/path/backup.tar.gz .

The other way round, copying the file to the new machine from the old one would look like this:

scp backup.tar.gz user@host:/path/backup.tar.gz

Do the same with your database dump.

Uncompress files

Simply type:

tar xfvz backup.tar.gz

Now we should have the same directory structure we had on our old machine.

Import MySQL database

mysql -uUser --default-character-set=utf8 -hlocalhost -p database_name < dump.sql

If you have international content and an utf-8 environment running don’t forget to pass the charset-parameter!

select any HTML text in element with jQuery

Thursday, November 19th, 2009

The following script jQuery extension selects any text from a given jQuery selector. Tested with Firefox and Safari – should work in IE6+ as well.

jQuery.fn.extend({
  selectText: function() {
    var text = $(this)[0];
    if ($.browser.msie) {
      var range = document.body.createTextRange();
      range.moveToElementText(text);
      range.select();
    } else if ($.browser.mozilla || $.browser.opera) {
      var selection = window.getSelection();
      var range = document.createRange();
      range.selectNodeContents(text);
      selection.removeAllRanges();
      selection.addRange(range);
    } else if ($.browser.safari) {
      var selection = window.getSelection();
      selection.setBaseAndExtent(text, 0, text, 1);
    }
    return $(this);
  }
})

To use it simly do:

var shortSelector = $('#name').selectText();
var longSelector = $('ul#names li:contains("Hampel")').selectText();

written on top of Source and Source

HTML to PDF Library for PHP 5

Wednesday, July 8th, 2009

DomPDF HTML to PDF As I had to build a simple html to pdf converting for a client using php, I found a beautiful library called DOMPDF written by Benj Carson.

It seemed to be very lightweight and uncomplicated, which turned out to be true. In a standard case it really is as simple as

$pdf->load_html($html);

I am going to talk about the basic usage and problems I had to solve, specially with umlauts / non latin characters.
(more…)

TalentRun startet heute

Monday, December 17th, 2007

Mein neuestes Projekt in Sachen Frontend Entwicklung für die Firma TalentRun GmbH in Hamburg neigt sich seinem Ende und ist heute als Beta für Freunde und Tester auf talentrun.de online gegangen.

Aktuelle Infos findet Ihr zum Beispiel im Videointerview mit Gruenderszene.de auf Sevenload oder in der letzten Pressemeldung der GEMA

Wer die Plattform testen möchte, kann sich natürlich gern melden und seine Freischaltung beschleunigen.
Anbei noch eine kleine Beschreibung der Grundidee der Karaoke-Plattform..
(more…)