Skip to content

Instantly share code, notes, and snippets.

defmodule Chat.Actors.SQS do
@doc """
Easy long polling of SQS queues
## Usage
```elixir
_pid = SQS.start_link("my_queue_name", fn
({:message, message}, _caller) ->
IO.inspect(message[:body])
1) SubscriptionSerializer generates valid JSON
Failure/Error: let(:subscription) { Subscription.create_for(workspace, default_plan.id) }
NoMethodError:
undefined method `email' for nil:NilClass
# ./app/services/subscriptions/update_customer.rb:16:in `block in update_members'
# ./app/services/subscriptions/update_customer.rb:16:in `update_members'
# ./app/models/subscription.rb:31:in `create_for'
# ./spec/serializers/subscription_serializer_spec.rb:5:in `block (2 levels) in <top (required)>'
# ./spec/serializers/subscription_serializer_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/serializers/subscription_serializer_spec.rb:8:in `block (2 levels) in <top (required)>'
namespace("Flow.Chat", function(exports) {
function accountFilter(value, item, index) {
return item.get("name").toLowerCase().indexOf(value) > -1;
}
exports.AccountAutocompleteTokenField = React.createClass({
/**
* Get the list of current tokens
*
* @return {Array<Object>}
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
params.permit do
name String
emails Array => String
friends Array => { :name => String }
settings Hash
age Date
end
module USStates # :nodoc:
STATES = {
'AL' => 'Alabama',
'AK' => 'Alaska',
'AZ' => 'Arizona',
'AR' => 'Arkansas',
'CA' => 'California',
'CO' => 'Colorado',
'CT' => 'Connecticut',
[
{
"in_hole": {
"hr": 0,
"avg": 0.25,
"pid": 425902,
"rbi": 0
},
"atbat_pitch_by_pitch": {
"balls": 0,
var ActivityRenderer = Class.extend({
init: function(activity) {
this.activity = activity;
this.result = this.activity.get('result');
this.account = this.activity.get('account');
},
renderAuthor: function() {
return '<a href="" class="author">' + this.account.get('short_name') + '</a>';
},
Started GET "/" for 127.0.0.1 at 2010-12-23 11:25:37 -0800
Processing by StandardInterfaceController#index as HTML
Account Load (0.4ms) SELECT "accounts".* FROM "accounts" WHERE ("accounts"."id" = 55) LIMIT 1
CACHE (0.0ms) SELECT "accounts".* FROM "accounts" WHERE ("accounts"."id" = 55) LIMIT 1
Rendered standard_interface/_flow_app.html.erb (0.3ms)
Rendered standard_interface/_inline_upload.html.erb (0.2ms)
Rendered standard_interface/_topbar.html.erb (0.2ms)
Rendered standard_interface/_sidebar.html.erb (0.2ms)
(function(){
var s = [38,38,40,40,37,39,37,39,66,65], p = 0, t = null, $w = $(window);
var c = function(e){
clearTimeout(t);
if(p == s.length-1) {
p = 0;
$w.trigger('konami');
} else if(e.keyCode == s[p]) {
++p;