This file contains 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
{ | |
"clientTracking":{ | |
"hrefURL":"http://www.shopping.com/flowers-and-plants/products", | |
"titleText":"Flowers and Plants", | |
"altText":"Flowers and Plants", | |
"sourceURL":"https://rover.ebay.com/rover/13/0/19/pixel/noscript?PV_EvnTyp=APPV&APPV_APITSP=10%2F26%2F16_05%3A03%3A43_AM&APPV_DSPRQSID=p9.84c601f422cd131102a3&APPV_IMGURL=&APPV_LI_LNKINID=7000610&APPV_LI_SBMKYW=60+Silk+Iris+Flowers+-+New+Blue&APPV_MTCTYP=1000&APPV_PRTID=2002&APPV_BrnID=2455", | |
"height":"1", | |
"width":"1", | |
"type":"pixel" | |
}, |
This file contains 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
def dblink_url | |
uri = URI(ENV['DATABASE_URL']) | |
"dbname=#{uri.path.split('/').last} host=#{uri.host} port=#{uri.port} user=#{uri.user} password=#{uri.password} sslmode=require" | |
end |
This file contains 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
redis-cli -h HOST -p PORT -a PASSWORD keys "search_page_0*" | xargs -n 10000 redis-cli -h HOST -p PORT -a PASSWORD del |
This file contains 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
module Kaminari | |
module ActiveRecordRelationMethods | |
def total_count | |
1_000_000 | |
end | |
end | |
end |
This file contains 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
# based on that: http://myronmars.to/n/dev-blog/2011/10/custom-request-matchers-in-vcr-2-0 | |
uri_without_timestamp = VCR.request_matchers.uri_without_param("Timestamp", "Signature") | |
context "amazon integration", vcr: {record: :once, :match_requests_on => [:method, uri_without_timestamp]} do | |
end |
This file contains 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
-- Index hit rate | |
WITH idx_hit_rate as ( | |
SELECT | |
relname as table_name, | |
n_live_tup, | |
round(100.0 * idx_scan / (seq_scan + idx_scan),2) as idx_hit_rate | |
FROM pg_stat_user_tables | |
ORDER BY n_live_tup DESC | |
), |
This file contains 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 "formula" | |
class Elasticsearch < Formula | |
homepage "http://www.elasticsearch.org" | |
url "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.0.Beta1.tar.gz" | |
sha1 "5e3d07fdf2d5aab75d49b38fa6743b43f07eef70" | |
depends_on :java => "1.7" | |
head do |
This file contains 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
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
This file contains 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
<link rel="import" href="../polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
This file contains 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
# run it with command: | |
# bash -c "$(curl -fsSL https://gist.github.com/troszok/9598077)" | |
# wget -O - https://gist.github.com/troszok/9598077 | bash | |
sudo apt-get -q -y install software-properties-common python-software-properties | |
sudo add-apt-repository ppa:webupd8team/java | |
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add - | |
echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list | |
apt-get update -y |
NewerOlder