-
Open the Terminal
-
Use
mysqldumpto backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql -
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
| #!/bin/bash | |
| # Creator: Phil Cook | |
| # Modified: Andy Miller | |
| osx_major_version=$(sw_vers -productVersion | cut -d. -f1) | |
| osx_minor_version=$(sw_vers -productVersion | cut -d. -f2) | |
| osx_patch_version=$(sw_vers -productVersion | cut -d. -f3) | |
| osx_patch_version=${osx_patch_version:-0} | |
| osx_version=$((${osx_major_version} * 10000 + ${osx_minor_version} * 100 + ${osx_patch_version})) | |
| brew_prefix=$(brew --prefix | sed 's#/#\\\/#g') |
| const blobToImage = (blob) => { | |
| return new Promise(resolve => { | |
| const url = URL.createObjectURL(blob) | |
| let img = new Image() | |
| img.onload = () => { | |
| URL.revokeObjectURL(url) | |
| resolve(img) | |
| } | |
| img.src = url | |
| }) |
| Connecting parent component 'formGroup' with child component 'formControlName' | |
| In the Parent component template | |
| ================================ | |
| <form [formGroup]="recipeForm"> | |
| <app-recipe-name [parent]="recipeForm"></app-recipe-name> | |
| </form> |
| alias ga='git add' | |
| alias gaa='git add .' | |
| alias gaaa='git add --all' | |
| alias gau='git add --update' | |
| alias gb='git branch' | |
| alias gbd='git branch --delete ' | |
| alias gc='git commit' | |
| alias gcm='git commit --message' | |
| alias gcf='git commit --fixup' | |
| alias gco='git checkout' |
| $camphor300:'d09GMgABAAAAAQ5UABIAAAAEn0QAAQ3tAAEZmQAAAAAAAAAAAAAAAAAAAAAAAAAAG4SkahzOKgZgFotgAIosCCIJgnMRCAqLlgCKvTwBNgIkA5lwE4GnDguZdAAEIAW7bwcgDHJb0WS0WUXZkokWaBHx4wKbY7TigANIU/t980QCGzI/IkCsdbqJZwY1ZOgWDngIamw3I43435Dd+zJ1kNmKVp/DvXNAwaNm//////////////////+/NZkMZ5cAl0CpbZ3oiwloFA5GyIWNzOYVLt1bpXPX+pABI2fo5rMZpgVYIzYqgxt92ajECqUKh2G9gaOCVRC23VSRVypHfbvb7wYcwEM25WArF0esm1yKzDixrJRdcBGtcpBZTFbFbIl8LIU4gWOnEdSITqkoGrHWJ8ywn9eVFWWk3lC6m07qp1TXntHaWp6ekYHLrFoyzOXYiQnn2kWX2zqMaFBTca25vHKndPhJV66HRhQzL9lB3OT20KGTXuFHu62wm1qzoV/iTnaiLdc8o/D7B+1O94BrjSE3cia6U1A5XNp0kHmUj8IMBaeiGaiNJV7b1csb0bq8EWYo2h1TuipR+7hmYjxeZsonGLNcmgsKp5EUDCEj9SvRyxX2uMUNfINmfNqglBYNNtjtNmdwWV2ly4uQKheyDyka2RTRoQ3IEfs+0BNcGJ4Z5AnmHNpFbCKW5PsXkAzJ6VVzzVMo0fwIUpQQT67itTNRE946/NxDashl9KuAFUbZ6yW91vObh+WAMZ1mQ1J4wotF6KXHuo65X6wSz406hW/T6XZMf/6W+HGYUxCDfhyjPaoMGcWccmbYM/H35NdHTOd79Jg0ho/BDBvRy2vcg8pHsv07UYiKrDFeqzL0Qk7qCkXLuukl2EKuR3xS6VtsLEaT0BfWoDYoQ1YvEjjT729XNMYoCX3j+2ApedBG/UHLOJ7AAnfPSqdmmePsY+522MpfPaf7kf6fIJMn0/4SE6PmuI3yjyeGjWn+1qj/ukf09DE |
| //Usage | |
| import React from 'react'; | |
| import { BrowserRouter as Router } from 'react-router-dom'; | |
| import Route from './AuthRoute'; | |
| import Login from './Login'; | |
| import Private from './Private'; | |
| export default () => | |
| <Router> |
| # first: | |
| lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
| sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
| # To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
| # go to /usr/local/lib and delete any node and node_modules | |
| cd /usr/local/lib | |
| sudo rm -rf node* |
| // set the default amount of items being displayed | |
| $scope.limit= 5; | |
| // loadMore function | |
| $scope.loadMore = function() { | |
| $scope.limit = $scope.items.length | |
| } |
| angular.module('your-module-name', []) | |
| .directive('onResize', ['$window', function ($window) { | |
| return { | |
| link: function (scope, el, attrs) { | |
| var initialWidth = $window.innerWidth, | |
| smallClass = attrs.resizeClass || 'yourDefault', | |
| smallAttr = attrs.resizeAttr || 'yourDefault', | |
| smallWidth = attrs.resizeWidth || 1024; | |
| var setSmall = function () { |