This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if @records | |
posts = @records.map{|p| p.post_id} | |
posts_extra_data = Message::Post | |
.joins( | |
'LEFT JOIN "message_webs" ON "message_webs"."post_id" = "message_posts"."id"', | |
'LEFT JOIN "source_sources" ON "source_sources"."id" = "message_posts"."source_source_id"', | |
'LEFT JOIN "source_sections" ON "source_sections"."id" = "message_posts"."source_section_id"' | |
) | |
.where(id: posts) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"head": [ | |
{ | |
"CoType": "CoType", | |
"objects": "objects", | |
"objects_avg_quality": "objects_avg_quality" | |
} | |
], | |
"rows": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# CentOS rbenv system wide installation script | |
# Forked from https://gist.github.com/1237417 | |
# Installs rbenv system wide on CentOS 5/6, also allows single user installs. | |
# Install pre-requirements | |
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \ | |
make bzip2 autoconf automake libtool bison iconv-devel git-core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Store CBRFilter objects | |
# | |
class CBRFilters | |
include Enumerable | |
extend Forwardable | |
attr_accessor :filters | |
def_delegators :@filters, :each, :size, :<<, :push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'elasticsearch/model' | |
class Cbr | |
include ActiveModel::Model | |
include Elasticsearch::Model | |
index_name 'cbr' | |
document_type 'UC_CBR_003' | |
# Digital Objects per day |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements callback_redirect_form(). | |
*/ | |
function commerce_monogram_redirect_form($form, &$form_state, $order, $payment_method) { | |
$wrapper = entity_metadata_wrapper('commerce_order', $order); | |
switch ($payment_method['method_id']) { | |
case 'monogram_tatrapay_tb': | |
break; | |
case 'monogram_eplatby_vub': |
NewerOlder