This is the 6th 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
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
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 3rd 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
This is the 2nd 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
Introduction to Ruby and Introduction to Ruby on Rails basic concepts for beginners. The google presentation is even better in full screen https://docs.google.com/presentation/d/1EE0VuB_PkD2-8j5JNs6CUQHb4J9ToIgC7-IxYTojiS0/pub?start=false&loop=false&delayms=3000#slide=id.p
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.
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..
Javascript Views, Client-side or Server-side with NodeJSSylvain Zimmer
A talk I gave at the Paris Node Meetup on June 8th 2011, in front of all the best JS developers in Paris and NodeJS creator Ryan Dahl.
I hope it will make some devs avoid some of the horrible hashbang practices we see on websites like the new twitter !
These are the slides from my talk about the AppScale project at the SBonRails meetup. It covers AppScale as well as Google App Engine and the research projects have come out of it, including Neptune, a Ruby DSL focused on computation-heavy workloads.
Reuven Lerner's first talk from Open Ruby Day, at Hi-Tech College in Herzliya, Israel, on June 27th 2010. An overview of what makes Rails a powerful framework for Web development -- what attracted Reuven to it, what are the components that most speak to him, and why others should consider Rails for their Web applications.
This is the 3rd 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
This is the 2nd 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
Introduction to Ruby and Introduction to Ruby on Rails basic concepts for beginners. The google presentation is even better in full screen https://docs.google.com/presentation/d/1EE0VuB_PkD2-8j5JNs6CUQHb4J9ToIgC7-IxYTojiS0/pub?start=false&loop=false&delayms=3000#slide=id.p
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.
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..
Javascript Views, Client-side or Server-side with NodeJSSylvain Zimmer
A talk I gave at the Paris Node Meetup on June 8th 2011, in front of all the best JS developers in Paris and NodeJS creator Ryan Dahl.
I hope it will make some devs avoid some of the horrible hashbang practices we see on websites like the new twitter !
These are the slides from my talk about the AppScale project at the SBonRails meetup. It covers AppScale as well as Google App Engine and the research projects have come out of it, including Neptune, a Ruby DSL focused on computation-heavy workloads.
Reuven Lerner's first talk from Open Ruby Day, at Hi-Tech College in Herzliya, Israel, on June 27th 2010. An overview of what makes Rails a powerful framework for Web development -- what attracted Reuven to it, what are the components that most speak to him, and why others should consider Rails for their Web applications.
At Tuenti, we do 3 code pushes per week, sometimes modifying thousands of files and running thousands of automated tests and build operations before, to ensure not only that the code works but also that proper localization is applied, bundles are generated and files get deployed to hundreds of servers as fast and reliable as possible.
We use opensource tools like Mercurial, MySQL, Jenkins, Selenium, PHPUnit and Rsync among our own in-house ones, and have different development, testing, staging and production environments.
We had to fight with problems like statics bundling and versioning, syntax errors and of course the fact that we have +100 engineers working on the codebase, merging and releasing more than a 15 branches the same day. We also switched from Subversion to Mercurial to obtain more flexibility and faster branching operations.
With this talk we will explain the process of how code changes in ourcode repository end up in live code, detailing some practices and tips that we apply, problems we had and how we solved them.
Voight-Kampff for Email Addresses: Quantifying Email Address Reputation to Id...Joshua Kamdjou
“Is this email address real?” Internet history and age can’t be faked. Legitimate email addresses have social media profiles, Github profiles and commits, LinkedIn accounts, and they’ve been in credential dumps and data breaches. Real people can be differentiated from attacker personas using these internet breadcrumbs.
EmailRep is a system of crawlers, scanners, and enrichment services that collects data on email addresses, domains, and internet personas to predict the relative risk of an email address. It uses OSINT techniques, crawlers on forums, social media sites, and professional networking sites, as well as data points from credential breaches, malicious phishing kits, community reported phishing emails, spam lists, and more.
In this talk I’ll discuss why we built EmailRep, dive in to how Blue and Red teams are using this, and review some shortcomings of this approach that future attackers will seek to exploit. Finally, I’ll deep dive on the technical architecture and implementation, giving an overview of how you could build this yourself.
We’ll invite audience members on stage to query EmailRep, live, for their personal email addresses or attacker email addresses they’ve encountered or used in their work.
EmailRep is free to use via emailrep.io or API.
Similar to Rails 3 Beginner to Builder 2011 Week 6 (20)
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 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 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 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 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/
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
3. Email in Rails
• What is Email?
• Why Use Email?
• How does Rails use email?
@Schneems
Wednesday, July 20, 2011
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)
@Schneems
Wednesday, July 20, 2011
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
@Schneems
Wednesday, July 20, 2011
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
@Schneems
Wednesday, July 20, 2011
7. How Does RoR Send
Email? Mail Server
• Low Volume
Operating System
Your
Computer MTA
• use Gmail Postfix
SMTP
• High Volume
(Sends d
Emails)
Their
Computer Courier
• use a re-mailer IMAP/POP
• Build your own
@Schneems
Wednesday, July 20, 2011
8. How Does RoR Send
• ActionMailer
• Mail Gem
rails generate mailer Notifier
/app/mailers/notifier.rb
@Schneems
Wednesday, July 20, 2011
9. Email With Rails
Notifier.signup_notification(“foo@example.com”).deliver
@Schneems
Wednesday, July 20, 2011
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
testing
Notifier.signup_notification(“foo@example.com”).deliver
@Schneems
Wednesday, July 20, 2011
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
✦ No longer running
@Schneems
Wednesday, July 20, 2011
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?
@Schneems
Wednesday, July 20, 2011
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
@Schneems
Wednesday, July 20, 2011
17. Background Task
• rake tasks
• organize code in “lib/tasks”
• run with:
rake <command> RAILS_ENV=<environment>
@Schneems
Wednesday, July 20, 2011
18. 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
end
rake cleanup:old_tickets
@Schneems
Wednesday, July 20, 2011
19. Background Task
• What if i don’t want to execute from
command line?
• run task with a automation program
• Cron
• Monit
• God
@Schneems
Wednesday, July 20, 2011
20. Cron
• Very reliable unix time scheduler
• Built into the OS
• Executes command line calls
• Smallest interval is 1 minute
• Requires full paths
@Schneems
Wednesday, July 20, 2011
21. Monit
• Not installed on OS by default
• Monitors and Executes (cron only executes)
• Extra functionality - Sysadmin emails etc...
@Schneems
Wednesday, July 20, 2011
22. God
• Written in ruby
• Very configurable
• can be memory
intensive in some
applications
sudo gem install god
@Schneems
Wednesday, July 20, 2011
23. Background
• More Options
• Workling/Starling
• Backgroundrb
• ResQue
@Schneems
Wednesday, July 20, 2011
24. Modules (ruby)
• Add “Mixins” to your code
• Keep code seperate with different namespaces
• put them in your rails project under /lib
@Schneems
Wednesday, July 20, 2011
25. Modules (ruby)
• Example Mixin:
• include adds instance methods
module AntiCheating
class Dog
def drug_test
include AntiCheating
...
end
end
end
puppy = Dog.new
puppy.drug_test
>> Passed
@Schneems
Wednesday, July 20, 2011
26. Modules (ruby)
• Example Mixin 2:
module AntiCheating
class Dog
def self.cleanup(level)
include AntiCheating
...
end
end
end
dirtyDog = Dog.new
dirtyDog.cleanup
>> No Method Error
@Schneems
Wednesday, July 20, 2011
27. Modules (ruby)
• Example Mixin 2:
module AntiCheating
def self.cleanup(level)
...
end
end
AntiCheating.cleanup
>> Very Clean
@Schneems
Wednesday, July 20, 2011
28. 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”
@Schneems
Wednesday, July 20, 2011
29. Modules (ruby)
• Extra Credit:
• class << self
class Dog
class Dog
class << self
def self.sniff
def sniff
... == ...
end
end
end
end
end
@Schneems
Wednesday, July 20, 2011
30. 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(10)
>> “Really Clean”
@Schneems
Wednesday, July 20, 2011
31. Modules (ruby)
• Example Namespace
module FastDogs module SlowDogs
class Dog class Dog
... ...
end end
end end
lassie = FastDogs::Dog.new droopy = SlowDogs::Dog.new
@Schneems
Wednesday, July 20, 2011
32. 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
@Schneems
Wednesday, July 20, 2011
33. Callbacks
• Polling
• “Are We there Yet”
• Callback
• “I’ll tell you when we’re there”
@Schneems
Wednesday, July 20, 2011
35. 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
@Schneems
Wednesday, July 20, 2011
36. Observers
• Add callback functionality without polluting the
model
• Will run after every new user instance is created
• Keeps your code clean(er)
@Schneems
Wednesday, July 20, 2011