There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.
The stack:
- emacs
- offlineimap
- mu
- mu4e
# This task can be used reindex Solr without dropping your index first. | |
# This is ideal for production environments where a live, working index is critical. | |
# | |
# Put this in lib/tasks/sunspot_tasks.rake | |
namespace :sunspot do | |
task reindex_gracefully: :environment do | |
Dir.glob(Rails.root.join('app/models/**/*.rb')).each { |path| require path } | |
sunspot_models = Sunspot.searchable |
hand_shutdown "key 290 mod1" | |
hand_capmouse "key 291 mod1" | |
hand_fullscr "key 13 mod2" | |
hand_pause "key 19 mod2" | |
hand_mapper "key 282 mod1" | |
hand_speedlock "key 293 mod2" | |
hand_recwave "key 287 mod1" | |
hand_caprawmidi "key 289 mod1 mod2" | |
hand_scrshot "key 286 mod1" | |
hand_video "key 286 mod1 mod2" |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
require 'rspec/expectations' | |
# expect(response).to be_json_success | |
RSpec::Matchers.define :be_json_success do |_expected| | |
match do |actual| | |
actual.status == 200 && actual.content_type.match("application/json") | |
end | |
failure_message do |actual| | |
"expected status: 200, content_type: 'application/json', got status: #{actual.status}, content_type: '#{actual.content_type}'" |