This file contains 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
diff --git i/lib/tasks/db.rake w/lib/tasks/db.rake | |
index a893c6c..0140f34 100644 | |
--- i/lib/tasks/db.rake | |
+++ w/lib/tasks/db.rake | |
@@ -1,10 +1,10 @@ | |
namespace :db do | |
desc "Dump data from PostgreSQL database" | |
task dump: :environment do | |
- config = YAML::load_file(Rails.root.join("config", "database.yml"))[Rails.env] | |
+ config = ActiveRecord::Base.configurations[Rails.env] |
This file contains 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
require 'active_record' | |
require 'logger' | |
ActiveRecord::Base.establish_connection(adapter: 'postgresql', database: 'avsej') | |
ActiveRecord::Schema.define do | |
create_table :users, force: true do |t| | |
t.string :first_name | |
t.string :last_name | |
t.string :role |
This file contains 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
require 'active_record' | |
require 'logger' | |
ActiveRecord::Base.establish_connection(adapter: 'postgresql', database: 'avsej') | |
ActiveRecord::Schema.define do | |
create_table :users, force: true do |t| | |
t.string :first_name | |
t.string :last_name | |
t.string :role |
This file contains 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
require 'active_record' | |
require 'logger' | |
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: 'test.sqlite3') | |
ActiveRecord::Schema.define do | |
create_table :users, force: true do |t| | |
t.string :first_name | |
t.string :last_name | |
t.string :role |
This file contains 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
avsej lcb $ git describe | |
2.2.0-65-g4b6dee7 | |
avsej lcb $ ./cmake/configure | |
-- The C compiler identification is GNU 4.8.2 | |
-- The CXX compiler identification is GNU 4.8.2 | |
-- Check for working C compiler: /usr/bin/cc | |
-- Check for working C compiler: /usr/bin/cc -- works | |
-- Detecting C compiler ABI info | |
-- Detecting C compiler ABI info - done | |
-- Check for working CXX compiler: /usr/bin/c++ |
This file contains 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
class MyArray < Array | |
def my_check | |
if size > 4 | |
:ok | |
else | |
:too_small | |
end | |
end | |
def my_compact(use_check) |
This file contains 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
#include <libcouchbase/couchbase.h> | |
#include <iostream> | |
#include <cassert> | |
extern "C" | |
{ | |
static void error_callback(lcb_t, lcb_error_t err, const char*) | |
{ | |
assert( !"error callback" ); | |
} |
This file contains 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
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int main () { | |
int ary[] = {1, 2, 3}; |
This file contains 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
task :foo do | |
print ", " | |
end | |
task :foo => [:bar] do | |
puts "world" | |
end | |
task :bar do | |
print "hello" |
This file contains 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
Makefile.am | 4 +- | |
contrib/libvbucket/vbucket.c | 77 +------ | |
example/minimal/minimal.c | 13 +- | |
include/libcouchbase/arguments.h | 42 ---- | |
include/libcouchbase/cntl.h | 9 +- | |
include/libcouchbase/types.h | 5 - | |
include/libvbucket/vbucket.h | 17 -- | |
src/arithmetic.c | 6 +- | |
src/bconf_io.c | 430 +++++++++++++++++++++++++++++++++++++++ | |
src/bconf_parse.c | 6 +- |