Skip to content

Instantly share code, notes, and snippets.

@crystalneth
crystalneth / gist:0c0c344966cfb602c86fb125a3f887f4
Created April 12, 2020 04:47
Firestore Query Browser build error
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v79-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.3 and node@13.12.0 (node-v79 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v79-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.3 and node@13.12.0 (node-v79 ABI, unknown) (falling back to source compile with node-gyp)
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:202:
In file included from ../../nan/nan_converters.h:67:
context "update user_data attributes" do
setup do
@user = Factory(:user)
@old_user_data_id = @user.user_data.id
@user.update_attributes!(:given_name => 'bar', :user_data_attributes => {:company => 'bar', :data => {:foo => :bar}})
assert_equal({'foo' => :bar}, @user.user_data.data)
# @user.user_data.save! # TODO WHY???
end
should("update attributes") do
assert_equal @old_user_data_id, @user.user_data.id
Started GET "/store/admin/" for 127.0.0.1 at 2012-09-18 18:24:46 -0700
Processing by Spree::Admin::OverviewController#index as HTML
Spree::Preference Load (0.1ms) SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."name" = 'allow_ssl_in_development_and_test' LIMIT 1
Spree::Preference Load (0.1ms) SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."name" = 'default_locale' LIMIT 1
CACHE (0.0ms) SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."name" = 'default_locale' LIMIT 1
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
Spree::Order Load (2.1ms) SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."user_id" = 1 AND "spree_orders"."completed_at" IS NULL ORDER BY created_at ASC LIMIT 1
Spree::Order Load (0.2ms) SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."id" = 1069267077 LIMIT 1
Spree::Adjustment Load (0.3ms) SELECT "spree_adjustments".*
@crystalneth
crystalneth / gist:2412039
Created April 18, 2012 08:23
Longest email signature ever?

Thomson.co.uk for Holidays, Flights, Hotels, customer reviews and over 2000 videos. Find us at www.thomson.co.uk or on your high street.

CONFIDENTIALITY NOTICE & DISCLAIMER

This message, together with any attachments, is for the confidential and exclusive use of the intended addresses(s). If you receive it in error, please delete the message and its attachments from your system immediately and notify us by return e-mail. Do not disclose copy, circulate or use any information contained in this e-mail.

§ The content of this e-mail is to be read subject to our terms of business, as applicable.

§ E-mail may be intercepted or affected by viruses and we accept no responsibility for any interception or liability for any form of viruses introduced with this e-mail.

// Can't get $and working
// This is Mongo 2.0.4
```
> db.foo.insert({letter: 'a', number: 2})
> db.foo.find()
{ "_id" : ObjectId("4f8cbf5b19a4296c4255028e"), "letter" : "a", "number" : 2 }
> db.foo.find({letter: 'a'})
{ "_id" : ObjectId("4f8cbf5b19a4296c4255028e"), "letter" : "a", "number" : 2 }
> db.foo.find({letter: 'a', number: 2})
@crystalneth
crystalneth / gist:2381837
Created April 14, 2012 03:22
Coffeescript closure fail?
series = [1,2,3]
fs = []
for i in series
console.log "Pushing #{i}"
fs.push (-> i)
for f in fs
console.log f()
context "collapse without target" do
setup do
TrackEvent.track_collapse(1.hour, @user, 'test', @project)
TrackEvent.track_collapse(1.hour, @user, 'test', @project)
end
should_change("number of events", :by => 1) { TrackEvent.count }
end
module Bar
def bar
puts "bar"
end
end
class Foo
include Bar
bar
end
class Message
include ActiveModel::Validations
include ActiveModel::Conversion
extend ActiveModel::Naming
include ActiveModel::Serialization
include ActiveModel::AttributeMethods
# attr_accessor :body, :subject, :recipients, :documents, :sender
define_attribute_methods [:body, :subject, :recipients, :documents, :sender]
attr_accessor :attributes
INFO: Saving rvm
INFO: Validating ruby files
INFO: Validating templates
INFO: Syntax OK
INFO: Generating Metadata
INFO: Uploading files
/Users/alex/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/openssl/buffering.rb:145:in `sysread_nonblock': end of file reached (EOFError)
from /Users/alex/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/openssl/buffering.rb:145:in `read_nonblock'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/protocol.rb:135:in `rbuf_fill'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/protocol.rb:116:in `readuntil'