cli

Sanitize emails in db

drush sqlq "UPDATE users SET mail = concat('myaddr+', replace(mail, '@', '_'), '@testdomain.org') WHERE uid > 0 AND instr(mail, '@testdomain.org') = 0;" && drush upwd --password=password admin

Pre-commit hook that checks for debug code

Run this on all repos - it adds a pre-commit hook to Git that checks for dpm statements, debug code, and things that probably shouldn't be committed to repos.

curl -fsSL http://gitscripts.s3.amazonaws.com/install | php

GZIP with tar command

Creating an archive using tar command

Creating an uncompressed tar archive using option cvf
This is the basic command to create a tar archive.

$ tar cvf archive_name.tar dirname/
In the above command:

c – create a new archive
v – verbosely list files which are processed.
f – following is the archive file name
Creating a tar gzipped archive using option cvzf
The above tar cvf option, does not provide any compression. To use a gzip compression on the tar archive, use the z option as shown below.

Subscribe to RSS - cli