This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit b270768b09d16fe904ce5e4345c446eee2a943c0 | |
| Author: Pusher <spunkspunkik@gmail.com> | |
| Date: Wed Nov 19 15:00:14 2025 +0200 | |
| Add unsubscribe checkbox for marketing emails | |
| - Add marketing_emails_subscribed boolean field to users table (default: true) | |
| - Add Email Preferences section in profile page with checkbox | |
| - Add update action to ProfilesController to handle preference changes | |
| - Update routes to include :update action for profile resource |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'mechanize' | |
| agent = Mechanize.new | |
| page = agent.get("https://agriculture.house.gov/news/documentsingle.aspx?DocumentID=2106") | |
| hash = Hash.new | |
| title = page.search('.newsie-titler').text.strip | |
| datelocation = page.search('.topnewstext').text.strip.split(",") | |
| date = Time.parse((datelocation[1] + datelocation[2]).chomp.strip).strftime('%Y-%m-%d') | |
| location = datelocation[0] | |
| article = page.search('.bodycopy').text.strip.gsub(/\r\n?/, "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'mechanize' | |
| #gem install pdf-reader-html | |
| require 'pdf/reader/html' | |
| #data-id - part of the link, "LPQUTd" - jscontroller, "WYuW0e" -class PDF | |
| agent = Mechanize.new | |
| page = agent.get("https://drive.google.com/drive/folders/1v8kAzirygnGsKm4X0eX_OhNgFPw865aQ") | |
| page.search('.WYuW0e').each do |x| | |
| array_data_id = x.attr("data-id") |