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
| subject { App.new } | |
| App::PURPOSES.each do |p,_| | |
| context do | |
| before { subject.purpose = p } | |
| its(:purpose){ should == p } | |
| end | |
| end | |
| App::PLATFORMS.each do |p,_| |
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
| %w(john paul ringo george).map { |p| p.capitalize } | |
| # => ["John", "Paul", "Ringo", "George"] |
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
| hash = { :name=>"Steve Graham", :age=>24 } | |
| # => { :name=>"Steve Graham", :age=>24 } | |
| array = *hash | |
| # => [[:name, "Steve Graham"], [:age, 24]] |
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
| def logger | |
| @logger ||= Logger.new(STDOUT) | |
| end |
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
| s='s=;puts s[0,2]+39.chr+s+39.chr+s[2,36]';puts s[0,2]+39.chr+s+39.chr+s[2,36] |
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
| def gen_times(factor) | |
| return Proc.new { |n| n * factor } | |
| end | |
| times3 = gen_times(3) | |
| times5 = gen_times(5) | |
| times3.call(12) #=> 36 | |
| times5.call(5) #=> 25 | |
| times3.call(times5.call(4)) #=> 60 |
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
| ==> Downloading http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_1.15.8.12.tar.bz2 | |
| Already downloaded: /Library/Caches/Homebrew/dpkg-1.15.8.12.tar.bz2 | |
| /usr/bin/tar xf /Library/Caches/Homebrew/dpkg-1.15.8.12.tar.bz2 | |
| ==> Patching | |
| /usr/bin/patch -f -p1 -i 000-homebrew.diff | |
| patching file configure | |
| patching file lib/dpkg/dpkg.h | |
| Hunk #1 succeeded at 97 with fuzz 1. | |
| ==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/dpkg/1.15.8.12 --disable-compiler-warnings --disable-linker-optimisations --disable-compiler-optimisations --without-start-stop-daemon | |
| ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/dpkg/1.15.8.12 --disable-compiler-warnings --disable-linker-optimisations --disable-compiler-optimisations --without-start-stop-daemon |
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
| This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
| Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
| Licensed to The Apache Software Foundation, http://www.apache.org/ | |
| Benchmarking iloveyoubiebs.herokuapp.com (be patient).....done | |
| Server Software: thin | |
| Server Hostname: iloveyoubiebs.herokuapp.com | |
| Server Port: 80 |
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
| { | |
| "BundleType": "Application", | |
| "BundleIdentifier": "request", | |
| "AppIcon": { | |
| "36x18": "tutorial.png" | |
| }, | |
| "AppName": { | |
| "en": "Request Line" | |
| }, | |
| "SupportedLanguages": [ |
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
| var Twilio = require('twilio-js'); | |
| Twilio.AccountSid = "xxxxxxxxxxxxxxxxxxxxxx"; | |
| Twilio.AuthToken = "xxxxxxxxxxxxxxxxxxxxxx"; | |
| Twilio.SMS.create({from: "+12125550000", to: "+16465551234", body: "OMG, my app can text!"}, function (err, res) { | |
| // err is an Error object or null | |
| // res is a an object containing the response e.g. | |
| // { sid: "SMxxxxxxxxxxxxxxxxxxxxxxx", body: "OMG, my app can text!", ... } |