-
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
| function wait_vm_up { | |
| local counter=0 | |
| local readonly project=${1:?"project required"} | |
| local readonly instance=${2:?"instance required"} | |
| local readonly zone=${3:?"zone required"} | |
| local readonly user=${4:?"user required"} | |
| local readonly maxRetry=${5:-100} | |
| echo "Project: $project" |
| #!/bin/bash | |
| mkdir -p cloudbuild | |
| projectName=$(pwd | awk -F / '{print $NF}') | |
| echo $projectName | |
| touch cloudbuild/production.yaml cloudbuild/scambio.yaml |
| #!/bin/bash | |
| # Erlang | |
| ERLANG_VERSION=${ERLANG_VERSION:-19.0} | |
| ERLANG_CACHED_DOWNLOAD="${HOME}/cache/OTP-${ERLANG_VERSION}.tar.gz" | |
| ERLANG_DIR=${ERLANG_DIR:="$HOME/erlang"} | |
| # Elixir | |
| ELIXIR_VERSION=${ELIXIR_VERSION:-1.3.1} | |
| ELIXIR_CACHED_DOWNLOAD="${HOME}/cache/elixir-v${ELIXIR_VERSION}.zip" |
| defmodule DrainStop do | |
| @moduledoc """ | |
| DrainStop Attempts to gracefully shutdown an endpoint when a normal shutdown | |
| occurs. It first shuts down the acceptor, ensuring that no new requests can be | |
| made. It then waits for all pending requests to complete. If the timeout | |
| expires before this happens, it stops waiting, allowing the supervision tree | |
| to continue its shutdown order. | |
| DrainStop should be installed in your supervision tree *after* the | |
| EndPoint it is going to drain stop. |
| defmodule Poker do | |
| @ws ?\s | |
| # 9 codepoint is 57 | |
| # T -> : codepoint is 58 | |
| # J -> ; codepoint is 59 | |
| # Q -> < codepoint is 60 | |
| # K -> = codepoint is 61 | |
| # A -> > codepoint is 62 | |
| def convert_to_sortable(cards) do |
| (defn insert [l k] | |
| "将数插入序列" | |
| (concat (filter #(<= % k) l) (list k) (filter #(> % k) l))) | |
| (defn isort | |
| "插入排序" | |
| [s] | |
| (loop [sorted (list (first s)) | |
| unsorted (rest s)] | |
| (if (empty? unsorted) |