Skip to content

Instantly share code, notes, and snippets.

View tai-cha's full-sized avatar

taichan tai-cha

View GitHub Profile
@mtsgi
mtsgi / cdfd.js
Created May 12, 2020 14:07
Classroomの資料一括ダウンロードするやつ (Google Classroom Drive Files Downloader)
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'))
})
@schickling
schickling / Rakefile
Last active January 31, 2024 23:00
Activerecord without Rails
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)