This document summarizes content from Week 6 of the Rails Summer of Code. It discusses email in Rails, including how email works, content types, and using ActionMailer. It also covers background tasks in Rails using rake tasks, cron jobs, Monit, and God. Modules and mixins in Ruby are explained. Callbacks and observers in Rails are described as ways to trigger behavior during an object's lifecycle. Internationalization and localization in Rails are covered, including using the I18n module and creating language-specific YAML files.
This series introduces students to ruby on rails 3 through the book "Agile Web Development with Rails" with accompanying lecture videos found at http://www.thinkbohemian.com/tag/rails-summer-of-code/
This is the 5th of 8 presentations given at University of Texas during my Beginner to Builder Rails 3 Class. For more info and the whole series including video presentations at my blog:
http://schneems.com/tagged/Rails-3-beginner-to-builder-2011
This is the first of 8 presentations given at University of Texas during my Beginner to Builder Rails 3 Class. For more info and the whole series including video presentations at my blog:
http://schneems.tumblr.com/tagged/Rails-3-beginner-to-builder-2011
- Wordpress allows users to create and manage content on a website through a content management system (CMS). It uses PHP and MySQL to create blogs and websites.
- The document discusses installing Wordpress, creating posts and pages, using themes and plugins to customize the website, and basic search engine optimization techniques.
- Key aspects of Wordpress include using themes to control the design and layout, plugins to add extra functionality, and the dashboard to manage content, media, users and settings.
This is the 4th of 8 presentations given at University of Texas during my Beginner to Builder Rails 3 Class. For more info and the whole series including video presentations at my blog:
http://schneems.com/tagged/Rails-3-beginner-to-builder-2011
This series introduces students to ruby on rails 3 through the book "Agile Web Development with Rails" with accompanying lecture videos found at http://www.thinkbohemian.com/tag/rails-summer-of-code/
This is the last of 8 presentations given at University of Texas during my Beginner to Builder Rails 3 Class. For more info and the whole series including video presentations at my blog:
http://schneems.com/tagged/Rails-3-beginner-to-builder-2011
This is an introduction to relational and non-relational databases and how their performance affects scaling a web application.
This is a recording of a guest Lecture I gave at the University of Texas school of Information.
In this talk I address the technologies and tools Gowalla (gowalla.com) uses including memcache, redis and cassandra.
Find more on my blog:
http://schneems.com
This series introduces students to ruby on rails 3 through the book "Agile Web Development with Rails" with accompanying lecture videos found at http://www.thinkbohemian.com/tag/rails-summer-of-code/
This is the 5th of 8 presentations given at University of Texas during my Beginner to Builder Rails 3 Class. For more info and the whole series including video presentations at my blog:
http://schneems.com/tagged/Rails-3-beginner-to-builder-2011
This is the first of 8 presentations given at University of Texas during my Beginner to Builder Rails 3 Class. For more info and the whole series including video presentations at my blog:
http://schneems.tumblr.com/tagged/Rails-3-beginner-to-builder-2011
- Wordpress allows users to create and manage content on a website through a content management system (CMS). It uses PHP and MySQL to create blogs and websites.
- The document discusses installing Wordpress, creating posts and pages, using themes and plugins to customize the website, and basic search engine optimization techniques.
- Key aspects of Wordpress include using themes to control the design and layout, plugins to add extra functionality, and the dashboard to manage content, media, users and settings.
This is the 4th of 8 presentations given at University of Texas during my Beginner to Builder Rails 3 Class. For more info and the whole series including video presentations at my blog:
http://schneems.com/tagged/Rails-3-beginner-to-builder-2011
This series introduces students to ruby on rails 3 through the book "Agile Web Development with Rails" with accompanying lecture videos found at http://www.thinkbohemian.com/tag/rails-summer-of-code/
This is the last of 8 presentations given at University of Texas during my Beginner to Builder Rails 3 Class. For more info and the whole series including video presentations at my blog:
http://schneems.com/tagged/Rails-3-beginner-to-builder-2011
This is an introduction to relational and non-relational databases and how their performance affects scaling a web application.
This is a recording of a guest Lecture I gave at the University of Texas school of Information.
In this talk I address the technologies and tools Gowalla (gowalla.com) uses including memcache, redis and cassandra.
Find more on my blog:
http://schneems.com
This series introduces students to ruby on rails 3 through the book "Agile Web Development with Rails" with accompanying lecture videos found at http://www.thinkbohemian.com/tag/rails-summer-of-code/
This series introduces students to ruby on rails 3 through the book "Agile Web Development with Rails" with accompanying lecture videos found at http://www.thinkbohemian.com/tag/rails-summer-of-code/
This document discusses using Hadoop to process large amounts of spam data. It describes different types of spam, including email spam, social media spam, and web spam. It then explains why Hadoop is well-suited for spam processing due to its ability to parallelize tasks and handle large datasets. Sample system architectures and heuristics for spam detection are presented, such as analyzing IP addresses, link patterns, and content. Metrics like Jaccard similarity and arrival times can also help evaluate spam. Overall, the document advocates using Hadoop to gain insights from massive spam datasets through simple solutions that can effectively capture the majority of spam.
This document summarizes a keynote speech given by John Adams, an early Twitter engineer, about scaling Twitter operations from 2008-2009. Some key points:
1) Twitter saw exponential growth rates from 2008-2009, processing over 55 million tweets per day and 600 million searches per day.
2) Operations focused on improving performance, reducing errors and outages, and using metrics to identify weaknesses and bottlenecks like network latency and database delays.
3) Technologies like Unicorn, memcached, Flock, Cassandra, and daemons were implemented to improve scalability beyond a traditional RDBMS and handle Twitter's data volumes and real-time needs.
4) Caching,
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...Reuven Lerner
My talk from the Megacomm 2012 conference in Jerusalem, on February 16th, 2012. I describe the fundamental underpinnings of the Web, how things have changed on both the browser and server sides, and what these technologies mean for users..
Rspamd is a spam filtering system that is:
- Written in C for performance and uses an event-driven model to process messages asynchronously for scalability.
- Capable of detecting spam through a variety of filtering methods like policies, DNS lists, headers, text patterns, and machine learning.
- Integrates with mail transfer agents using plugins to modify or reject messages based on spam detection.
Modern Web Technologies — Jerusalem Web Professionals, January 2011Reuven Lerner
What's the current state of Web technologies, and how does it affect professionals creating Web applications? In this talk, I survey the latest trends in Web technologies, and where I believe they're going in the near future.
The document discusses the scaling habits of ASP.NET applications over multiple versions from initial launch to large-scale business success. As an application grows from version 1 with a few users to version N with thousands of users, the key scaling challenges change from fixing logical problems to addressing performance bottlenecks and high availability requirements. The solutions also evolve from simple code optimizations to sophisticated architectures with load balancing, caching, and separate servers for web and database tiers.
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...smallerror
Twitter's operations team manages software performance, availability, capacity planning, and configuration management for Twitter. They use metrics, logs, and analysis to find weak points and take corrective action. Some techniques include caching everything possible, moving operations to asynchronous daemons, and optimizing databases to reduce replication delay and locks. The team also created several open source projects like CacheMoney for caching and Kestrel for asynchronous messaging.
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...xlight
Fixing Twitter and Finding your own Fail Whale document discusses Twitter operations. The operations team manages software performance, availability, capacity planning, and configuration management using metrics, logs, and data-driven analysis to find weak points and take corrective action. They use managed services for infrastructure to focus on computer science problems. The document outlines Twitter's rapid growth and challenges in maintaining performance as traffic increases. It provides recommendations around caching, databases, asynchronous processing, and other techniques Twitter uses to optimize performance under heavy load.
Fixing Twitter and Finding your own Fail Whale document discusses Twitter operations. The Twitter operations team focuses on software performance, availability, capacity planning, and configuration management using metrics, logs, and science. They use a dedicated managed services team and run their own servers instead of cloud services. The document outlines Twitter's rapid growth and challenges in maintaining performance. It discusses strategies for monitoring, analyzing metrics to find weak points, deploying changes, and improving processes through configuration management and peer reviews.
Twitter's operations team manages software performance, availability, capacity planning, and configuration management. They use metrics, logs, and analysis to find weak points and take corrective action. Some techniques include caching everything possible, moving operations to asynchronous daemons, optimizing databases, and instrumenting all systems. Their goal is to process requests asynchronously when possible and avoid overloading relational databases.
This document discusses using Hadoop to process large amounts of spam data. It describes different types of spam, including email spam, social media spam, and web spam. It then outlines sample system architectures for spam detection and various heuristics that can be used for spam detection in Hadoop, such as analyzing arrival times, content similarity, links, and domain names. Finally, it emphasizes that simple solutions can be effective, spammers adapt quickly, and breaking your own system helps improve spam detection.
Attack All The Layers - What's Working in Penetration TestingNetSPI
The document discusses techniques for attacking different layers during a penetration test. It covers attacking protocols like ARP, NBNS, SMB, PXE and DTP. It also discusses attacking passwords by cracking hashes, dictionary attacks, and dumping passwords in cleartext. Application attacks like SQL injection and directory traversals are mentioned. Bypassing endpoint protection through code injection and modifying application whitelisting is covered. Windows privilege escalation techniques like exploiting insecure service configurations and dumping credentials from memory are also summarized. The conclusions state that most networks and protocols have vulnerabilities but can be fixed through proper controls and patching.
Attack All the Layers: What's Working during Pentests (OWASP NYC)Scott Sutherland
This presentation is intended to provide an overview of vulnerabilities and attack techniques that are popular in penetration testing at the moment. Vulnerabilities related to the application, network, and server layers will be covered along with current anti-virus bypass and privilege escalation techniques used by attackers and penetration testers. This presentation should be interesting to security professionals and system administrators looking for more insight into real world attacks.
This is the version modified for the OWASP meeting in June of 2014.
Attack All the Layers - What's Working in Penetration TestingNetSPI
The document discusses techniques for attacking different layers during a penetration test. It covers attacking protocols like ARP, NBNS, SMB, PXE and DTP. It also discusses attacking passwords by cracking hashes, dictionary attacks, and dumping passwords in cleartext. Additionally, it covers attacking applications, bypassing endpoint protection, and escalating privileges on Windows systems locally and within a domain. The overall message is that penetration testers should attack all layers of the stack during a test to fully evaluate security.
Startup DevOps - Jon Milsom Pitchero - Leeds DevOps - August 2014Jon Milsom
Presentation at Leeds DevOps by Jon Milsom (Co-Founder & CTO, Pitchero), August 2014
http://www.pitchero.com/
http://www.leedsdevops.org.uk/
https://twitter.com/jonmilsom
https://twitter.com/leedsDevops
Large-Scale ETL Data Flows With Data Pipeline and DataductSourabh Bajaj
As data volumes grow, managing and scaling data pipelines for ETL and batch processing can be daunting. With more than 13.5 million learners worldwide, hundreds of courses, and thousands of instructors, Coursera manages over a hundred data pipelines for ETL, batch processing, and new product development.
In this session, we dive deep into AWS Data Pipeline and Dataduct, an open source framework built at Coursera to manage pipelines and create reusable patterns to expedite developer productivity. We share the lessons learned during our journey: from basic ETL processes, such as loading data from Amazon RDS to Amazon Redshift, to more sophisticated pipelines to power recommendation engines and search services.
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
This series introduces students to ruby on rails 3 through the book "Agile Web Development with Rails" with accompanying lecture videos found at http://www.thinkbohemian.com/tag/rails-summer-of-code/
This series introduces students to ruby on rails 3 through the book "Agile Web Development with Rails" with accompanying lecture videos found at http://www.thinkbohemian.com/tag/rails-summer-of-code/
This document discusses using Hadoop to process large amounts of spam data. It describes different types of spam, including email spam, social media spam, and web spam. It then explains why Hadoop is well-suited for spam processing due to its ability to parallelize tasks and handle large datasets. Sample system architectures and heuristics for spam detection are presented, such as analyzing IP addresses, link patterns, and content. Metrics like Jaccard similarity and arrival times can also help evaluate spam. Overall, the document advocates using Hadoop to gain insights from massive spam datasets through simple solutions that can effectively capture the majority of spam.
This document summarizes a keynote speech given by John Adams, an early Twitter engineer, about scaling Twitter operations from 2008-2009. Some key points:
1) Twitter saw exponential growth rates from 2008-2009, processing over 55 million tweets per day and 600 million searches per day.
2) Operations focused on improving performance, reducing errors and outages, and using metrics to identify weaknesses and bottlenecks like network latency and database delays.
3) Technologies like Unicorn, memcached, Flock, Cassandra, and daemons were implemented to improve scalability beyond a traditional RDBMS and handle Twitter's data volumes and real-time needs.
4) Caching,
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...Reuven Lerner
My talk from the Megacomm 2012 conference in Jerusalem, on February 16th, 2012. I describe the fundamental underpinnings of the Web, how things have changed on both the browser and server sides, and what these technologies mean for users..
Rspamd is a spam filtering system that is:
- Written in C for performance and uses an event-driven model to process messages asynchronously for scalability.
- Capable of detecting spam through a variety of filtering methods like policies, DNS lists, headers, text patterns, and machine learning.
- Integrates with mail transfer agents using plugins to modify or reject messages based on spam detection.
Modern Web Technologies — Jerusalem Web Professionals, January 2011Reuven Lerner
What's the current state of Web technologies, and how does it affect professionals creating Web applications? In this talk, I survey the latest trends in Web technologies, and where I believe they're going in the near future.
The document discusses the scaling habits of ASP.NET applications over multiple versions from initial launch to large-scale business success. As an application grows from version 1 with a few users to version N with thousands of users, the key scaling challenges change from fixing logical problems to addressing performance bottlenecks and high availability requirements. The solutions also evolve from simple code optimizations to sophisticated architectures with load balancing, caching, and separate servers for web and database tiers.
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...smallerror
Twitter's operations team manages software performance, availability, capacity planning, and configuration management for Twitter. They use metrics, logs, and analysis to find weak points and take corrective action. Some techniques include caching everything possible, moving operations to asynchronous daemons, and optimizing databases to reduce replication delay and locks. The team also created several open source projects like CacheMoney for caching and Kestrel for asynchronous messaging.
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...xlight
Fixing Twitter and Finding your own Fail Whale document discusses Twitter operations. The operations team manages software performance, availability, capacity planning, and configuration management using metrics, logs, and data-driven analysis to find weak points and take corrective action. They use managed services for infrastructure to focus on computer science problems. The document outlines Twitter's rapid growth and challenges in maintaining performance as traffic increases. It provides recommendations around caching, databases, asynchronous processing, and other techniques Twitter uses to optimize performance under heavy load.
Fixing Twitter and Finding your own Fail Whale document discusses Twitter operations. The Twitter operations team focuses on software performance, availability, capacity planning, and configuration management using metrics, logs, and science. They use a dedicated managed services team and run their own servers instead of cloud services. The document outlines Twitter's rapid growth and challenges in maintaining performance. It discusses strategies for monitoring, analyzing metrics to find weak points, deploying changes, and improving processes through configuration management and peer reviews.
Twitter's operations team manages software performance, availability, capacity planning, and configuration management. They use metrics, logs, and analysis to find weak points and take corrective action. Some techniques include caching everything possible, moving operations to asynchronous daemons, optimizing databases, and instrumenting all systems. Their goal is to process requests asynchronously when possible and avoid overloading relational databases.
This document discusses using Hadoop to process large amounts of spam data. It describes different types of spam, including email spam, social media spam, and web spam. It then outlines sample system architectures for spam detection and various heuristics that can be used for spam detection in Hadoop, such as analyzing arrival times, content similarity, links, and domain names. Finally, it emphasizes that simple solutions can be effective, spammers adapt quickly, and breaking your own system helps improve spam detection.
Attack All The Layers - What's Working in Penetration TestingNetSPI
The document discusses techniques for attacking different layers during a penetration test. It covers attacking protocols like ARP, NBNS, SMB, PXE and DTP. It also discusses attacking passwords by cracking hashes, dictionary attacks, and dumping passwords in cleartext. Application attacks like SQL injection and directory traversals are mentioned. Bypassing endpoint protection through code injection and modifying application whitelisting is covered. Windows privilege escalation techniques like exploiting insecure service configurations and dumping credentials from memory are also summarized. The conclusions state that most networks and protocols have vulnerabilities but can be fixed through proper controls and patching.
Attack All the Layers: What's Working during Pentests (OWASP NYC)Scott Sutherland
This presentation is intended to provide an overview of vulnerabilities and attack techniques that are popular in penetration testing at the moment. Vulnerabilities related to the application, network, and server layers will be covered along with current anti-virus bypass and privilege escalation techniques used by attackers and penetration testers. This presentation should be interesting to security professionals and system administrators looking for more insight into real world attacks.
This is the version modified for the OWASP meeting in June of 2014.
Attack All the Layers - What's Working in Penetration TestingNetSPI
The document discusses techniques for attacking different layers during a penetration test. It covers attacking protocols like ARP, NBNS, SMB, PXE and DTP. It also discusses attacking passwords by cracking hashes, dictionary attacks, and dumping passwords in cleartext. Additionally, it covers attacking applications, bypassing endpoint protection, and escalating privileges on Windows systems locally and within a domain. The overall message is that penetration testers should attack all layers of the stack during a test to fully evaluate security.
Startup DevOps - Jon Milsom Pitchero - Leeds DevOps - August 2014Jon Milsom
Presentation at Leeds DevOps by Jon Milsom (Co-Founder & CTO, Pitchero), August 2014
http://www.pitchero.com/
http://www.leedsdevops.org.uk/
https://twitter.com/jonmilsom
https://twitter.com/leedsDevops
Large-Scale ETL Data Flows With Data Pipeline and DataductSourabh Bajaj
As data volumes grow, managing and scaling data pipelines for ETL and batch processing can be daunting. With more than 13.5 million learners worldwide, hundreds of courses, and thousands of instructors, Coursera manages over a hundred data pipelines for ETL, batch processing, and new product development.
In this session, we dive deep into AWS Data Pipeline and Dataduct, an open source framework built at Coursera to manage pipelines and create reusable patterns to expedite developer productivity. We share the lessons learned during our journey: from basic ETL processes, such as loading data from Amazon RDS to Amazon Redshift, to more sophisticated pipelines to power recommendation engines and search services.
Ähnlich wie Rails3 Summer of Code 2010 - Week 6 (20)
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
हिंदी वर्णमाला पीपीटी, hindi alphabet PPT presentation, hindi varnamala PPT, Hindi Varnamala pdf, हिंदी स्वर, हिंदी व्यंजन, sikhiye hindi varnmala, dr. mulla adam ali, hindi language and literature, hindi alphabet with drawing, hindi alphabet pdf, hindi varnamala for childrens, hindi language, hindi varnamala practice for kids, https://www.drmullaadamali.com
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Diana Rendina
Librarians are leading the way in creating future-ready citizens – now we need to update our spaces to match. In this session, attendees will get inspiration for transforming their library spaces. You’ll learn how to survey students and patrons, create a focus group, and use design thinking to brainstorm ideas for your space. We’ll discuss budget friendly ways to change your space as well as how to find funding. No matter where you’re at, you’ll find ideas for reimagining your space in this session.
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxEduSkills OECD
Iván Bornacelly, Policy Analyst at the OECD Centre for Skills, OECD, presents at the webinar 'Tackling job market gaps with a skills-first approach' on 12 June 2024
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
How to Setup Warehouse & Location in Odoo 17 InventoryCeline George
In this slide, we'll explore how to set up warehouses and locations in Odoo 17 Inventory. This will help us manage our stock effectively, track inventory levels, and streamline warehouse operations.
A review of the growth of the Israel Genealogy Research Association Database Collection for the last 12 months. Our collection is now passed the 3 million mark and still growing. See which archives have contributed the most. See the different types of records we have, and which years have had records added. You can also see what we have for the future.
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
3. Email in Rails
• What is Email?
• Why Use Email?
• How does Rails use email?
Richard Schneeman - @ThinkBohemian
4. What is Email
• Communications medium defined by RFC standards
✦ RFC = Request for Comments
✦ Comprised of Header & Body
✦
Header (to, from, reply-to, content-type, subject, cc, etc.)
✦
Body (message and attachments)
Richard Schneeman - @ThinkBohemian
5. Email- Content Types
• Defines How the Mail User Agent (MUA) Interprets Body
✦ Text/HTML
✦ Text/Plain
✦ Multipart/Related (Example: Inline Pictures)
✦ Multipart/Alternative
✦
Send Text/HTML with Text/Plain as backup
✦
Add Attachments
Richard Schneeman - @ThinkBohemian
6. Why use Email with
Rails?
• Status Updates ( Twitter, Facebook, Etc. )
• Direct to Consumer Marketing source
• Added functionality (lost passwords, etc.)
• Send documents
• Everyone has it, and
• Everyone can use it
Richard Schneeman - @ThinkBohemian
7. How Does RoR Send
Email?
• Low Volume Mail Server Operating System
• use Gmail
Your
Computer MTA
• High Volume
Postfix
SMTP
(Sends Emails)
d
• use a re-mailer Their
Computer Courier
IMAP/POP
• Build your own
Richard Schneeman - @ThinkBohemian
8. How Does RoR Send
Email?
• ActionMailer
• Mail Gem
rails generate mailer Notifier
/app/mailers/notifier.rb
Richard Schneeman - @ThinkBohemian
9. Email With Rails
Notifier.signup_notification(“foo@example.com”).deliver
Richard Schneeman - @ThinkBohemian
10. Email With Rails
• Default Mailer Settings
• In-Line Attachments
• mail( ) method
Notifier.signup_notification(“foo@example.com”).deliver
Richard Schneeman - @ThinkBohemian
11. Email With Rails
• Default Mailer Settings
• In-Line Attachments
• mail( ) method
Notifier.signup_notification(“foo@example.com”).deliver
Richard Schneeman - @ThinkBohemian
12. Email With Rails
• Default Mailer Settings
• In-Line Attachments
• mail( ) method
Notifier.signup_notification(“foo@example.com”).deliver
Richard Schneeman - @ThinkBohemian
13. Email With Rails
✦ Using Gmail
config/environments/development.rb
✦ Use Port 587
✦ Gmail will throttle large number
of email requests
✦ Close to real life conditions
✦ Relatively Easy
✦ Don’t use with automated
Notifier.signup_notification(“foo@example.com”).deliver
Richard Schneeman - @ThinkBohemian
14. Email re-cap
✦ Receiving Email much harder
✦ Also less common
✦ Test your Mailer using an Interceptor
✦ use a re-mailer in production
✦ real life application: http://whyspam.me
Richard Schneeman - @ThinkBohemian
15. Background Tasks
• What is a background task?
• Why use one?
• Where do i put my task in rails?
• How do i keep my task alive?
Richard Schneeman - @ThinkBohemian
16. Background Task
• What is a background task?
• Any server process not initiated by http request
• Commonly run for long periods of time
• Do not block or stop your application
• Clean up server, or application
• Generate reports
• Much more
Richard Schneeman - @ThinkBohemian
17. Background Task
• rake tasks
• organize code in “lib/tasks”
• run with:
rake <command> RAILS_ENV=<environment>
Richard Schneeman - @ThinkBohemian
18. Background Task
• rake tasks
• organize code in “lib/tasks”
• run with:
rake <command> RAILS_ENV=<environment>
Richard Schneeman - @ThinkBohemian
19. Background Task
• Example
• cleanup.rake
namespace :cleanup do
desc "clean out Tickets over 30 days old"
task :old_tickets => :environment do
tickets = Ticket.find(:all, :conditions => ["created_at < ?", 30.days.ago ], :limit => 5000)
tickets.each do |ticket|
ticket.delete
end
end
rake cleanup:old_tickets
Richard Schneeman - @ThinkBohemian
20. Background Task
• What if i don’t want to execute from command line?
• run task with a automation program
• Cron
• Monit
• God
Richard Schneeman - @ThinkBohemian
21. Cron
• Very reliable unix time scheduler
• Built into the OS
• Executes command line calls
• Smallest interval is 1 minute
• Requires full paths
Richard Schneeman - @ThinkBohemian
22. Cron
• Awesome, but verbose
• Use Whenever gem instead
Richard Schneeman - @ThinkBohemian
23. Monit
• Not installed on OS by default
• Monitors and Executes (cron only executes)
• Extra functionality - Sysadmin emails etc...
Richard Schneeman - @ThinkBohemian
24. God
• Written in ruby
• Very configurable
• can be memory
intensive in some
applications
sudo gem install god
Richard Schneeman - @ThinkBohemian
25. Background Processes
• More Options
• Workling/Starling
• Backgroundrb
Richard Schneeman - @ThinkBohemian
26. Modules (ruby)
• Add “Mixins” to your code
• Keep code seperate with different namespaces
• put them in your rails project under /lib
Richard Schneeman - @ThinkBohemian
27. Modules (ruby)
• Example Mixin:
• include adds instance methods
class Dog module AntiCheating
include AntiCheating def drug_test
end ...
end
end
puppy = Dog.new
puppy.drug_test
>> Passed
Richard Schneeman - @ThinkBohemian
28. Modules (ruby)
• Example Mixin 2:
class Dog module AntiCheating
include AntiCheating def self.cleanup( level)
end ...
end
end
dirtyDog = Dog.new
dirtyDog.cleanup
>> No Method Error
Richard Schneeman - @ThinkBohemian
29. Modules (ruby)
• Example Mixin 2:
module AntiCheating
def self.cleanup( level)
...
end
end
AntiCheating.cleanup(10)
>>Very Clean
Richard Schneeman - @ThinkBohemian
30. Modules (ruby)
• Example Mixin 2:
• extend adds all module methods
class Dog module AntiCheating
extend AntiCheating def self.cleanup( level)
end ...
end
end
dirtyDog = Dog.new
dirtyDog.cleanup(2)
>> Kinda Clean
Richard Schneeman - @ThinkBohemian
31. Modules (ruby)
• Extra Credit:
• class << self
class Dog class Dog
class << self def self.sniff
def sniff ...
... = end
end end
end
end
Dog.sniff
Richard Schneeman - @ThinkBohemian
32. Modules (ruby)
• Extra Credit:
• class << self
class Dog module AntiCheating
class << self def self.cleanup( level)
include AntiCheating ...
end end
end end
dirtyDog = Dog.new
dirtyDog.cleanup(2)
>> Kinda Clean
Richard Schneeman - @ThinkBohemian
33. Modules (ruby)
• Example Namespace
module FastDogs module SlowDogs
class Dog class Dog
... ...
end end
end end
lassie = FastDogs::Dog.new droopy = SlowDogs::Dog.new
Richard Schneeman - @ThinkBohemian
34. Callbacks and
Observers
• Callbacks
• Non-polling event based method
• hooks into lifecycle of Active Record object
• Observers
• Implement trigger behavior for class outside of the
original class
Richard Schneeman - @ThinkBohemian
35. Callbacks
• Polling
• “Are We there Yet”
• Callback
• “I’ll tell you when we’re there”
Richard Schneeman - @ThinkBohemian
37. Callbacks in Rails
• Example
• before_destroy
class Topic < ActiveRecord::Base
before_destroy :delete_parents
def delete_parents
self.class.delete_all "parent_id = #{id}"
end
end
end
Richard Schneeman - @ThinkBohemian
38. Observers
• Add callback functionality without polluting the
model
• Will run after every new user instance is created
• Keeps your code clean(er)
Richard Schneeman - @ThinkBohemian
39. i18n & L10n
Source: @mattt
Richard Schneeman - @ThinkBohemian
40. i18n & L10n
Source: @mattt
Richard Schneeman - @ThinkBohemian
41. language configuration
Source: @mattt
Source: @mattt
Richard Schneeman - @ThinkBohemian