Profile | download (kb/s) | upload (kb/s) | latency (ms) |
---|---|---|---|
Native | 0 | 0 | 0 |
GPRS | 50 | 20 | 500 |
56K Dial-up | 50 | 30 | 120 |
Mobile EDGE | 240 | 200 | 840 |
2G Regular | 250 | 50 | 300 |
2G Good | 450 | 150 | 150 |
3G Slow | 780 | 330 | 200 |
This file contains hidden or 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
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
#payload: [{"kind"=>"person"}] | |
Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
#data: {"interest"=>["music", "movies", "programming"]} | |
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
Segment.where("jsonb_array_length(data->'interest') > 1") |
This file contains hidden or 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 File.expand_path('../boot', __FILE__) | |
require 'rails/all' | |
# Require the gems listed in Gemfile, including any gems | |
# you've limited to :test, :development, or :production. | |
Bundler.require(:default, Rails.env) | |
module TemplateTest | |
class Application < Rails::Application |
This file contains hidden or 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
# A function to do roll dice because I'm screwing around in bash | |
function roll() { | |
# capture parameter | |
declare -i DIE_COUNT=$1 | |
declare -i DIE_SIDES=$2 | |
declare -i BONUS=$3 | |
declare -i TOTAL=0 | |
declare -i COUNT=0 |
This file contains hidden or 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
#normal, rational human beings with no religious agenda | |
class Marriage < ActiveRecord::Base | |
validates :human_one, :human_two, :presence => true | |
end | |
#standard GOP/Fundamentalist Model | |
class Marriage < ActiveRecord::Base | |
validates :husband, :uniqueness => true, :presence => true, | |
:male => true, :message => "It's ADAM, not MADAM" | |
validates :wife, :uniqueness => true, :presence => true, |
The whole install procedure is like the following.
You would have to do 7 steps.
- Download the latest tar file, and expand it.
- Move it to /usr/local/, and make a symbolic link to the folder.
- Add path to MongoDB binaries.
- Make an user that "mongod" runs on, and group that owns the user.