Skip to content

Instantly share code, notes, and snippets.

View ellcs's full-sized avatar

ellcs

  • Hamburg, Germany
  • 02:50 (UTC -07:00)
View GitHub Profile
@ellcs
ellcs / pg_pub_sub.rb
Created January 12, 2018 14:42 — forked from chsh/pg_pub_sub.rb
PostgreSQL LISTEN/NOTIFY example for ruby
#
# A:
# pubsub = PgPubSub.new('channelname')
# pubsub.subscribe do |data|
# puts "data: #{data} is coming!"
# end
#
# B:
# pubsub = PgPubSub.new('channelname')
# pubsub.publish("hello world")
@ellcs
ellcs / formtastic_static_field.html.erb
Last active August 24, 2017 08:43
static field in formtastic
<% # you might want to create a casual label with %>
<% # static content or content to display. %>
<% # to do, use this: %>
<li>
<legend class="label">
<label>
Static Label
</label>
</legend>