This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
brew remove [email protected] | |
# Or 'brew remove mysql' | |
brew cleanup | |
sudo rm /usr/local/mysql | |
sudo rm -rf /usr/local/var/mysql | |
sudo rm -rf /usr/local/mysql* | |
sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist | |
sudo rm -rf /Library/StartupItems/MySQLCOM | |
sudo rm -rf /Library/PreferencePanes/My* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew remove mysql | |
brew cleanup | |
sudo rm /usr/local/mysql | |
sudo rm -rf /usr/local/var/mysql | |
sudo rm -rf /usr/local/mysql* | |
sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist | |
sudo rm -rf /Library/StartupItems/MySQLCOM | |
sudo rm -rf /Library/PreferencePanes/My* | |
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist | |
#(Edit /etc/hostconfig) sudo nano /etc/hostconfig (Remove line MYSQLCOM=-YES) or run the next line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer require symfony/debug:3.4.8 | |
composer require symfony/dom-crawler:3.4.9 | |
composer require --dev drupal/console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
co = checkout | |
s = status | |
l = log | |
url = config --get remote.origin.url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Git aliases | |
alias gb="git branch" | |
alias gaa="git add ." | |
alias gc="git commit -a -m" | |
alias gs="git status" | |
alias nah="git reset --hard; git clean -df;" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
../vendor/bin/drupal generate:controller --module=custom_api --class=SearchController --routes='"title":"ControllerMethod", "name":"custom_api.search", "method":"search", "path":"custom_api/search/{search}"' --uri=my-site.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
custom_api.search: | |
path: 'custom_api/search/{search}' | |
defaults: | |
_controller: '\Drupal\custom_api\Controller\SearchController::search' | |
_title: 'ControllerMethod' | |
requirements: | |
_permission: 'access content' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\custom_api\Controller; | |
use Drupal\Core\Controller\ControllerBase; | |
/** | |
* Class SearchController. | |
*/ | |
class SearchController extends ControllerBase { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!isset($_GET['q']) && !empty($uri) && $uri !== '/' && strpos($uri, '/jsonapi/') === false) { | |
$_GET['q'] = $uri; | |
} |