これらのショートカットは基本的にどこでも使えます。
P, N新規投稿Post, New, Note
| ショートカット | 効果 | 由来 |
|---|
| document.querySelectorAll('a[aria-label][data-focus-id][target=_blank]').forEach(anc => { | |
| if(anc.getAttribute('href').search(/https?:\/\/drive\.google\.com\/open\?/) === 0) | |
| window.open(anc.getAttribute('href').replace(/https?:\/\/drive\.google\.com\/open\?/, 'https://drive.google.com/uc?export=download&'), anc.getAttribute('href')) | |
| }) |
| require "active_record" | |
| namespace :db do | |
| db_config = YAML::load(File.open('config/database.yml')) | |
| db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
| desc "Create the database" | |
| task :create do | |
| ActiveRecord::Base.establish_connection(db_config_admin) |