Skip to content

Instantly share code, notes, and snippets.

View gist:1481828
<html>
<head>
<script src="javascripts/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="javascripts/ember.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
App = Ember.Application.extend();
App.Node = Ember.Object.extend({
name: null,
View gist:1479734
<html>
<head>
<script src="javascripts/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="javascripts/ember.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
App = Ember.Application.extend();
App.Node = Ember.Object.extend({
name: null,
View gist:1071153
Paypal is generally a very poorly-designed product. It has evolved badly over the years, and today stands out as anachronistic and backward-looking compared to its competitors.
I have used PayPal as a customer, as a seller and as a developer, and I can confidently say that the experience is among the worst I've had in each category. As a professional web application developer, I would turn down any work that required me to integrated PayPal as a payment solution, and I actively warn my customers against relying on PayPal as a provider. I usually only need to explain that PayPal is expensive and difficult to integrated compared to the alternatives, but if pressed I will offer anecdotes about PayPal's awful consumer experience and customer service.
This latest interaction, which prompted this chain of customer support disasters, centers around two things: PayPal's inept user experience design, which prompts users to "Complete your purchase" on a screen that will only ever reject your purchase, and PayPal's
@scottburton11
scottburton11 / gist:849632
Created Mar 1, 2011
MongoDB indexed range query slower?
View gist:849632
> db.ip_blocks.find({start_address: {$lte: 1665637698}, end_address: {$gte: 1665637698}}).explain()
{
"cursor" : "BasicCursor",
"nscanned" : 3662284,
"nscannedObjects" : 3662284,
"n" : 1,
"millis" : 2645,
"indexBounds" : {
}
@scottburton11
scottburton11 / gist:811583
Created Feb 4, 2011
Mongoid related scopes in inherited models - fails in RC1
View gist:811583
class Business
include Mongoid::Document
references_many :cleanliness_ratings
...
end
class Rating
include Mongoid::Document
referenced_in :business
scope :good, :where => {:score.gte => 7}
View gist:775105
require 'mongoid'
require 'sunspot'
Mongoid.configure do |config|
config.master = Mongo::Connection.new.db("geo_near_with_boost")
end
class Hoobatz
include Mongoid::Document
field :name
View gist:228501
cloud start
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /Library/Ruby/Gems/1.8/gems/poolparty-1.4.0/bin/../lib/poolparty/cloud.rb:141: syntax error, unexpected ',', expecting '|' (SyntaxError)
define_method meth.to_sym do |*args, &block|
^
/Library/Ruby/Gems/1.8/gems/poolparty-1.4.0/bin/../lib/poolparty/cloud.rb:290: syntax error, unexpected kEND, expecting $end
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/poolparty-1.4.0/bin/../lib/poolparty.rb:50
from /Library/Ruby/Gems/1.8/gems/poolparty-1.4.0/bin/../lib/poolparty.rb:47:in `each'
from /Library/Ruby/Gems/1.8/gems/poolparty-1.4.0/bin/../lib/poolparty.rb:47
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'