I hereby claim:
- I am nfourtythree on github.
- I am nfourtythree (https://keybase.io/nfourtythree) on keybase.
- I have a public key ASAfA_JXe8rgAyut9301GxHvL7NSUDZGX2qNLKGdwHXC1Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I wrote a quick script for those that provision servers often enough.
To get this to work take the following steps
rootwget https://gist.githubusercontent.com/nfourtythree/90fb8ef5eeafdf478f522720314c60bd/raw/disable-strict-mode.shchmod +x disable-strict-mode.sh./disable-strict-mode.sh| <?php | |
| class CraftLocaleValetDriver extends ValetDriver | |
| { | |
| /** | |
| * Determine if the driver serves the request. | |
| * | |
| * @param string $sitePath |
| /* -------------------------------------------------------------------------------- | |
| GENERATOR-NYSTUDIO107 | |
| generator-nystudio107 is a Yeoman generator for Craft CMS installs | |
| Type just `yo nystudio107` and a new Craft CMS project install tailored to | |
| your liking will be created. | |
| -------------------------------------------------------------------------------- */ | |
| 'use strict'; |
| # ---------------------- | |
| # installing dnsmasq and enable daemon | |
| # ---------------------- | |
| brew install dnsmasq | |
| sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
| # ---------------------- | |
| # adding resolver for dev domain | |
| # ---------------------- | |
| [ -d /etc/resolver ] || sudo mkdir -v /etc/resolver | |
| sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev' |
| <?php | |
| /** | |
| * Database Configuration | |
| * | |
| * All of your system's database configuration settings go in here. | |
| * You can see a list of the default settings in craft/app/etc/config/defaults/db.php | |
| */ | |
| return array( |
| function throttle(fn, threshhold, scope) { | |
| threshhold || (threshhold = 250); | |
| var last, | |
| deferTimer; | |
| return function () { | |
| var context = scope || this; | |
| var now = +new Date, | |
| args = arguments; | |
| if (last && now < last + threshhold) { |
| {# Setup Data #} | |
| {% set stuff = craft.entries({ | |
| section: "mySection", | |
| order: "dateUpdated ASC", | |
| }) %} | |
| {# Retrieve Ids #} | |
| {% set ids = stuff.ids() %} | |
| {# |
| // Base service in plugin | |
| namespace Craft; | |
| class Plugin_baseService extends BaseApplicationComponent | |
| { | |
| ... | |
| // Extended service in plugin | |
| namespace Craft; |