Page Archive

Git shortcuts

  • Posted on: 7 December 2018
  • By: stillfinder

Sometimes it's too tedious and boring to type-in something like 'git commit -a -m' 50 times per day. In this case the shell or the git aliases can be the solution.

Useful drush commands

  • Posted on: 5 December 2018
  • By: stillfinder

From http://docs.drush.org:

Drush is a command line shell and Unix scripting interface for Drupal. Drush core ships with lots of useful commands for interacting with code like modules/themes/profiles. Similarly, it runs update.php, executes sql queries and DB migrations, and misc utilities like run cron or clear cache.

Rebuild Drupal cache

../vendor/bin/drush -l my-site.com cache-rebuild

Valet Nginx 502 Bad Gateway error

  • Posted on: 27 November 2018
  • By: stillfinder

If you have “502 Bad Gateway” error, and see in the Nginx log file located in .valet/Log/nginx-error.log directory the following:

*922 upstream sent too big header while reading response header from upstream, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/Users/username/.valet/valet.sock:"

To solve the problem you need to add these two lines to the Nginx configuration file /usr/local/etc/nginx/nginx.conf :

Drupal + Laravel Valet

  • Posted on: 27 November 2018
  • By: stillfinder

Valet is a Laravel development environment for Mac minimalists. No Vagrant, no /etc/hosts file. You can even share your sites publicly using local tunnels. Out of the box, Valet supports Drupal. So, lets setup Valet and Drupal.

Useful terminal commands

  • Posted on: 26 November 2018
  • By: stillfinder

Find all files that contain a certain string of text

grep -r 'navbar_search' .

Git

Determines the URL that a local Git repository was originally cloned from

git config --get remote.origin.url

Git. Rename Branches

Rename the current branch

git branch -m new-name