Install gcc (Apple release) unless you have it
Needed to compile ICU.
Grab and unpack the tarball
mkdir ~/src && cd ~/src
curl -O http://opensource.apple.com/tarballs/gcc/gcc-5666.3.tar.gz
tar -zxvf gcc-5666.3.tar.gz
cd gcc-5666.3
Needed to compile ICU.
Grab and unpack the tarball
mkdir ~/src && cd ~/src
curl -O http://opensource.apple.com/tarballs/gcc/gcc-5666.3.tar.gz
tar -zxvf gcc-5666.3.tar.gz
cd gcc-5666.3
$ yarn add [email protected] --save # select alpha version
$ yarn add [email protected] --save # select alpha version
$ yarn add react-bootstrap --save
$ yarn add react-router-dom --save
$ yarn add react-router-bootstrap --save
$ yarn add react-redux --save
| # create with a name | |
| screen -d -m -S elasticsearch:import:migrate | |
| # list with PIDs | |
| screen -list | |
| # reopen one with PID | |
| screen -r 12345 | |
| # Destroy with PID |
| ## .bash_profile | |
| ``` | |
| export LC_ALL=en_US.UTF-8 | |
| export LANG=en_US.UTF-8 | |
| # Tell ls to be colourful | |
| export CLICOLOR=1 | |
| export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx | |
| # Tell grep to highlight matches | |
| export GREP_OPTIONS='--color=auto' |
| bundle exec rubocop -c .rubocop_exclusion.yml --fail_level convention --display-only-fail-level-offenses | |
| # Rubocop only files I modified/added, but not the one I deleted | |
| git diff develop... --diff-filter=d --name-only | egrep "\\.rb$" |xargs bundle exec rubocop | |
| git diff develop... --diff-filter=d --name-only | egrep "\\.rb$" |egrep -v db/schema.rb | xargs bundle exec rubocop | |
| git diff develop... --diff-filter=d --name-only | egrep "\\.rb$" |egrep -v db/schema.rb | xargs bundle exec rubocop --fail_level convention --display-only-fail-level-offenses | |
| git diff develop... --diff-filter=d --name-only | egrep "\\.rb$" |egrep -v db/schema.rb | xargs bundle exec rubocop -c .rubocop_exclusion.yml --fail_level convention --display-only-fail-level-offenses | |
| git diff develop... --diff-filter=d --name-only | egrep "\\.rb$" |egrep -v db/schema.rb | xargs bundle exec rubocop -A -c .rubocop_exclusion.yml --fail_level convention | |
| git diff --name- | |
| # -A the staged |
| cat tmp/appstrategy | xargs perl -p -i -e "s/(RSpec.describe .+) do$/\1, auth_strategy: \'app_user_cookies\' do/" |
Show all unused index since the last MySQL server restart (MySQL 5.6+)
SELECT object_schema, object_name, index_name
FROM performance_schema.table_io_waits_summary_by_index_usage
WHERE index_name IS NOT NULL AND count_star = 0
ORDER BY object_schema, object_name;