Vim Cheat Sheet

To turn off autoindent when you paste code, there’s a special «paste» mode. Type :set paste Then paste your code. Note that the text in the tooltip now says — INSERT (paste) –. After you pasted your code, turn off the paste-mode, so that auto-indenting when you type works correctly again. :set nopaste

Read More

PostFinance User Agent auf Nginx

Wenn Nginx im Einsatz ist, muss bei der Verwendung des PostFinance E-Payment Gateways in einem Shop sicher gestellt werden, dass der Useragent ‹Mozilla/3.0 (compatible; Indy Library)› vom Server nicht blockiert wird, da PostFinance diesen bei Callbacks verwendet. Wir hatten hierzu von WPengine folgendes Feedback erhalten: I have the server configured to allow connections with that Mozilla/3.0 (compatible; […]

Read More

MySQL Import auf 1&1 Konsole

Bei einem Import auf der Konsole muss der Socket explizit mit angegeben werden. mysql -uusername -p -S /tmp/mysql5.sock database < dump.sql Weitere Infos dazu im 1&1 Hilfe Center. In der Magento local.xml ist dann analog auch folgendes als Host zu verwenden: <host><![CDATA[/tmp/mysql5.sock]]></host>

Read More

SMTP Mail Versand mit swaks testen

swaks ist das Swiss Army Knife für SMTP. swaks› primary design goal is to be a flexible, scriptable, transaction-oriented SMTP test tool. It handles SMTP features and extensions such as TLS, authentication, and pipelining; multiple version of the SMTP protocol including SMTP, ESMTP, and LMTP … Wenn man den Mail Versand per SMTP schnell testen möchte ohne sich […]

Read More

MySQL Dump und Import

Dump Auf der Konsole kann man auch grössere Datenbanken sehr schnell exportieren oder dumpen. mysqldump -uusername -ppassword database_name > dump.sql Import Um die dump.sql Datei anschliessend in eine andere Datenbank zu importieren verwendet man das mysql Utility wie folgt: mysql -uusername -ppassword other_database_name < dump.sql Tabellen löschen Falls man einen Dump ohne DROP TABLE Statements hat, kann man […]

Read More

Die Konfiguration der Name-Server erfüllt unsere Empfehlungen nur teilweise

Folgende Warnmeldungen von nic.ch (Switch) können ignoriert werden, da diese lediglich bedeuten, dass die IP-Adresse des Name-Servers ns6.openstream.ch dort nicht einzeln eingetragen ist, was allerdings auch nicht zwangsläufig notwendig ist. Warning: Es können nicht alle IP-Adressen, die für diesen Name-Server in unserer Datenbank eingetragen sind, im DNS gefunden werden. Folgende IP-Adressen sollten vom Hostmaster im […]

Read More

Shell Commands Cheat Sheet

Find files modified within last 10 minutes [crayon]find . -type f -mmin -10 -exec ls -al {} \;[/crayon] Find files modified within last 24 hours [crayon]find . -type f -mtime -1 -exec ls -al {} \;[/crayon] Run Siege Benchmark [crayon]siege -c10 -b -i -t15s http://www.yourstore.ch[/crayon] Convert multiple PSD files to JPG with ImageMagick [crayon]mogrify -format jpg […]

Read More

Dateirechte ändern

WordPress [crayon] cd path/to/wordpress find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; chmod 660 wp-config.php chmod 664 .htaccess find wp-content -type d -exec chmod 775 {} \; find wp-content -type f -exec chmod 664 {} \; [/crayon] osCommerce [crayon] find htdocs/ -type f -exec chmod 660 {} […]

Read More