| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <?php | |
| //testing php inline like a motherfucker | |
| $test = (is_highlighted()) ? 'true' : false; | |
| $test++; | |
| ?> | |
| <html> | |
| <head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //This just blew my mind | |
| // | |
| //User has field 'userPages'[Pagefield type], where administrator added parts of whole tree avail. to user. | |
| //This checks whether current page (wrapped in object) or any of its parents was added to this 'userPages' | |
| //(thus current page or anything higher in the hierarchy gives user the access) | |
| //wow. | |
| $access = | |
| count( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $ee_switch_global = array(); | |
| function switch(){ | |
| global $ee_switch_global; | |
| $args = func_get_args(); | |
| $key = array_shift($args); | |
| if (array_key_exists($key,$ee_switch_global)){ | |
| $index = $ee_switch_global[$key]++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict' | |
| module.exports = { | |
| require_fresh: function (file) { | |
| delete require.cache[require.resolve(file)] | |
| return require(file) | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $breakpoints-list: ( | |
| ns: '>=44em' | |
| ); | |
| $ruleset: ( | |
| bg-r: ('background red'), | |
| bg-g: ('background green', top 10px) | |
| ); | |
| $breakpoints: ns; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extends(src='layout.sgr') | |
| block(name='styles' type='append') | |
| // normal link | |
| link(rel='stylesheet' href='/css/home-hero.css') | |
| // function for reshape-content | |
| style(inline) /css/home-hero.css | |
| // reshape custom element plugin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = class Transform { | |
| constructor (opts) { | |
| this.opts = opts | |
| this.apply = this.apply.bind(this) | |
| } | |
| apply (compiler) { | |
| const transforms = (Array.isArray(this.opts)) ? this.opts : [this.opts] | |
| compiler.plugin('emit', function(compilation, done) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Kirby\Cms\App as Kirby; | |
| use Kirby\Data\Data; | |
| Kirby::plugin('adamkiss/dynamic-blueprint', [ | |
| 'hooks' => [ | |
| 'system.loadPlugins:after' => function() { | |
| // load base (this could be dynamic as well. Should even) | |
| $fakeBlueprint = Data::read(__DIR__ . '/fake-kirby-request.yml'); |
OlderNewer