Skip to content

Instantly share code, notes, and snippets.

View wpiekutowski's full-sized avatar

Wojciech Piekutowski wpiekutowski

View GitHub Profile
require 'RNotify'
notify_status = Notify.init('rstakeout')
raise 'Failed to initialize libnotify' unless notify_status
notification = Notify::Notification.new 'rstakeout', nil, nil, nil
# many times
notification.update "test", "message", nil
notification.timeout = 1
notification.urgency = 0
notification.show
require 'rubygems'
require 'mongo_mapper'
require 'pp'
class Person
include MongoMapper::Document
key :name, String, :default => 'John Doe'
end
<h1>New phrase</h1>
<% form_for(@phrase) do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :content %><br />
<%= f.text_field :content %>
</p>
<p>