Skip to content

Instantly share code, notes, and snippets.

View david-mears-2's full-sized avatar

David Mears david-mears-2

  • London
View GitHub Profile

Keybase proof

I hereby claim:

  • I am david-mears-dfe on github.
  • I am dmears (https://keybase.io/dmears) on keybase.
  • I have a public key ASAFcpmBa9zkjXmzNkSLfrIjSVgp1sHJqKpl9KEaQ2k-Xgo

To claim this, I am signing this object:

console.log('Running script hosted at https://gist.github.com/david-mears-2/a96ff2d0f4a93f03b25901fc6747eb96')
// Create the div element with the specified HTML
const modalDiv = document.createElement('div');
modalDiv.id = 'team-modal--modal';
modalDiv.className = 'team-modal--modal';
modalDiv.innerHTML = '<div class="team-modal--content"><p>Content</p><span class="team-modal--close">×</span></div>';
// Find an existing element to append the new element to
// For example, you can append it to the body element
const body = document.body;
@david-mears-2
david-mears-2 / donor_questions_schemas
Created April 3, 2024 19:30
note of what the partners' donor questions schema were before migration
Partner.where(name: ['One For The World', 'One For The World UK', 'One For The World Canada', 'One For The World Australia']).pluck(:name, :donor_questions_schema).to_s
=> "[[\"One For The World Canada\", {\"questions\"=>[{\"name\"=>\"phone_number\", \"type\"=>\"text\", \"title\"=>\"What is your phone number?\", \"options\"=>[], \"required\"=>true}, {\"name\"=>\"GDPR_static_text\", \"type\"=>\"statictext\", \"title\"=>\" One for the World would occasionally like to send you information about our charities, your impact and other initiatives. If you are happy to receive this information, please indicate here:\", \"options\"=>[], \"required\"=>false}, {\"name\"=>\"comms_email\", \"type\"=>\"checkbox\", \"title\"=>\"By Email\", \"options\"=>[], \"required\"=>false}, {\"name\"=>\"comms_phone\", \"type\"=>\"checkbox\", \"title\"=>\"By SMS (By selecting this box, you agree to receive donor engagement texts from One For The World. Message frequency varies. Message and data rates may apply. Reply STOP to unsubscribe a