Skip to content

Instantly share code, notes, and snippets.

negotiations = Negotiation.arel_table
actions = NegotiationAction.arel_table
negotiations.join(actions).on(negotiations[:id].eq(actions[:negotiation_id])).
where(actions[:counter].eq(
actions.project(actions[:counter].maximum).
where(actions[:negotiation_id].eq(negotiations[:id]))))
class Presenters::Shows < Brentano::Presenter
class_attribute :allowed_scopes, :absolute_limit
self.allowed_scopes = [ :upcoming, :past ]
self.absolute_limit = Gigmaven::Application.config.query_limit
def relation
subject.events.includes([
:primary_photo,
:flyer,
@shows = presenter(:shows) do |with|
with.maximum_size = 3
with.options.scope = :upcoming
end
<script type="text/javascript">
var options = {
elemId: 'venue_submissions_filters',
allGenres:<%= Artist::GENRES.to_json %>,
allTags: <%= submission_tag_options.map{|name,v|{:name => name, :value => v}}.to_json %>,
webServer: '<%= WEB_SERVER %>',
widgetServer: '<%= widget_server %>',
pageSize: <%= ArtistSearch::PAGE_SIZE %>,
maxPages: <%= ArtistSearch::MAX_PAGE %>,
venueId: '<%= @venue.id %>',
<div class="search_section" data-section-name="tags">
<div class="heading">
Tags
<% rn_tooltip "Tags" do -%>
Use this filter to restrict your search to artists for which you have applied the selected tags.
<% end -%>
</div>
<div class="content">
<%= f.select 'tags', [], {}, :multiple => true, 'data-placeholder' => 'Choose tags', 'data-bind' =>
'options: all_tags, optionsText: \'name\', optionsValue: \'value\', selectedOptions: \'selected_tags\'' %>
The Shout XMPP server
Preparing ejabberd for test... [ done ]
when the receiver is online
should send an XMPP message
should not send a request to the push service
when the receiver is in the background
behaves like the receiver is online
should send an XMPP message
should not send a request to the push service
when the receiver is offline
@robertothais
robertothais / gist:4043600
Created November 9, 2012 03:56 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
Pod::Spec.new do |s|
s.name = 'XMPPFramework'
s.version = '3.5'
s.license = 'BSD'
s.summary = 'An XMPP Framework in Objective-C for the Mac / iOS development community.'
s.homepage = 'https://github.com/robbiehanson/XMPPFramework'
s.author = { 'Robbie Hanson' => 'robbiehanson@deusty.com' }
s.source = { :git => 'https://github.com/robbiehanson/XMPPFramework.git', :tag => '3.5' }
s.description = 'XMPPFramework provides a core implementation of RFC-3920 (the xmpp standard), along with
WHEN Parties in a State are violent, he offered a wonderful Contrivance to reconcile them. The Method is this. You take an Hundred Leaders of each Party; you dispose them into Couples of such whose Heads are nearest of a Size; then let two nice Operators saw off the Occiput of each Couple at the same Time, in such a Manner that the Brain may be equally divided. Let the Occiputs thus cut off be interchanged, applying each to the Head of his opposite Party-man. It seems indeed to be a Work that requireth some Exactness; but the Professor assured us, that if it were dextrously performed, the Cure would be infallible. For he argued thus; that the two half Brains being left to debate the Matter between themselves within the Space of one Scull, would soon come to a good Understanding, and produce that Moderation as well as Regularity of Thinking, so much to be wished for in the Heads of those, who imagine they came into the World only to watch and govern its Motion: And as to the Difference of Brains in Quantity or
LXVI. All through his life Michael Angelo has been very abstemious, taking food more from necessity than from pleasure, especially when at work, at which time, for the most part, he has been content with a piece of bread, which he munched whilst he laboured. But latterly he has lived more regularly, his advanced age requiring it.
From Ascanio Condivi's Life of Michelangelo
http://www.gutenberg.org/files/19332/19332-h/19332-h.html