Skip to content

Instantly share code, notes, and snippets.

@bravo-kernel
bravo-kernel / gist:2a4c5df8785671ce86de
Last active August 29, 2015 14:15
Cake 3.x TinyAuth authorization convention
; ----------------------------------------------------------
;
; Userscontroller (no prefixed route, no plugin)
;
; ----------------------------------------------------------
[Users]
index = user, admin, hacker
edit,view = user, admin
* = admin
@bravo-kernel
bravo-kernel / gist:9ad32a6d9e7562ed0501
Last active August 29, 2015 14:15
SOLVED: Unexpected associations key
pr(TableRegistry::get('Users'));
App\Model\Table\UsersTable Object
(
[table] => users
[alias] => Users
[entityClass] => \Cake\ORM\Entity
[associations] => Array
(
@bravo-kernel
bravo-kernel / gist:b75e0d7a5b750b69d75a
Last active August 29, 2015 14:16
Bug: cakebox permissions on default shared folder too strict (making /tmp unwritable)
Windows mounted Synced Folder:
vagrant@cakebox:~/Apps/app-plusplus$ ll tmp/cache/persistent/
total 8
drwxrwxrwx 1 vagrant vagrant 4096 Mar 5 17:45 ./
drwxrwxrwx 1 vagrant vagrant 0 Feb 18 16:10 ../
-rwxrw-rw- 1 vagrant vagrant 0 Feb 18 16:04 empty*
-rwxrw-rw- 1 vagrant vagrant 1290 Mar 5 17:45 myapp_cake_core_tiny_auth_acl*
-rwxrw-rw- 1 vagrant vagrant 310 Mar 5 17:44 myapp_cake_core_translations_cake_en__u_s*
-rwxrw-rw- 1 vagrant vagrant 310 Mar 5 17:44 myapp_cake_core_translations_debug_kit_en__u_s*
@bravo-kernel
bravo-kernel / gist:b4473b730f6eacc3d36a
Created March 6, 2015 08:23
Cakebox logfile example for command `application add cake3.app`
{"@timestamp":"2015-02-04T15:39:54.271999+00:00","@source":"cakebox","@fields":{"channel":"cli.cakebox","level":100,"ctxt_scope":[]},"@message":"================================================================================","@tags":["cli.cakebox"],"@type":"cakephp"}
{"@timestamp":"2015-02-04T15:39:54.297111+00:00","@source":"cakebox","@fields":{"channel":"cli.cakebox","level":200,"ctxt_scope":[]},"@message":"Creating application http://cake3.app","@tags":["cli.cakebox"],"@type":"cakephp"}
{"@timestamp":"2015-02-04T15:39:54.347413+00:00","@source":"cakebox","@fields":{"channel":"cli.cakebox","level":100,"ctxt_scope":[]},"@message":"Determining installation settings","@tags":["cli.cakebox"],"@type":"cakephp"}
{"@timestamp":"2015-02-04T15:39:54.371753+00:00","@source":"cakebox","@fields":{"channel":"cli.cakebox","level":100,"ctxt_scope":[]},"@message":"Installation options:","@tags":["cli.cakebox"],"@type":"cakephp"}
{"@timestamp":"2015-02-04T15:39:54.371927+00:00","@source":"cakebox","@fields":{"channel":"cl
@bravo-kernel
bravo-kernel / gist:da5195d8764260a2b242
Last active August 29, 2015 14:16
Example cakebox.yaml using private github repository
# ------------------------------------------------------------------------
# Use this configuration file to personalize your cakebox. See the docs at
# https://cakebox.readthedocs.org/en/latest/configuration/cakebox-yml
# for a list of all supported options and some inspiration.
#
# Please note: spaced indentation MUST be used or your box will not start!
# ------------------------------------------------------------------------
vm:
hostname: cakebox
ip: 10.33.10.10
@bravo-kernel
bravo-kernel / gist:a56d8c6fc01258e223a4
Last active August 29, 2015 14:16
Cakebox default catch all website
#
# Default site configuration.
#
# Chef-cakebox-generated on 2015-01-26 13:50:35.
#
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
@bravo-kernel
bravo-kernel / gist:136ad75e3430452e3321
Last active November 16, 2020 01:55
Nginx virtual host site configuration file for CakePHP3.x
#
# Cakebox-generated Nginx virtual host using generic template.
#
server {
listen 80;
server_name www.cake3.app;
rewrite ^(.*) http://cake3.app$1 permanent;
}
@bravo-kernel
bravo-kernel / gist:3f7605ed24ca48a7b152
Created March 10, 2015 21:35
Cakebox logfile example for self-update (cakebox update self)
{"@timestamp":"2015-03-10T21:30:43.239651+00:00","@source":"cakebox","@fields":{"channel":"cli.cakebox","level":100,"ctxt_scope":[]},"@message":"================================================================================","@tags":["cli.cakebox"],"@type":"cakephp"}
{"@timestamp":"2015-03-10T21:30:43.267047+00:00","@source":"cakebox","@fields":{"channel":"cli.cakebox","level":200,"ctxt_scope":[]},"@message":"Self-updating Cakebox Dashboard and Console Commands","@tags":["cli.cakebox"],"@type":"cakephp"}
{"@timestamp":"2015-03-10T21:30:43.267479+00:00","@source":"cakebox","@fields":{"channel":"cli.cakebox","level":100,"ctxt_scope":[]},"@message":"Self-updating cakebox-console...","@tags":["cli.cakebox"],"@type":"cakephp"}
{"@timestamp":"2015-03-10T21:30:43.267594+00:00","@source":"cakebox","@fields":{"channel":"cli.cakebox","level":100,"ctxt_scope":[]},"@message":"* Detecting branch","@tags":["cli.cakebox"],"@type":"cakephp"}
{"@timestamp":"2015-03-10T21:30:43.267697+00:00","@source":"cakebox","@fields":{"c
@bravo-kernel
bravo-kernel / gist:3eb73121486e6a81d3f4
Last active August 29, 2015 14:17
Vagrant related Cakebox screenshots
@bravo-kernel
bravo-kernel / gist:3b302ad7c986d237e767
Last active August 29, 2015 14:17
Vagrant file ~ conversion
class Cakebox
def Cakebox.configure(config, user_settings)
require 'vagrant/util/deep_merge'
require 'json'
# Define absolutely required box settings
settings = Hash.new
settings["vm"] = Hash.new
settings["vm"]["hostname"] = "cakebox"
settings["vm"]["ip"] = "10.33.10.10"