Skip to content

Instantly share code, notes, and snippets.

SELECT
groupBy,
groupArray(Requested) AS Requested,
groupArray(KeywordsRankGroup0) AS KeywordsRankGroup0,
arrayMap(x -> x-KeywordsRankGroup0[1], KeywordsRankGroup0) AS KeywordsRankGroup0Change,
groupArray(KeywordsRankGroup1) AS KeywordsRankGroup1,
arrayMap(x -> x-KeywordsRankGroup1[1], KeywordsRankGroup1) AS KeywordsRankGroup1Change,
<?php
class TeamRoleBehavior extends ModelBehavior {
// Enable custom finds in Behavior
public $mapMethods = array(
'/teamAncestors/' => 'teamAncestors',
'/teamDescendants/' => 'teamDescendants',
);
// Paste this code into line 918 of CakeRequest.php
/**
* Modify data originally from `php://input`. Useful for altering json/xml data
* in middleware or DispatcherFilters before it gets to RequestHandlerComponent
*
* @param string $input A string to replace original parsed data from input()
* @return void
*/
public function setInput($input) {
// Profile.php
public $findMethods = [
'permissions' => true
];
public function find($type, $query = []) {
echo "Found it in the model!";die;
if ($type === 'permissions') {
echo "ASDFASDFSF";die;
SELECT
p.user_id,
p.workspace_id,
p.profile_id,
BIT_OR(p.permissions)
FROM
(SELECT
`users_profiles`.`user_id`,
NULL AS `team_id`,
`profiles`.`id` AS `profile_id`,
- name: rankings-request
rate: 2500/h
retry_parameters:
task_retry_limit: 2
task_age_limit: 3h
min_backoff_seconds: 600
max_backoff_seconds: 2400
target: worker
- name: rankings-retrieve
if (Configure::read('env') == 'prod') {
CakeLog::config('debug', [
'engine' => 'Syslog',
'types' => ['notice', 'info', 'debug'],
'file' => 'debug',
]);
CakeLog::config('error', [
'engine' => 'Syslog',
'types' => ['warning', 'error', 'critical', 'alert', 'emergency'],
'file' => 'error',
<select name="country" class="selectInput ui-corner-all">
<option value="">- Country -</option>
<option value="AF">Afghanistan</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AG">Angola</option>
<option value="AI">Anguilla</option>
<option value="AG">Antigua &amp; Barbuda</option>
[
{ "name": "keyword", "type": "string" },
{ "name": "engine", "type": "string"},
{ "name": "locale", "type": "string"},
{ "name": "geo", "type": "string"},
{ "name": "mobile", "type": "boolean"},
{ "name": "safe_search", "type": "string"},
{ "name": "autocorrect", "type": "string"},
{ "name": "lang_only", "type": "boolean"},
{ "name": "ppl_id", "type": "string"},
SELECT
IF( rank IS NULL, top_keyword, keyword ) AS keyword,
IF( rank IS NULL, top_rank_date, rank_date ) AS rank_date,
IF( rank IS NULL, top_engine, engine ) AS engine,
IF( rank IS NULL, top_locale, locale ) AS locale,
IF( rank IS NULL, top_geo, geo ) AS geo,
IF( rank IS NULL, top_mobile, mobile ) AS mobile,
IF( rank IS NULL, top_micro_format, micro_format ) AS micro_format,
IF( rank IS NULL, top_news, news ) AS news,
IF( rank IS NULL, top_video, video ) AS video,