Skip to content

Instantly share code, notes, and snippets.

/**
* /profiles/1 : works
* /workspaces/1/profiles/1 : does not work
*
*/
Router::connect(
'/workspaces/:workspaceId/profiles/:id', [
'method' => 'GET',
'controller' => 'profiles',
// API
server {
listen 80;
root /home/nozzle/htdocs/webroot;
index index.php;
server_name api.nozzle.io;
location / {
{
// Plugin settings
// Turn the debug output on/off
"show_debug": true,
// Which file types (file extensions), do you want the plugin to
// execute for
"extensions_to_execute": ["php", "ctp"],
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,
[
{ "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 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>
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',
- 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
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`,
// Profile.php
public $findMethods = [
'permissions' => true
];
public function find($type, $query = []) {
echo "Found it in the model!";die;
if ($type === 'permissions') {
echo "ASDFASDFSF";die;