Sometimes you need to script a git pull or you just want to completely reset a repo to HEAD. You there are loads of errors git can throw you in the process; such as error: unable to unlink old 'sites/default/settings.php' or error: The following untracked working tree files would be overwritten by checkout. Below is my take on the complete repository reset/clean/pull. Let me know in the comments if you've got a better way or find errors I'm missing.
Let's say you have a content type, containing a Field Collection which itself contains an Addressfield and you have to create the node programmatically. Complicated enough? Just imagine the rest of the content type I've got here! Below is how to do it without spending hours sailing the seas of che... PHP Exceptions.
Creating nodes via the UI in Drupal is easy, creating or updating them programmatically(in code) has always been a tedious. I've nearly lost my mind staring into the depths of a dpm($node);
The problem was the lack of straightforward API to handle the field level CRUD. You had to manually shove correctly formatted data into an object, often by comparing against an existing node's array. The correct old process went(and still can if you want!) like this:
The process of adding many users to a new Linux system can get tedious, especially if it is involved. So, let's replace the process with a simple shell script.
For this example, public keys are the only allowed login method. Password login is disabled, so the password is not set. The first step is to run set -e to stop the script on any errors. Next assign readable variable names, and check they aren't null. Next the user is created, and as the user the public keys are setup.
Apache HTTP's mod_user makes /home/user/public_html/ directories web-accessible as example.com/~user/. While useful, it is often not enough. What if you need to access /home/user/public_html/project?
Update 2/11/14: I've created https://github.com/eosrei/install-apache-solr an install.sh for Solr 4.6.x on Debian/Ubuntu. I suggest you use it.
There are probably enough posts the Internet covering Apache Solr installation, but here is multi-instance (not-core) Apache Solr 3.6.x with Tomcat6 for Drupal 7 on Ubuntu 12.04 LTS. Perhaps it'll be useful for you. This setup is used on a development server to host search indexes for many development sites.
Super quick answer: sudo yum remove selinux*
Running Red Hat Enterprise Linux Server release 6.x? Cannot generate SSH public/private keys with ssh-keygen? Me too!
If you've experienced the unending joy of attempting to make a PHP SOAP call using the SoapClass, you may have discovered XML node attributes cannot easily be created and passed.