Functional Pe(a)rls - the Purely Functional Datastructures editionosfameron
All new material, this time about one of the fundamental functional datastructures, the Linked List, and the overview of an implementation in Moosey Perl.
This covers some of the same material as https://github.com/osfameron/pure-fp-book but perhaps with more explanation (and covering much less material - it was only a 20 minute talk)
From session at http://www.lambdalounge.org.uk/ on 18th April 2016. Here's the original blurb:
So, Haskell is "an advanced purely-functional programming language" which supports writing "declarative, statically typed code". It may be optimized for academic buzzwords you've never heard of but... is it any good for writing code in the way that you'd write Perl, Python, or Ruby?
What are strong types, and why are we so frightened of them anyway? Can you develop interactively in Haskell, the way you would in a dynamic language?
Does Haskell have "whipuptitude" (being able to get things done quickly) as well as "manipulexity" (being able to manipulate complex things)? And perhaps most importantly, can writing Haskell be *fun*?
Haskell is founded on decades of the finest mathematical and computer science research. Perl, quite demonstrably isn't... but why do so many Perl programmers also love Haskell?
Audrey Tang wrote the first prototype for Perl 6, Pugs, in Haskell, and coined the phrase "lambdacamel" for the substantial crossover between the languages.
What does a Perl programmer make of Haskell? What are the lessons that can be learned (in either direction). And do the languages have more in common than you might have thought?
Some techniques from the heady world of Functional Programming implemented in idiomatic Perl using various techniques: closures, iterators, Devel::Declare, and some distilled evil. New version now with monads! (As presented at http://conferences.yapceurope.org/lpw2008/ )
Simply Business is starting to look into new tools to improve some of our mission-critical systems. There is one application, which would hugely benefit from the concurrency and fault tolerance model offered by languages like Elixir.
To increase awareness and gauge interest in the technology, we will have a bootcamp dedicated to giving us more insights into how to build and architect applications using Elixir and OTP.
It is meant to aim for slightly more advanced concepts, so in order to prepare rest of the team to be able to read the code and have some basic understanding of constructs and tooling - we have organised a LevelUP session, to talk exactly about that...
Functional Pe(a)rls - the Purely Functional Datastructures editionosfameron
All new material, this time about one of the fundamental functional datastructures, the Linked List, and the overview of an implementation in Moosey Perl.
This covers some of the same material as https://github.com/osfameron/pure-fp-book but perhaps with more explanation (and covering much less material - it was only a 20 minute talk)
From session at http://www.lambdalounge.org.uk/ on 18th April 2016. Here's the original blurb:
So, Haskell is "an advanced purely-functional programming language" which supports writing "declarative, statically typed code". It may be optimized for academic buzzwords you've never heard of but... is it any good for writing code in the way that you'd write Perl, Python, or Ruby?
What are strong types, and why are we so frightened of them anyway? Can you develop interactively in Haskell, the way you would in a dynamic language?
Does Haskell have "whipuptitude" (being able to get things done quickly) as well as "manipulexity" (being able to manipulate complex things)? And perhaps most importantly, can writing Haskell be *fun*?
Haskell is founded on decades of the finest mathematical and computer science research. Perl, quite demonstrably isn't... but why do so many Perl programmers also love Haskell?
Audrey Tang wrote the first prototype for Perl 6, Pugs, in Haskell, and coined the phrase "lambdacamel" for the substantial crossover between the languages.
What does a Perl programmer make of Haskell? What are the lessons that can be learned (in either direction). And do the languages have more in common than you might have thought?
Some techniques from the heady world of Functional Programming implemented in idiomatic Perl using various techniques: closures, iterators, Devel::Declare, and some distilled evil. New version now with monads! (As presented at http://conferences.yapceurope.org/lpw2008/ )
Simply Business is starting to look into new tools to improve some of our mission-critical systems. There is one application, which would hugely benefit from the concurrency and fault tolerance model offered by languages like Elixir.
To increase awareness and gauge interest in the technology, we will have a bootcamp dedicated to giving us more insights into how to build and architect applications using Elixir and OTP.
It is meant to aim for slightly more advanced concepts, so in order to prepare rest of the team to be able to read the code and have some basic understanding of constructs and tooling - we have organised a LevelUP session, to talk exactly about that...
A slightly-modified version of my IPRUG talk, this time for the BT DevCon5 developer conference at Adastral Park on 25 May 2012.
The main changes are the addition of the Ruby section and the increased number of HHGTTG references in honour of towel day.
This is a presentation I gave to a recent NortHACKton meeting. The audience were a mixture of seasoned developers who were new to Python and complete newbies who'd never coded anything before.
In the end everyone created a Parrot class and did a show and tell of their code to the rest of the group.
Find out about NortHACKton here: http://northackton.stdin.co.uk/blog/
Taking Perl to Eleven with Higher-Order FunctionsDavid Golden
Sometimes, you just need your Perl to go one higher. This talk will teach you how to use functions that return functions for powerful, succinct solutions to some repetitive coding problems. Along the way, you’ll see concrete examples using higher-order Perl to generate declarative, structured “fake” data for testing.
An Elephant of a Different Colour: HackVic Metcalfe
Slides from my GTA-PHP Meetup talk about Hack which is the Facebook version of the PHP programming language which runs under their HHVM runtime environment for PHP. The focus of my talk was the language improvements that the Facebook team has added to PHP.
There's a lot of information in the presenter's notes, so if you're interested in Hack scroll down to see the extras.
Cukeup nyc ian dees on elixir, erlang, and cucumberlSkills Matter
Elixir, Erlang, and Cucumberl
Elixir is a new Ruby-inspired programming language that uses the powerful concurrent machinery of Erlang behind the scenes. Cucumberl is a port of Cucumber to Erlang. Let's see what happens when we put them together.
In this talk, we'll discuss:
How Erlang's concurrency makes it easier to write robust programs
Elixir's approachable syntax
How to test Erlang and Elixir programs using Cucumberl
Attendees will walk away with a solid introduction to the principles of Erlang, and an appreciation of the way Elixir brings the joy of Ruby to the solidity of the Erlang runtime.
Why is Haskell so hard! (And how to deal with it?)Saurabh Nanda
Slides of my talk at Functional Conf 2019 where I draw upon my personal journey of learning Haskell and try to explain WHY learning Haskell is so hard. And even while it is hard, it is worth learning Haskell!
Are you stuck in the Java world? I’ll share my story about convincing my team and the client of the benefits of Kotlin. Furthermore I’ll delve into how we migrated an existing Java Android app, with 300k active users, to Kotlin.
Even if you have never seen Kotlin before, come and see how you will create better apps with this modern and elegant language. At the end of this talk you’ll be able to convince your team / client why it’s a great to use Kotlin.
The power of Kotlin can be leveraged everywhere you use Java, since it compiles to JVM bytecode. So even if you’re not an Android developer, check out this session to get acquainted with Kotlin!
No excuses: switch to Kotlin
The need for functional programming languages is more important than ever with the current hardware and software trends. Scala has become the number one choice for functional programming languages and is becoming the language of choice for many development teams. But with the introduction of functional programming in Java 8 is Scala still relevant and needed?
A slightly-modified version of my IPRUG talk, this time for the BT DevCon5 developer conference at Adastral Park on 25 May 2012.
The main changes are the addition of the Ruby section and the increased number of HHGTTG references in honour of towel day.
This is a presentation I gave to a recent NortHACKton meeting. The audience were a mixture of seasoned developers who were new to Python and complete newbies who'd never coded anything before.
In the end everyone created a Parrot class and did a show and tell of their code to the rest of the group.
Find out about NortHACKton here: http://northackton.stdin.co.uk/blog/
Taking Perl to Eleven with Higher-Order FunctionsDavid Golden
Sometimes, you just need your Perl to go one higher. This talk will teach you how to use functions that return functions for powerful, succinct solutions to some repetitive coding problems. Along the way, you’ll see concrete examples using higher-order Perl to generate declarative, structured “fake” data for testing.
An Elephant of a Different Colour: HackVic Metcalfe
Slides from my GTA-PHP Meetup talk about Hack which is the Facebook version of the PHP programming language which runs under their HHVM runtime environment for PHP. The focus of my talk was the language improvements that the Facebook team has added to PHP.
There's a lot of information in the presenter's notes, so if you're interested in Hack scroll down to see the extras.
Cukeup nyc ian dees on elixir, erlang, and cucumberlSkills Matter
Elixir, Erlang, and Cucumberl
Elixir is a new Ruby-inspired programming language that uses the powerful concurrent machinery of Erlang behind the scenes. Cucumberl is a port of Cucumber to Erlang. Let's see what happens when we put them together.
In this talk, we'll discuss:
How Erlang's concurrency makes it easier to write robust programs
Elixir's approachable syntax
How to test Erlang and Elixir programs using Cucumberl
Attendees will walk away with a solid introduction to the principles of Erlang, and an appreciation of the way Elixir brings the joy of Ruby to the solidity of the Erlang runtime.
Why is Haskell so hard! (And how to deal with it?)Saurabh Nanda
Slides of my talk at Functional Conf 2019 where I draw upon my personal journey of learning Haskell and try to explain WHY learning Haskell is so hard. And even while it is hard, it is worth learning Haskell!
Are you stuck in the Java world? I’ll share my story about convincing my team and the client of the benefits of Kotlin. Furthermore I’ll delve into how we migrated an existing Java Android app, with 300k active users, to Kotlin.
Even if you have never seen Kotlin before, come and see how you will create better apps with this modern and elegant language. At the end of this talk you’ll be able to convince your team / client why it’s a great to use Kotlin.
The power of Kotlin can be leveraged everywhere you use Java, since it compiles to JVM bytecode. So even if you’re not an Android developer, check out this session to get acquainted with Kotlin!
No excuses: switch to Kotlin
The need for functional programming languages is more important than ever with the current hardware and software trends. Scala has become the number one choice for functional programming languages and is becoming the language of choice for many development teams. But with the introduction of functional programming in Java 8 is Scala still relevant and needed?
¿Se puede medira la productividad del área de desarrollo?
Liliana Perez Louzao, Gerente de desarrollo de sistemas de Banco Galicia
Miguel Sarquis, Director del centro regional de desarrollo de Citi
Hernan Codari, especialista en desarrollo de sistemas
Guillermo Tolosa, gerente de desarrollo de sistemas de Standard Bank Argentina
Moderadora: Aixa Manelli, gerente de sistemas y tecnología de Banco Itaú
The reality for companies that are trying to figure out their blogging or content strategy is that there's a lot of content to write beyond just the "buy now" page.
A few techniques for everyday Ruby hacking
Touching on the following topics:
DRY Assignment
Ternary operator
Bang bang
Conditional assignment
Parallel assignment
Multiple return
Implied begin
Exception lists
Symbol to Proc
MapReduce
Regex captures
tap
sprintf
case equality
Splat Array
Splat args
blank?
present?
presence
truncate
try
in?
Delegation
delegate
Memoization
memoize
alias_method_chain
class_attribute
HashWithIndifferentAccess
A talk I gave at the June 2010 meeting of the London Ruby User Group. It's about the first bit of ruby I ever wrote, way back in 2003. A little bit of personal history, a little bit of ruby history, a whole lot of terrible code for you to learn from.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
6. ...computer engineers, focus on the machines. They think, "By
doing this, the machine will run faster. By doing this, the
machine will run more effectively..." They are focusing on
machines. But in fact we need to focus on humans, on how
humans care about doing programming...
We are the masters. They are the slaves.
7. "I hope to see Ruby help every programmer
in the world to be productive, and to enjoy
programming, and to be happy. That is the
primary purpose of Ruby language."
35. class Person
def walk
"walking..."
end
end
juan = Person.new
juan.walk # => "walking..."
class Person
def eat
"eating..."
end
end
juan.eat # => "eating..."
52. module Walkable
def walk
puts "I'm walking"
end
end
module Runnable
def run
puts "I'm running"
end
end
class Person
include Walkable
include Runnable
end
joe = Person.new
joe.walk # => I'm walking
joe.run # => I'm running
53. module Summable
def sum(a, b)
a + b
end
end
class Number
extend Summable
end
Number.sum 2, 4 # => 6
57. 3.times do
puts "hey"
end
3.times { puts "hey" }
58. 3.times do
puts "hey"
end
class Fixnum
def times
i = 0
while i < self
yield
i += 1
end
end
end
59. 3.times do
puts "hey"
end
class Fixnum
def times(&block)
i = 0
while i < self
block.call
i += 1
end
end
end
60. 3.times do 3.times do
puts "hey" puts "hey"
end end
class Fixnum class Fixnum
def times def times(&block)
i = 0 i = 0
while i < self while i < self
yield block.call
i += 1 i += 1
end end
end end
end end
61. 3.times do |i|
puts i
end
class Fixnum
def times
i = 0
while i < self
yield(i)
i += 1
end
end
end
93. class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.string :name
t.string :email
t.timestamps
end
end
def self.down
drop_table :users
end
end
94. $ rails g model Profile user_id:integer about:text
97. class CreateProfiles < ActiveRecord::Migration
def self.up
create_table :profiles do |t|
t.integer :user_id
t.text :about
t.timestamps
end
end
def self.down
drop_table :profiles
end
end
122. @user = User.find(3)
# => SELECT * FROM users WHERE id = 3;
@user = User.find_by_name(“Joe”)
# => SELECT * FROM users WHERE name = ‘Joe’ LIMIT 1;
@user = User.first
# => SELECT * FROM users LIMIT 1;
123. @users = User.all
# => SELECT * FROM users;
@users = User.where(:name => “John”)
# => SELECT * FROM users WHERE name = ‘John’;
@users = User.where(“name LIKE ?”, “Jo%”)
# => SELECT * FROM users WHERE name LIKE ‘Jo%’;
124. @users = User.order(“created_at DESC”)
# => SELECT * FROM users ORDER BY created_at DESC;
@users = User.joins(:profile).where(“profiles.about IS NULL”)
# => SELECT * FROM users LEFT OUTER JOIN profiles ON users.id =
profiles.user_id WHERE profiles.about IS NULL;
135. Isshoni::Application.routes.draw do
get '/users' => 'users#index'
get '/users/:id' => 'users#show'
get '/users/new' => 'users#new'
post '/users' => 'users#create'
get '/users/:id/edit' => 'users#edit'
put '/users/:id' => 'users#update'
delete '/users/:id' => 'users#destroy'
end
146. Isshoni::Application.routes.draw do
get '/users' => 'users#index'
get '/users/:id' => 'users#show'
get '/users/new' => 'users#new'
post '/users' => 'users#create'
get '/users/:id/edit' => 'users#edit'
put '/users/:id' => 'users#update'
delete '/users/:id' => 'users#destroy'
end
149. class UsersController < ApplicationController
def index
end
def show
end
def new
end
def create
end
def edit
end
def update
end
def destroy
end
end
150. class UsersController < ApplicationController
# GET /users
def index
@users = User.all
end
end
151. class UsersController < ApplicationController
# GET /users/:id
def show
@user = User.find(params[:id])
end
end
152. class UsersController < ApplicationController
# GET /users/new
def new
@user = User.new
end
end
153. class UsersController < ApplicationController
# POST /users
def create
@user = User.new(params[:user])
if @user.save
redirect_to users_path
else
render :new
end
end
end
154. class UsersController < ApplicationController
# GET /users/:id/edit
def edit
@user = User.find(params[:id])
end
end
155. class UsersController < ApplicationController
# PUT /users/:id
def update
@user = User.find(params[:id])
if @user.update_attributes(params[:user])
redirect_to user_path(@user)
else
render :edit
end
end
end
156. class UsersController < ApplicationController
# DELETE /users/:id
def destroy
@user = User.find(params[:id])
@user.destroy
redirect_to users_path
end
end
157. class UsersController < ApplicationController
# GET /users
def index
@users = User.all
end
# GET /users/:id/edit
# GET /users/:id
def edit
def show
@user = User.find(params[:id])
@user = User.find(params[:id])
end
end
# PUT /users/:id
# GET /users/new
def update
def new
@user = User.find(params[:id])
@user = User.new
if
end
@user.update_attributes(params[:user])
redirect_to user_path(@user)
# POST /users
else
def create
render :edit
@user = User.new(params[:user])
end
if @user.save
end
redirect_to users_path
else
# DELETE /users/:id
render :new
def destroy
end
@user = User.find(params[:id])
end
@user.destroy
redirect_to users_path
end
end
159. class UsersController < ApplicationController
before_filter :get_user, :only => [:show, :edit, :update, :destroy]
def show
end
def edit
end
def update
if @user.update_attributes(params[:user])
redirect_to user_path(@user)
else
render :edit
end
end
def destroy
@user.destroy
redirect_to users_path
end
private
def get_user
@user = User.find(params[:id])
end
end
192. class UserMailer < ActionMailer::Base
default :from => "no-reply@foobar.com"
def password_reset_instructions(user)
@user = user
mail :to => @user.email, :subject => "Password Reset"
end
end
196. class UsersController < ApplicationController
def create
@user = User.new(params[:user])
if @user.save
redirect_to users_path
else
render :new
end
end
end
204. # params[:username] = "nick' OR 1 = 1 OR username LIKE '%"
@users = User.where("username LIKE '%#{params[:username]}%'")
# SELECT * FROM users WHERE username LIKE '%nick' OR 1 = 1 OR username LIKE '%';
205. # params[:username] = "nick' OR 1 = 1 OR username LIKE '%"
@users = User.where("username LIKE ?", "%#{params[:username]}%")
# SELECT * FROM users WHERE username LIKE 'nick' OR 1 = 1 OR username LIKE '%';
212. Started POST "/sessions" for 127.0.0.1 at Sat Jun 25 19:43:44 -0500 2011
Processing by SessionsController#create as HTML
Parameters: {"password"=>"123456", "email"=>"foo@bar.com"}
SQL (0.5ms) SHOW TABLES
Account Load (0.2ms) SELECT `accounts`.* FROM `accounts` WHERE
`accounts`.`email` = 'foo@bar.com' LIMIT 1
Completed 200 OK in 274ms (Views: 66.3ms | ActiveRecord: 0.7ms)
214. module Deli
class Application < Rails::Application
config.filter_parameters += [:password]
end
end
215. Started POST "/sessions" for 127.0.0.1 at Sat Jun 25 19:43:44 -0500 2011
Processing by SessionsController#create as HTML
Parameters: {"password"=>"[FILTERED]", "email"=>"foo@bar.com"}
SQL (0.5ms) SHOW TABLES
Account Load (0.2ms) SELECT `accounts`.* FROM `accounts` WHERE
`accounts`.`email` = 'foo@bar.com' LIMIT 1
Completed 200 OK in 274ms (Views: 66.3ms | ActiveRecord: 0.7ms)
225. class ApplicationController < ActionController::Base
before_filter :set_language
private
def set_language
I18n.locale = params[:lang].to_sym if params[:lang]
end
end