Skip to content

Instantly share code, notes, and snippets.

View brennovich's full-sized avatar
👋
Hey, there

Brenno Costa brennovich

👋
Hey, there
View GitHub Profile
module Morpheus
module Adapters
module Solr
class Relation
include ActiveModel::Model
attr_accessor :connection, :relation_class, :where
delegate :present?, :blank?, :empty?, to: :to_a
delegate :each, :map, :collect, :select, :find, :last, :first, to: :to_a
delegate :total, :facet_fields, to: :response
# Generates SQL from migrations
#
# Usage:
# rake db:[migrate,rollback]:with_sql
#
# The previous rake task will run migrations and create a file in `db/migrate_sql`
# Depending on migrate or rollback a file will be created with the respective
# sufix.
#
# Drawbacks:
# Generates SQL from migrations
#
# Usage:
# rake db:[migrate,rollback]:with_sql
#
# The previous rake task will run migrations and create a file in `db/migrate_sql`
# Depending on migrate or rollback a file will be created with the respective
# sufix.
#
# Drawbacks:
#! /bin/sh
# Generic script for running ruby scripts as daemons using
# jsvc and a java class to control the daemon.
#
# Contains common parameters and start/stop
# Things you'll need to set on a per script/daemon basis:
# SCRIPT_NAME
#
# Things you can set:
#build-pipeline-plugin-content {
background-color: none !important;
}
#icon-bar {
margin: 0 0 4px;
}
.revision.rounded {
height: 88px;
#= require_tree ./components
Atlantico.Manager =
components: {}
setup: (context = 'body') ->
_.map $('[data-component]:not([data-loaded])', context), (element) ->
component = $(element).data('component')
Atlantico.Manager.instantiateComponent component, element
notes:
after_versioned:
strategy: "remove"
section: "versioning"
changelog_message: "available on {version}"
sections:
- name: "breaking"
label: "Breaking Changes:"
- name: "added"
label: "Added:"
require 'benchmark/ips'
class String
def mocked_size
50
end
end
Benchmark.ips do |x|
x.time = 10
require 'benchmark/ips'
class Cocada
attr_accessor :string
def mocked_size
50
end
end
<li class="list-group-item">
<a href="#">
<div class="company-logo company-logo-small">
<img src="https://ucarecdn.com/236d0f6e-77f6-4b56-8c48-c09ba303e0a5/-/resize/100x100/.jpg">
</div>
<div class="company-info-search">
<h5 class="h4">Companhia Paulista de Trens Metropolitanos - CPTM</h5>
<div class="static-rating-wrapper">
<div class="static-rating-container">