asd
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
| # Added new param | |
| def make_request(path, data, &blk) | |
| opts = {log_stdout: true} | |
| p data.to_json | |
| with_api(Matching, opts) do |s| | |
| Pusher.app_id = '18016' | |
| Pusher.key = '2cca73d8fd2cf4273120' | |
| Pusher.secret = '99e764cb6f925960c0a5' | |
| s.config['mongo'] = EventMachine::Synchrony::ConnectionPool.new(size: 2) do |
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
| var world = | |
| {"type":"FeatureCollection","features":[ | |
| {"type":"Feature","properties":{"name":"Afghanistan"},"geometry":{"type":"Polygon","coordinates":[[[61.210817,35.650072],[62.230651,35.270664],[62.984662,35.404041],[63.193538,35.857166],[63.982896,36.007957],[64.546479,36.312073],[64.746105,37.111818],[65.588948,37.305217],[65.745631,37.661164],[66.217385,37.39379],[66.518607,37.362784],[67.075782,37.356144],[67.83,37.144994],[68.135562,37.023115],[68.859446,37.344336],[69.196273,37.151144],[69.518785,37.608997],[70.116578,37.588223],[70.270574,37.735165],[70.376304,38.138396],[70.806821,38.486282],[71.348131,38.258905],[71.239404,37.953265],[71.541918,37.905774],[71.448693,37.065645],[71.844638,36.738171],[72.193041,36.948288],[72.63689,37.047558],[73.260056,37.495257],[73.948696,37.421566],[74.980002,37.41999],[75.158028,37.133031],[74.575893,37.020841],[74.067552,36.836176],[72.920025,36.720007],[71.846292,36.509942],[71.262348,36.074388],[71.498768,35.650563],[71.613076,35.153203],[71.115019,34.733126 |
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
| source :rubygems | |
| # We are not loading Active Record, nor Active Resources etc. | |
| # We can do this in any app by simply replacing the rails gem | |
| # by the parts we want to use. | |
| gem "actionpack", "~> 3.2" | |
| gem "railties", "~> 3.2" | |
| gem "tzinfo" | |
| # Let's use thin |
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
| Started GET "/campaigns" for 173.179.221.219 at 2012-05-08 23:10:46 +0000 | |
| Processing by CampaignsController#index as HTML | |
| ESC[1mESC[36mUser Load (0.6ms)ESC[0m ESC[1mSELECT `users`.* FROM `users` WHERE `users`.`id` = 24 LIMIT 1ESC[0m | |
| ESC[1mESC[35mCompany Load (3.1ms)ESC[0m SELECT `companies`.* FROM `companies` WHERE `companies`.`id` = 23 LIMIT 1 | |
| ESC[1mESC[36mSite Load (0.3ms)ESC[0m ESC[1mSELECT `sites`.* FROM `sites` WHERE `sites`.`company_id` = 23 AND (url is not nu | |
| ll) LIMIT 1ESC[0m | |
| Rendered campaigns/index.html within layouts/application (75.7ms) | |
| Rendered /home/deploy/granify.com/shared/bundle/ruby/1.9.1/gems/airbrake-3.0.9/lib/templates/javascript_notifier.erb (0.7ms) | |
| ESC[1mESC[35mCampaign Load (0.4ms)ESC[0m SELECT `campaigns`.* FROM `campaigns` WHERE `campaigns`.`site_id` = 19 | |
| Completed 200 OK in 412ms (Views: 108.9ms | ActiveRecord: 8.3ms) |
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
| /** | |
| * The first commented line is your dabbletβs title | |
| */ | |
| background: #f06; | |
| background: linear-gradient(45deg, #f06, yellow); | |
| min-height: 100%; |
Teasdasd asdasd asdsad
** asdasdasd
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 'benchmark' | |
| #require 'unprof' | |
| require "redis" | |
| require 'bson' # Using bson to speedup decoding | |
| r = Random.new | |
| $db = Redis.new | |
| =begin |
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 'benchmark' | |
| require 'mongo' | |
| r = Random.new | |
| $db = Mongo::Connection.new.db("test") | |
| def create_collection site_id | |
| coll = $db["rules_#{site_id}"] | |
| coll.drop() |
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 'benchmark' | |
| require 'mongo' | |
| r = Random.new | |
| $db = Mongo::Connection.new.db("test") | |
| def create_collection site_id | |
| coll = $db["rules_#{site_id}"] | |
| coll.drop() |