Skip to content

Instantly share code, notes, and snippets.

something
(require '[clojure.string :as str])
(defn rename-underscore [sym]
[(symbol (str/replace (name sym) \_ \-))
(keyword sym)])
(defn udestructure [[lhs expr]]
(if (and (map? lhs)
(vector? (:_keys lhs)))
(let [msym (gensym)
require 'active_support/concern'
module Campaign::Events
extend ActiveSupport::Concern
included do
def generate_event
Bus::Event::CampaignSubmittedForReview.create(:campaign => self)
end
end
module Campaign
class Base < ActiveRecord::Base
include Campaign::Data
include Campaign::State
include Campaign::Events
include Campaign::Presenters
include Campaign::Services
end
end
<html>
<head></head>
<body>
<iframe id="player" width="" height="" src="http://player.vimeo.com/video/62207569?api=1&player_id=player" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<script src="http://a.vimeocdn.com/js/froogaloop2.min.js"></script>
<script>
var player = $f('player'); // You should pass player id, which is 'player'
player.api('ready', function() {
require 'java'
java_package 'com.mycompany'
java_import org.apache.wicket.request.mapper.parameter.PageParameters
java_import org.apache.wicket.markup.html.basic.Label
java_import org.apache.wicket.markup.html.WebPage
class HomePage < Java::WebPage
serialVersionUID = '1L'
public class WicketApplication extends WebApplication
{
/**
* @see org.apache.wicket.Application#getHomePage()
*/
@Override
public Class<? extends WebPage> getHomePage()
{
return HomePage.class;
}
sudo apt-get install libdjvulibre-dev libjpeg-dev libtiff-dev libwmf-dev libmagickcore-dev libmagickwand-dev libmagick++-dev rvm
sudo gem install rmagick
ok!
Fetching: rmagick-2.13.1.gem (100%) Building native extensions. This could take a while ... Successfully installed rmagick-2.13.1 1 gem installed
require 'RMagick' #=> true
@mikepence
mikepence / Gemfile
Created February 24, 2013 17:45 — forked from litch/Gemfile
source 'https://rubygems.org'
ruby "2.0.0"
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
...
class PlacardPanelWidget < Apotomo::Widget
has_widgets do
self << widget(:project_placard, 'project_1')
self << widget(:project_placard, 'project_2')
self << widget(:project_placard, 'project_3')
self << widget(:project_placard, 'project_4')
end
def display