Skip to content

Instantly share code, notes, and snippets.

@olgen
olgen / analysis.rb
Created April 18, 2016 16:49
perf analysis script
class PerformanceReportRow
include ActiveModel::Model
ATTRIBUTES = %w(bids wins impressions clicks conversions buying_price cost app_opens profit)
attr_accessor *ATTRIBUTES
def initialize(attributes = {})
ATTRIBUTES.each do |attr|
self.send("#{attr}=", 0)
end
@olgen
olgen / sam
Last active August 29, 2015 14:25 — forked from maylim17/gist-of-gists
Gist of Gists
= Samantha prototype: Knowledge Graph & Chat-Bot
:author: Eugen Martin
:twitter: @olgen_morten
:tags: domain:graph-database, use-case:knowledge-base
'''
== Introduction
@olgen
olgen / webhook_json_schema.json
Created July 24, 2013 12:23
JSON & schema of the webhook payload of admineo-webhooks
{
"type":"object",
"$schema": "http://json-schema.org/draft-03/schema",
"id": "http://jsonschema.net",
"required":false,
"properties":{
"event": {
"enum": [
"product.created",
"product.updated",
@olgen
olgen / gist:3756726
Created September 20, 2012 15:49
what to spec
it 'converts a bid_request and looks for ad' do
context = mock(Ed::AdContext, :site => mock(Site, :ad_provider_configurations => nil), :ad_chooser_options => nil)
@handler.should_receive(:create_ad_context).and_return(context)
Ed::AdProvider.should_receive(:default_provider_response).with(context)
@handler.get_ad
end
@olgen
olgen / gist:3749983
Created September 19, 2012 14:29
pinoccio style stub'bing
def process
identify_site
return if !validate_bidder
identify_rtb_version
return if !validate_rtb_version
parse_bid_request
return if !validate_bid_request
@olgen
olgen / 0-readme.md
Created February 2, 2012 13:23 — forked from burke/0-readme.md
ruby-1.9.3-p0 cumulative performance + gcdata + debug patch.

Patched ruby 1.9.3-p0 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p0 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84) as well as the gcdata-patch.

Huge thanks to funny-falcon for the performance patches.