Flush image styles in drupal 7

To flush some image style, you can install module for that with UI, but you can also do it in lean way, with just drush php command or if locally with devel/php window. If using drush use this command

 drush php-eval '$style = image_style_load("optimize_original"); image_style_flush($style);'

 

What to use, text list or taxonomy term?

To force users or administrators to have predefined list of what to put into some field you will need to use one of this 2 solutions, text list or taxonomy term reference field. 

Adding existing project to git

When I was new to GIT this scared me, I was afraid I could somehow delete my current project or something like that, but it is rather trivial to add new GIT repo to existing project. All you need to do is add a remote config and do some initializations. Basically you do this

Using GIT with drupal7, do not put core into GIT

This is tutorial how to setup a drupal 7 site with git but without putting drupal core into git, reason is that you don't need it in git unless you are patching core. As drupal core is always the same and updated with drush, version control is not needed at least there is a stream of opinion that goes into that direction.  So what do you do, you only put sites folder into git.

Drush download drupal 7 into the current directory

For drupal 8 you will probably use more complex framework with composer at leas but for drupal 7 you still might use drush just to download drupal core. So to do that into the current directory you are at, use this command

drush dl drupal-7.x --drupal-project-rename="../${PWD##*/}" -y

It will overrun everything you have in that directory.

Mixed vagrant enviroments, check where does url load from

I had many vagrant machines and haven't really paid much attention to setting unique hostname, machine name and IP address, which resulted in mixed environments. Meaning I loaded one URL and I got files and database from the other vagrant machine. To debug what was really happening I went into devel/php and found out where is my mind I mean Index file :) to do that I echoed it like this.