Skip to content

Instantly share code, notes, and snippets.

View nmerouze's full-sized avatar

Nicolas Mérouze nmerouze

View GitHub Profile
/usr/bin/c++ -bundle -headerpad_max_install_names -o qtruby4.so "CMakeFiles/qtruby4.dir/Qt.o" "CMakeFiles/qtruby4.dir/handlers.o" "CMakeFiles/qtruby4.dir/marshall_types.o" -L/Users/nicolas/Downloads/qt4-qtruby-1.4.10/smoke/qt -F/Library/Frameworks -framework QtCore -lpthread -lruby -F/Library/Frameworks -framework QtNetwork -lsmokeqt -F/Library/Frameworks -framework QtCore -lpthread -F/Library/Frameworks -framework QtGui -F/Library/Frameworks -framework QtNetwork -F/Library/Frameworks -framework QtOpenGL -F/Library/Frameworks -framework QtDBus -F/Library/Frameworks -framework QtSql -F/Library/Frameworks -framework QtSvg -lQtUiTools -F/Library/Frameworks -framework QtXml -F/Library/Frameworks -framework QtWebKit
/usr/bin/c++ -bundle -headerpad_max_install_names -o qtruby4.so "CMakeFiles/qtruby4.dir/Qt.o" "CMakeFiles/qtruby4.dir/handlers.o" "CMakeFiles/qtruby4.dir/marshall_types.o" -L/Users/nicolas/Downloads/qt4-qtruby-1.4.10/smoke/qt -F/Library/Frameworks -framework QtCore -lpthread -lruby -F/Library/Frameworks -framework QtNetwork -lsmokeqt -F/Library/Frameworks -framework QtCore -lpthread -F/Library/Frameworks -framework QtGui -F/Library/Frameworks -framework QtNetwork -F/Library/Frameworks -framework QtOpenGL -F/Library/Frameworks -framework QtDBus -F/Library/Frameworks -framework QtSql -F/Library/Frameworks -framework QtSvg -lQtUiTools -F/Library/Frameworks -framework QtXml -F/Library/Frameworks -framework QtWebKit
document.observe("dom:loaded", function() {
$$('#nav li:first-child').invoke('addClassName', 'first');
});
def flash_messages
fl = ''
[:help, :notice, :error].each do |name|
next unless flash[name]
fl << content_tag(:div, flash[name], :class => "flash #{name}")
flash[name] = nil
end
fl unless fl.empty?
end
document.observe("dom:loaded", function() {
if ($$('.flash').length > 0) $$('.flash').invoke('fade', { delay: 3.0 });
});
module ActionView
module Helpers
class FormBuilder
module FormBuilderExtension
def hint(method, text)
errors = object.errors.on(method)
hint_message = "<span class='hint'>#{text}</span>"
if errors.blank?
hint_message
# Hack for make_resourceful plugin.
module Resourceful
class Builder
module BuilderExtension
def set_flash(action, message)
after(action) { flash[:notice] = message }
end
end
include BuilderExtension
class Cmd
attr_reader :output, :pid, :status
def initialize(cmd_line)
IO.popen(cmd_line) do |f|
@output = f.readlines
@pid, @status = Process.wait2
end
end
// jquery.red.js
var domReady = function(handler) { jQuery(document).ready(handler); };
var j = jQuery;
# simple.red
Ruby.puts "Hello World!"