### SNIPPETS ###
#patterns More-or-Less Mixins
<?php | |
/************************************************** | |
Custom configuration bootstrap file for ExpressionEngine | |
1) Place config.php above site root | |
2) Require this bootstrap file at the bottom of the config and database files: | |
system/expressionengine/config/config.php | |
Example: require(realpath(dirname(__FILE__) . '/../../../config.php')); |
I freaking love working with technologies like Grunt and Gulp, and wanted to share how to get my current EE front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, Craft, etc).
#!/bin/bash | |
# File: exp_permissions.sh | |
# Description: Sets permssions on a ExpressionEngine 2 install | |
# | |
# Copyright 2010 George Ornbo (Shape Shed) | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# |
(function($){ | |
$(function(){ | |
var $form = $('#search'), // Search form | |
$target = $('#results'), // Results container | |
rp = 'search/ajax-results'; // Template for results only | |
// Function to execute on success | |
var success = function(data, status, xhr) { | |
$target.html(data); | |
}; |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Single-Column Responsive Email Template</title> | |
<style> | |
@media only screen and (min-device-width: 541px) { | |
.content { |
<?php | |
/* | |
* PHP: Recursively Backup Files & Folders to ZIP-File | |
* (c) 2012-2014: Marvin Menzerath - http://menzerath.eu | |
* contribution: Drew Toddsby | |
*/ | |
// Make sure the script can handle large folders/files | |
ini_set('max_execution_time', 600); | |
ini_set('memory_limit','1024M'); |
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2... | |
# This also works perfectly for all static file content in all projects | |
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config. | |
# Example: | |
# http://example.com - Main Laravel site as usual | |
# http://example.com/about - Main Laravel site about page as usual | |
# http://example.com/robots.txt - Main Laravel site static content as usual | |
# http://example.com/api/v1 - Lumen v1 api default / route | |
# http://example.com/api/v1/ - Lumen v1 api default / route |
#!/bin/sh | |
DATABASE_NAME='wordpress' | |
DATABASE_USER='wordpress' | |
ROOT_MYSQL_PASSWORD=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev` | |
WORDPRESS_MYSQL_PASSWORD=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev` | |
# Write Passwords to File. |
#!/bin/sh | |
DATABASE_NAME='wordpress' | |
DATABASE_USER='wordpress' | |
ROOT_MYSQL_PASSWORD=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev` | |
WORDPRESS_MYSQL_PASSWORD=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev` | |
# Write Passwords to File. |