-
Code school - [http://www.codeschool.com/courses/testing-with-rspec]
-
The RSpec book - [http://pragprog.com/book/achbd/the-rspec-book]
-
Everyday Rails Testing with RSpec - Leanpub - [http://cl.ly/2z1M2U2p0V0Q]
-
Railscasts - How I test [http://railscasts.com/episodes/275-how-i-test]
-
Railscasts - Factories not Fixtures [http://railscasts.com/episodes/158-factories-not-fixtures-revised]
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
Thu Jan 12 15:21:23 UTC 2017 |
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
### Keybase proof | |
I hereby claim: | |
* I am paulspringett on github. | |
* I am paulspringett (https://keybase.io/paulspringett) on keybase. | |
* I have a public key whose fingerprint is CA7D E438 060B 4BE7 E82D 044E D9EC 1739 EEEB 5895 | |
To claim this, I am signing this object: |
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
regex = /^(([a-z0-9\-]+\.)+[a-z]{2,})$/ | |
regex.match('example.org') | |
=> #<MatchData "example.org"...> | |
regex.match('nota-hostname') | |
=> nil | |
regex.match('sub.example.org') | |
=> #<MatchData "sub.example.org"...> |
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
# Creating a like | |
curl -X POST \ | |
http://api.rusic.com/buckets/123/ideas/456/like \ | |
-D "like[should_post_to_social]=true" \ | |
-H "X-API-Key: 8bca8fa86b" \ | |
-H "X-Participant-Token: 19ba7d23ef" \ | |
# Removing a like | |
curl -X DELETE \ | |
http://api.rusic.com/buckets/123/ideas/456/like \ |
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
class Array | |
# Public: slice Array while focusing on the given item in the array | |
# and padding around it | |
# | |
# item - element in the Array to focus on | |
# padding - Integer of the number of elements to pad by (default: 2) | |
# | |
# Examples: | |
# items = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t"] | |
# |
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
https://github.com/styleguide | |
https://github.com/styleguide/ruby | |
https://github.com/bbatsov/ruby-style-guide | |
https://github.com/bbatsov/rails-style-guide | |
https://github.com/copycopter/style-guide | |
https://github.com/polarmobile/coffeescript-style-guide |
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
# $.esc | |
# Binds the given callback function to the keyup | |
# event for the "Escape" key | |
# Example usage: | |
# $.esc(function(event) { | |
# alert("Escape key pressed!"); | |
# }); | |
# Compatible with jQuery or Zepto | |
$.esc = (callback) -> | |
$(document).on 'keyup', (event) -> |
<SERVER IN FRANCE>@ns390706:~$ wget eventbrite.com
--2012-04-12 17:00:28-- http://eventbrite.com/
Resolving eventbrite.com... 184.73.240.63, 50.16.194.113, 50.17.185.155, ...
Connecting to eventbrite.com|184.73.240.63|:80... connected.
HTTP request sent, awaiting response... 301 MOVED PERMANENTLY
Location: http://www.eventbrite.com/ [following]
--2012-04-12 17:00:29-- http://www.eventbrite.com/
Resolving www.eventbrite.com... 50.16.194.113, 50.17.185.155, 50.17.189.7, ...
Connecting to www.eventbrite.com|50.16.194.113|:80... connected.
HTTP request sent, awaiting response... 302 FOUND
Install
- Command Line Tools for Xcode
- Kenneth Reitz's OSX GCC Installer
Install with this line
NewerOlder