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
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net/http" |
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
package main | |
import ( | |
"encoding/json" | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"strings" |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"strings" | |
) |
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
package main | |
import ( | |
"fmt" | |
"strings" | |
) | |
func main() { | |
word := "elephant" |
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
package main | |
import ( | |
"fmt" | |
"github.com/hybridgroup/gobot" | |
"github.com/hybridgroup/gobot/platforms/keyboard" | |
"github.com/hybridgroup/gobot/platforms/sphero" | |
) |
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 a/Gemfile b/Gemfile | |
index 084537c..0a99d96 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -1,12 +1,12 @@ | |
source 'http://rubygems.org' | |
-gem 'rails', '3.2.8' | |
+gem 'rails', '4.0.1' | |
gem 'sqlite3' |
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 Address | |
include Mongoid::Document | |
field :street, type: String | |
field :city, type: String | |
field :state, type: String | |
field :zipcode, type: String | |
field :country, type: String | |
embedded_in :author, name: :permanent_address |
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 GeneralEntity | |
include Mongoid::Document | |
extend Moped::Search # to enable facetted text index search | |
field :org_name, type: String | |
# other fields | |
embeds_one :contact, as: :contactable | |
index({"contact.state" => 1, # filter with text index |
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
map = function() { | |
if (this.is_cancelled == false) { | |
data = { bookings: [ this._id ], | |
booking_amount: this.booking_amount, | |
amt_received: 0, | |
cancellations: 0 | |
} | |
} else { | |
data = { bookings: [], | |
booking_amount: 0, |
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
Started POST "/reports/distributor" for 127.0.0.1 at 2013-03-19 20:28:49 +0530 | |
Processing by ReportsController#distributor as HTML | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"0auleqI26KHq7LL373WpzslaGJWy45LMhnPeEpWedoc=", "search"=>{"project_id"=>"5139f91fb9b67dbe3a000004", "distributor_id"=>"", "start_date"=>"07/03/2013 - 00:00 AM", "end_date"=>"19/03/2013 - 23:59 PM"}, "commit"=>"Search"} | |
MOPED: 127.0.0.1:27017 COMMAND database=admin command={:ismaster=>1} (0.7286ms) | |
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=users selector={"$query"=>{"_id"=>"513f0f9db9b67d884a000002"}, "$orderby"=>{:_id=>1}} flags=[] limit=-1 skip=0 batch_size=nil fields=nil (0.5398ms) | |
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=organisations selector={"$query"=>{"_id"=>"5139f184b9b67d8e73000001"}, "$orderby"=>{:_id=>1}} flags=[] limit=-1 skip=0 batch_size=nil fields=nil (0.4199ms) | |
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collectio |
NewerOlder