Skip to content

Instantly share code, notes, and snippets.

View tigreped's full-sized avatar

Pedro Guimarães tigreped

View GitHub Profile
/**
* Get all TLD information from database and make calls to yahoo search engine to check the valid TLDs for yahoo.
*
* @param urlparam The arguments on the URL of the command
* @param request The request Object
* @param response The response Object
* @param context The HTTP context
* @throws Exception The exception
*/
public HashMap<String, List<String>> getTLDs(HashMap<String, String> urlparam, final HttpRequest request, final HttpResponse response, final HttpContext context) throws Exception {
@tigreped
tigreped / response.html
Created February 22, 2019 20:22
google serp response example
<!doctype html><html itemscope itemtype="http://schema.org/SearchResultsPage" lang="en"><head><meta content="width=device-width,minimum-scale=1.0" name="viewport"><meta content="telephone=no" name="format-detection"><meta content="address=no" name="format-detection"><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><noscript><meta content="0;url=/search?q=tiger&amp;tbs=lf_ui:2,lf:1&amp;num=100&amp;gl=us&amp;pws=0&amp;gbv=1&amp;sei=JzlwXOiXCOOf0gKJ95_AAQ" http-equiv="refresh"><style>table,div,span,p{display:none}</style>&lt;div style="display:block"&gt;Please click &lt;a href="/search?q=tiger&amp;amp;tbs=lf_ui:2,lf:1&amp;amp;num=100&amp;amp;gl=us&amp;amp;pws=0&amp;amp;gbv=1&amp;amp;sei=JzlwXOiXCOOf0gKJ95_AAQ"&gt;here if you are not redirected within a few seconds.</noscript><title>tiger - Google Search</title><style>.star{float:left;margin-top:1px;overflow:hidden}.ybhkme{font-size:11px}body,td,div,a
'deliveryStatisticsData': function (type, startPeriod, endPeriod, userId, metrics, metricsFriendlyName) {
// Auxiliary variable to select the collection dynamically for the queries
var databaseClass = null;
// Set type according to the user input and provide appropriate databaseClass
if (type === "Keyword") {
databaseClass = StatsKeywordsAggregatedMinute;
}
if (type === "SERP") {
databaseClass = StatsSerpsAggregatedMinute;
// Group by minute:
var format = '%Y-%m-%dT%H:%M';
// The string field for the record's period
var periodField = 'period';
// The field that is used as the average weight
var weightField = 'generated';
// The filter field to be multiplied in the average: $avgSolveTime, $callbacksExecuted, etc
var valueField = 'callbacksExecuted';
// The date field used to group data by minute
swagger: '2.0'
info:
version: '1.0.0'
title: 'GoldMine / MarketMaker cryptocurrency exchange API'
description: 'This is an REST API Specification for Brokers for BoostIT`s Market Maker and GoldMine projects.'
termsOfService: 'http://marketmaker.bostit.com/terms/'
contact:
email: 'pedro@georanker.com'
# TODO: these are just scaffolding settings. Must change to real choice setup!
license: