Skip to content

Instantly share code, notes, and snippets.

<?php
protected function execute(InputInterface $input, OutputInterface $output)
{
$config = \Container::getInstance()->getConfig();
$partners = $config['db']['dbname'];
$connect = $this->container->getEntityManager()->getConnection();
$query = $connect->prepare("SELECT id FROM " . $partners . ".clients WHERE is_test = 1 OR seasonal_client = 1");

“search term” Force an exact‐match search. Use this to refine results for ambiguous searches, or to exclude synonyms when searching for single words.

Example: “steve jobs”

OR Search for X or Y. This will return results related to X or Y, or both. Note: The pipe (|) operator can also be used in place of “OR.”

Examples: jobs OR gates / jobs | gates

Google Search: Operators

@todo[#deprecate]

|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

Search Service Search Operators
Web Search [allinanchor:][1], [allintext:][2], [allintitle:][3], [`
<script type="text/javascript">
(function() {
if (window.location.search.substring(1).indexOf('mgidsr') == -1) {
var playerId = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ?
'5b15211069c8390002f724f9' : '5b14f4f879676900027464b9';
var apiKey = '5b027d4a27fd180002000001';
var streamRailScript = document.createElement('script');
streamRailScript.id = '__sr_mgid_id';
streamRailScript.setAttribute('data-cfg-pid', playerId);
streamRailScript.setAttribute('data-cfg-apikey', apiKey);
@abstraction
abstraction / adsense-and-adsense-alternative
Created November 9, 2020 16:50
ad pub adsense & adsense alternative
http://mgid.com/
http://www.pulsepoint.com/
http://www.pubmatic.com/
http://madadsmedia.com/
http://account.adtrace.org/signup
http://propellerads.com/
http://lifestreet.com/
https://www.adcash.com/en/index.php
http://www.crakrevenue.com/
http://www.revenuehits.com/
import {registerBidder} from 'src/adapters/bidderFactory';
import * as utils from '../src/utils';
import * as urlUtils from '../src/url';
import { BANNER } from 'src/mediaTypes';
const BIDDER_CODE = 'mgid';
const ENDPOINT_URL = '//dsp.mgid.com/prebid/';
const VERSION = '1.0';
export const spec = {
code: BIDDER_CODE,
@abstraction
abstraction / js
Created November 9, 2020 16:48 — forked from kutaq/js
Script MGID
script awal mgid
<script src="//jsc.mgid.com/contohiklan.com.742952.js" async></script>
setelah dipasang lazyload maka :
<script type='text/javascript'>
//<![CDATA[
// Lazy Load Mgid
var lazymgid=!1;window.addEventListener('scroll',function(){(0!=document.documentElement.scrollTop&&!1===lazymgid||0!=document.body.scrollTop&&!1===lazymgid)&&(!function(){var e=document.createElement('script');e.type='text/javascript',e.async=!0,e.src='https://jsc.mgid.com/domainanda.com.742952.js';var a=document.getElementsByTagName('script')[0];a.parentNode.insertBefore(e,a)}(),lazymgid=!0)},!0);
//]]>
</script>
@abstraction
abstraction / third-parties.sql
Created November 7, 2020 19:58 — forked from patrickhulce/third-parties.sql
third party SQL manipulation
This file has been truncated, but you can view the full file.
/** Forked from https://gist.github.com/simonhearne/2d090a797da9beabe5ee21cf9cd0bf84 */
CREATE TABLE IF NOT EXISTS `thirdpartydb_group` (idgroup INTEGER PRIMARY KEY AUTOINCREMENT, name text);
CREATE TABLE IF NOT EXISTS `thirdpartydb_category` (idcategory INTEGER PRIMARY KEY AUTOINCREMENT, name text, groupid INT);
CREATE TABLE IF NOT EXISTS `thirdpartydb_company` (idcompany INTEGER PRIMARY KEY AUTOINCREMENT, name text);
CREATE TABLE IF NOT EXISTS `thirdpartydb_product` (
idproduct INTEGER PRIMARY KEY AUTOINCREMENT,
@abstraction
abstraction / README.md
Created November 4, 2020 00:24 — forked from florimondmanca/README.md
HTTPX vs aiohttp (over HTTPS)

Usage

  • Generate TLS certificates for localhost:
pip install trustme-cli
trustme-cli
  • Run wrk on each endpoint, eg:
@abstraction
abstraction / httpx_aiohttp.py
Created November 4, 2020 00:24 — forked from imbolc/httpx_aiohttp.py
Httpx vs aiohttp benchmark
from starlette.applications import Starlette
from starlette.routing import Route
from starlette.responses import PlainTextResponse
import httpx
import aiohttp
HOST, PORT = "localhost", 8000
URL = f"http://{HOST}:{PORT}/"