I hereby claim:
- I am nhajratw on github.
- I am nhajratw (https://keybase.io/nhajratw) on keybase.
- I have a public key whose fingerprint is E853 899F 97FE 6231 D159 F204 41D6 BB63 207A C94C
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
# | |
# | |
require 'net/http' | |
my_ip = Net::HTTP.get(URI('http://icanhazip.com')) | |
system "aws ec2 authorize-security-group-ingress --group-id sg-2f666d4d --protocol all --cidr #{my_ip}/32" | |
SICP 1.2 | |
Fork me. Solve me. | |
==== | |
-71/300 <= | |
(/ (+ 5 4 (- 2 (- 3 (+ 6 (/ 1 5))))) | |
(* 3 (- 6 2) (- 2 7))) |
Please excuse my embarrassing Groovy code. This is a simplified cuke4duke Step definition. | |
GroceryService is a java class that makes a call to repository.findByNamedQueryAndNamedParam("Store.by_zip_code_with_active_promotions", "zip", "48176") | |
The error i'm getting is: | |
org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: groovy.mock.interceptor.MockFor.findByNamedQueryAndNamedParam() is applicable for argument types: (java.lang.String, java.lang.String, java.lang.String) values: [Store.by_zip_code_with_active_promotions, zip, 48176] (NativeException) | |
When(~"the service is invoked") { | |
store = new Store() |
package com.chikli.st | |
import org.junit.runner.RunWith | |
import org.scalatest.{FeatureSpec, GivenWhenThen} | |
import org.scalatest.junit.JUnitRunner | |
@RunWith(classOf[JUnitRunner]) | |
class GolSpec extends FeatureSpec with GivenWhenThen { | |
feature("a cell with zero neighbors dies in the next generation") { |
I have a model: | |
class Offer extends Backbone.Model | |
And a Collection: | |
class Offers extends Backbone.Collection | |
model: Offer | |
initialize: -> |
There are 2 main problems with the code below: | |
1) It appears that fetch is getting called twice somehow | |
2) The fetched JSON is not parsing into the OfferClass objects. | |
I have a server that returns the following JSON at /offerClasses | |
[ {"id":1,"name":"Introductory"}, {"id":2,"name":"Loyalty"} ] | |
Coffee file |
# Keep track of the original sync method so we can | |
# delegate to it at the end of our new sync. | |
originalSync = Backbone.sync | |
# Our new overriding sync with dataType and ContentType | |
# that override the default JSON configurations. | |
Backbone.sync = (method, model, options) -> | |
options = _.extend(options, | |
dataType: 'xml' |
class OE.Offer extends Backbone.Model | |
class OE.Offers extends Backbone.Collection | |
model: OE.Offer | |
url: 'http://localhost:7000/offer/opportunities/merchant/123' | |
parse: (response) -> | |
template = ["//offer", { | |
id: 'id', | |
name: 'name', |
class TypeTab | |
include PageObject | |
radio_button(:premium_offer_yes, {:name => 'premium-offer', :value => 'true'}) | |
radio_button(:premium_offer_no, {:name => 'premium-offer', :value => 'false'}) | |
# doesn't seem to work in a block | |
def non_working_select_data | |
premium_offer_yes_element.when_visible do |