Skip to content

Instantly share code, notes, and snippets.

Avatar
🌏
Focusing

Leslie Zhang fighterleslie

🌏
Focusing
View GitHub Profile
View mysqldump_example.sh
# only dump data, no table structure
echo "Begin"
mysqldump --skip-opt --no-create-db --no-create-info --compact --quick --extended-insert --insert-ignore -h xx -u xx --password=xx database_name table_name > /mnt/dump.sql
echo "Done"
View frozen sidekiq TTIN backtrace
2020-03-11T06:05:09.880Z 29809 TID-aqrw0 WARN: Thread TID-aqrw0
2020-03-11T06:05:09.880Z 29809 TID-aqrw0 WARN: /srv/www/udesk_proj_sidekiq_common/shared/bundle/ruby/2.6.0/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:138:in `backtrace'
/srv/www/udesk_proj_sidekiq_common/shared/bundle/ruby/2.6.0/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:138:in `block in handle_signal'
/srv/www/udesk_proj_sidekiq_common/shared/bundle/ruby/2.6.0/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:135:in `each'
/srv/www/udesk_proj_sidekiq_common/shared/bundle/ruby/2.6.0/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:135:in `handle_signal'
/srv/www/udesk_proj_sidekiq_common/shared/bundle/ruby/2.6.0/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:88:in `run'
/srv/www/udesk_proj_sidekiq_common/shared/bundle/ruby/2.6.0/gems/sidekiq-3.3.3/bin/sidekiq:8:in `<top (required)>'
/srv/www/udesk_proj_sidekiq_common/shared/bundle/ruby/2.6.0/bin/sidekiq:23:in `load'
/srv/www/udesk_proj_sidekiq_common/shared/bundle/ruby/2.6.0/bin/sidekiq:23:in `<top (required)>'
/home/webuser/.rbenv/vers
@fighterleslie
fighterleslie / bash-colors.md
Created Mar 16, 2018 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.
View bash-colors.md

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@fighterleslie
fighterleslie / Gemfile
Created Feb 10, 2016
preferred general Gemfile
View Gemfile
source 'https://rubygems.org'
gem 'rails', '4.2.5.1'
# assets management
gem 'sass-rails', '~> 5.0'
gem 'coffee-rails', '~. 4.1.0'
gem 'uglifier', '>= 1.3.0'
gem 'bootstrap-sass'
gem 'font-awesome-sass'
View .editorconfig
# This is the top-most .editorconfig file
root = true
# Unix-style newlines
[*]
end_of_line = lf
# append a new line at the bottom of each file
insert_final_newline = true
View disable-contextmenu.js
// IE9+
document.addEventListener('contextmenu', function(e) {
e.preventDefault()
})