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
| SELECT DISTINCT("tracked_points"."decisecond_recorded_at") | |
| FROM "tracked_points" WHERE | |
| "tracked_points"."decisecond_recorded_at" >= 1393987371 | |
| ORDER BY decisecond_recorded_at |
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
| SELECT DISTINCT("tracked_points"."decisecond_recorded_at") | |
| FROM "tracked_points" WHERE | |
| "tracked_points"."recorded_at" >= '2014-03-05 06:00:00.000000' |
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
| task :rvm_app_alias, roles: :app do | |
| run "rvm alias create #{application} #{rvm_ruby_string_evaluated}" | |
| #run "rvm wrapper #{application} --no-links --all" | |
| end | |
| after "deploy:finalize_update", "deploy:rvm_app_alias" |
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
| @Arc.module "Entities", (Entities, App, Backbone, Marionette, $, _) -> | |
| class Entities.Map extends Entities.Model | |
| initialize: ()-> | |
| this.on "change", ()-> | |
| alert "I changed myself" | |
| $.getJSON "locations/2/geometries.json", (data) -> | |
| this.zones = data | |
| #App.vent.trigger("map:show", this) | |
| #App.MapApp.Show.Controller.showMap(this) |
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
| @Arc.module "Entities", (Entities, App, Backbone, Marionette, $, _) -> | |
| class Entities.Map extends Entities.Model | |
| initialize: ()-> | |
| $.getJSON "locations/2/geometries.json", (data) -> | |
| this.zones = data | |
| App.MapApp.Show.Controller.showMap(this) |
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
| class CategoryCacheClearer < Struct.new(:article) | |
| def call | |
| article.category_list = '' | |
| article.save | |
| end | |
| end | |
| describe CategoryCacheClearer do | |
| describe '#call' do | |
| let(:article) { mock(:save, :category_list=) } |
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
| class TweetToTheWorld < Struct.new(:person) | |
| extend Forwardable | |
| #def delegators :person, :twitter_handle, :name | |
| delegate :twitter_hande, to: :person | |
| delegate :name, to: :person | |
| def call | |
| Tweetirific.tweet(handle, twitter_message) | |
| end |
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
| desc "all in one" | |
| task :all_in_one => :environment do | |
| #q here is a message q. Assume it receives messages at the rate of 10/second | |
| q.subscribe(:block => true) do |delivery_info, properties, body| | |
| #process the message (body) | |
| puts "I got a message: #{body}" | |
| #I'd like every 10 seconds to output Total Messages Received: 13021 | |
| end |
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
| p = Person.create | |
| p.items << Item.create | |
| Rails.cache.write(Time.now, p) | |
| => false | |
| p.reload | |
| Rails.cache.write(Time.now, p) | |
| => <truthy> |
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
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Drawing; | |
| using System.Windows.Forms; | |
| using System.Runtime.Remoting; | |
| using System.Runtime.Remoting.Channels; | |
| using System.Runtime.Remoting.Channels.Tcp; | |
| using QTrack.QT500.Demo.Core; | |
| using QTrack.RemoteEvents; |