To “branch” or “tag” within a repository, use svn copy. The syntax is simple. svn copy {SRC} {DST} The source and destination can be either a working copy path or full URL in any combination. So to tag a revision from trunk the following command could be used. svn copy –username myusername –password mypassword http://domain.com/svn/trunk [...]
Step 1 – At the linux shell, stop the current mysqld process, start the mysqld_safe process with –skip-grant-tables switch and login as root (no password). /etc/init.d/mysql stop mysqld_safe –skip-grant-tables & mysql -u root Step 2 – At the mysql shell set the root password and flush privileges. USE mysql; UPDATE user SET password=PASSWORD("new-password-here") WHERE User=’root’; [...]
To reset the MySQL root password, login to the mysql shell and run the following commands. SET PASSWORD FOR root@localhost=PASSWORD(’RootPasswordHere’); FLUSH PRIVILEGES;
To grant all privileges to a user from any location login to the mysql shell and run the following queries. GRANT ALL PRIVILEGES ON *.* TO username@localhost IDENTIFIED BY ‘PasswordHere’ WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO username@"%" IDENTIFIED BY ‘PasswordHere’ WITH GRANT OPTION; FLUSH PRIVILEGES;
Use Apache’s mod_expires to explicitly set the expiration of a file by it’s type. This will enable to browser to cache these static assets and greatly increase performance. <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "now" ExpiresByType text/html "now" ExpiresByType text/xml "now" ExpiresByType text/css "access plus 8 hours" ExpiresByType text/plain "access plus 8 hours" ExpiresByType application/x-javascript "access [...]
The ternary operator is an excellent and often underutilized way to quickly evaluate a variable in place of an if/else statement. The syntax is clean and can greatly simplify code. ( expr1 ) ? ( expr2 ) : ( expr3 ) Take the following code for example where we determine how to greet a user. [...]
