Skip to content

Instantly share code, notes, and snippets.

View kilaulena's full-sized avatar

Lena Herrmann kilaulena

  • Zalando Marketing Services
  • Berlin, Germany
  • X @kilaulena
View GitHub Profile
**********************************************************************
Done. The new package has been installed and saved to
/couchdb/json-c_0.7-1_i386.deb
You can remove it from your system anytime using:
dpkg -r json-c
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
db = $.couch.db("spec_db");
db.create();
db.saveDoc({'type':'battlestar', 'name':'galactica'});
db2 = $.couch.db("spec_db_2");
host = window.location.protocol + "//" + window.location.host;
$.couch.replicate(host + db.uri, host + db2.uri, {
body : {"create_target":true},
// before:
function ajax(obj, options, errorMessage, ajaxOptions) {
options = $.extend({successStatus: 200}, options);
errorMessage = errorMessage || "Unknown error";
$.ajax($.extend($.extend({
type: "GET", dataType: "json",
complete: function(req) {
var resp = $.httpData(req, "json");
describe 'copyDoc'
before_each
doc = {"Name" : "Sharon Agathon", "Callsign" : "Athena", "_id" : "123"};
db.saveDoc(doc);
end
it 'should result in another document with same data and new id'
db.copyDoc({_id: "123"}, {
success: function(resp){
console.log(resp, 'resp copyDoc')
in the model:
puts "-------------------------------------------------------------------------------"
puts "we have #{Place.published.tagged.count} tagged published places"
result:
== NEW SPHINX SETUP ==
--- the dirty way ---
- installing latest sphinx from svn (2.0.2)
(because when we take the last stable version we get this error on ts:rebuild: https://gist.github.com/958819)
$ svn checkout http://sphinxsearch.googlecode.com/svn/trunk/ sphinxsearch-read-only
$ cd sphinxsearch-read-only
$ ./configure && make install
$ rake ts:config
$ rake ts:rebuild
2011-05-18 12:00:15 +0200: Read error: #<TypeError: can't convert nil into Hash>
/Users/lena/.rvm/gems/ruby-1.9.2-p180-patched@lysbon/gems/rack-1.2.3/lib/rack/request.rb:167:in `update'
/Users/lena/.rvm/gems/ruby-1.9.2-p180-patched@lysbon/gems/rack-1.2.3/lib/rack/request.rb:167:in `params'
/Users/lena/.rvm/gems/ruby-1.9.2-p180-patched@global/gems/hoptoad_notifier-2.4.9/lib/hoptoad_notifier/notice.rb:312:in `rack_env'
/Users/lena/.rvm/gems/ruby-1.9.2-p180-patched@global/gems/hoptoad_notifier-2.4.9/lib/hoptoad_notifier/notice.rb:85:in `initialize'
/Users/lena/.rvm/gems/ruby-1.9.2-p180-patched@global/gems/hoptoad_notifier-2.4.9/lib/hoptoad_notifier.rb:139:in `new'
/Users/lena/.rvm/gems/ruby-1.9.2-p180-patched@global/gems/hoptoad_notifier-2.4.9/lib/hoptoad_notifier.rb:139:in `build_notice_for'
/Users/lena/.rvm/gems/ruby-1.9.2-p180-patched@global/gems/hoptoad_notifier-2.4.9/lib/hoptoad_notifier.rb:103:in `notify_or_ignore'
/Users/lena/.rvm/gems/ruby-1.9.2-p180-patched@global/gems/hoptoad_notifier-2.4.9/lib/hoptoad
@kilaulena
kilaulena / js_steps.rb
Created July 7, 2011 22:10
test capybara visibility
Then /^"([^\"]+)" should be visible$/ do |text|
assert page.has_xpath?("//*[not(descendant-or-self::script)][ancestor::*[contains(@style,'display: none;')]][contains(normalize-space(.),'#{text}')]")
end
Then /^"([^\"]+)" should not be visible$/ do |text|
assert page.has_xpath?("//*[not(descendant-or-self::script)][ancestor::*[contains(@style,'display: none;')]][contains(normalize-space(.),'#{text}')]")
end
Started POST "/de/users/sign_in" for 127.0.0.1 at 2011-09-12 14:31:45 +0200
Processing by SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"yZ1fPD2woiGNaoVwKdOdFi0Ta2pBiXCR1mEX59T1K8M=", "user"=>{"email"=>"anonymous+1148@railslove.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Anmelden", "locale"=>:de}
User Load (0.6ms) SELECT `users`.* FROM `users` WHERE `users`.`email` = 'anonymous+1148@railslove.com' AND (users.deleted_at IS NULL) LIMIT 1
Completed in 126ms
Processing by SessionsController#new as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"yZ1fPD2woiGNaoVwKdOdFi0Ta2pBiXCR1mEX59T1K8M=", "user"=>{"email"=>"anonymous+1148@railslove.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Anmelden", "locale"=>:de}
CACHE (0.0ms) SELECT `users`.* FROM `users` WHERE `users`.`email` = 'anonymous+1148@railslove.com' AND (users.deleted_at IS NULL) LIMIT 1
Rendered registrations/_signup_form.html.haml (21.0ms)
Rendered users/sessions/_