Skip to content

Instantly share code, notes, and snippets.

@nozpheratu
nozpheratu / seeds.rb
Created March 21, 2013 16:53
seed file for country/state creation
# encoding: utf-8
Country.delete_all
ActiveRecord::Base.connection.reset_pk_sequence!('countries')
Country.create(:id=>1,:iso=>"AD",:name=>"Andorra")
Country.create(:id=>2,:iso=>"AE",:name=>"United Arab Emirates")
Country.create(:id=>3,:iso=>"AF",:name=>"Afghanistan")
Country.create(:id=>4,:iso=>"AG",:name=>"Antigua and Barbuda")
Country.create(:id=>5,:iso=>"AI",:name=>"Anguilla")
Country.create(:id=>6,:iso=>"AL",:name=>"Albania")
Country.create(:id=>7,:iso=>"AM",:name=>"Armenia")
$CLASSPATH << "/bin/Sikuli-IDE/"
require "sikuli-script.jar"
java_import 'org.sikuli.script.Region'
java_import 'org.sikuli.script.Screen'
java_import 'org.sikuli.script.Settings'
java_import 'org.sikuli.script.SikuliEvent'
java_import 'org.sikuli.script.SikuliScript'
#Crome X30 Y109
##Userable
module Userable
def self.included(base)
base.has_one :user, :as => :userable, :dependent => :destroy, :autosave => true
base.validate :user_must_be_valid
base.alias_method_chain :user, :autobuild
base.extend ClassMethods
base.define_user_accessors
end
rake aborted!
No such file or directory - /assets/mercury/mercury.css
(in /home/robot/.rvm/gems/ruby-1.9.3-p0/gems/mercury-rails-0.9.0/app/assets/stylesheets/_mercury-sass.scss)
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/less-rails-2.2.6/lib/less/rails/import_processor.rb:24:in `read'
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/less-rails-2.2.6/lib/less/rails/import_processor.rb:24:in `block in depend_on'
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/less-rails-2.2.6/lib/less/rails/import_processor.rb:17:in `each'
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/less-rails-2.2.6/lib/less/rails/import_processor.rb:17:in `depend_on'
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/less-rails-2.2.6/lib/less/rails/import_processor.rb:11:in `evaluate'
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in `block in evaluate'
var Aloha = window.Aloha || ( window.Aloha = {} );
Aloha.settings =
{
contentHandler: {
insertHtml: ['word', 'generic', 'oembed', 'sanitize', 'videoembed'],
sanitize: "relaxed",
allows: {
// elements allowed in the content
elements: [
'a', 'abbr', 'b', 'blockquote', 'br', 'cite', 'code', 'dd', 'del', 'dl', 'dt', 'em',
@nozpheratu
nozpheratu / gist:4534493
Created January 14, 2013 23:21
My Aloha Page
<script data-aloha-plugins="common/ui,common/format,common/highlighteditables,common/link,common/image,common/align,common/table,common/horizontalruler,extra/headerids,common/list,extra/metaview,common/abbr,extra/formatlesspaste,common/characterpicker,common/contenthandler,custom/videoembed" src="/assets/aloha/aloha-full.js"></script>
<div id="aloha"></div>
<script>
//<![CDATA[
Aloha.ready( function() {
Aloha.settings.contentHandler.insertHtml = [ 'word', 'generic', 'sanitize', 'videoembed' ];
Aloha.settings.contentHandler.sanitize = {
// elements allowed in the content